完善保险端前后端和养殖端小程序
This commit is contained in:
@@ -33,13 +33,14 @@ class CattleUser extends BaseModel {
|
||||
});
|
||||
}
|
||||
|
||||
static associate(models) {
|
||||
// 一个用途可以有多个牛只
|
||||
this.hasMany(models.IotCattle, {
|
||||
foreignKey: 'user_id',
|
||||
as: 'cattle'
|
||||
});
|
||||
}
|
||||
// 关联关系已在 models/index.js 中定义
|
||||
// static associate(models) {
|
||||
// // 一个用途可以有多个牛只
|
||||
// this.hasMany(models.IotCattle, {
|
||||
// foreignKey: 'user_id',
|
||||
// as: 'cattle'
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
module.exports = CattleUser;
|
||||
|
||||
Reference in New Issue
Block a user