添加银行政府后端接口
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user