添加银行政府后端接口

This commit is contained in:
2025-09-25 15:53:44 +08:00
parent b17bdcc24c
commit 5b6b7e0a96
60 changed files with 5345 additions and 1920 deletions

View File

@@ -101,9 +101,27 @@ const CompletedSupervision = sequelize.define('CompletedSupervision', {
}, {
tableName: 'completed_supervisions',
timestamps: true,
underscored: false,
createdAt: 'createdAt',
updatedAt: 'updatedAt',
comment: '监管任务已结项表'
});
// 定义关联关系
CompletedSupervision.associate = (models) => {
// 监管任务已结项与用户关联(创建人)
CompletedSupervision.belongsTo(models.User, {
foreignKey: { name: 'createdBy', field: 'createdBy' },
targetKey: 'id',
as: 'creator'
});
// 监管任务已结项与用户关联(更新人)
CompletedSupervision.belongsTo(models.User, {
foreignKey: { name: 'updatedBy', field: 'updatedBy' },
targetKey: 'id',
as: 'updater'
});
};
module.exports = CompletedSupervision;