feat: 修复BUG

This commit is contained in:
zhang1106
2026-03-16 17:07:20 +08:00
parent 8dcbe9948b
commit e5d20820dc
26 changed files with 2363 additions and 1004 deletions
+2
View File
@@ -64,10 +64,12 @@ const ConsumableRecord = sequelize.define('ConsumableRecord', {
ConsumableRecord.belongsTo(Consumable, {
foreignKey: 'consumableId',
as: 'consumable',
onDelete: 'CASCADE'
});
Consumable.hasMany(ConsumableRecord, {
foreignKey: 'consumableId',
as: 'records',
onDelete: 'CASCADE'
});