feat(耗材管理): 添加SN序列号管理功能

This commit is contained in:
zhang1106
2026-03-05 09:57:44 +08:00
parent ef8f3ab565
commit 03d69456c0
7 changed files with 375 additions and 17 deletions
+6
View File
@@ -52,6 +52,12 @@ const Consumable = sequelize.define('Consumable', {
description: {
type: DataTypes.TEXT
},
snList: {
type: DataTypes.JSON,
allowNull: true,
defaultValue: [],
comment: 'SN序列号列表,JSON数组格式'
},
status: {
type: DataTypes.STRING,
defaultValue: 'active'
+6
View File
@@ -87,6 +87,12 @@ const ConsumableLog = sequelize.define('ConsumableLog', {
type: DataTypes.JSON,
allowNull: true,
comment: '耗材快照信息(分类、单位、供应商等),用于耗材删除后追溯'
},
snList: {
type: DataTypes.JSON,
allowNull: true,
defaultValue: [],
comment: '本次操作的SN序列号列表'
}
}, {
tableName: 'consumable_logs',
+6
View File
@@ -46,6 +46,12 @@ const ConsumableRecord = sequelize.define('ConsumableRecord', {
},
notes: {
type: DataTypes.TEXT
},
snList: {
type: DataTypes.JSON,
allowNull: true,
defaultValue: [],
comment: '本次操作的SN序列号列表'
}
}, {
tableName: 'consumable_records',