feat(耗材管理): 添加SN序列号管理功能
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user