maochaoying 2 years ago
parent
commit
26af0ff47c
  1. 13
      src/model/report.model.js

13
src/model/report.model.js

@ -14,6 +14,11 @@ const Report = seq.define("chicken_report", {
allowNull: false, allowNull: false,
comment: "鸡笼号", comment: "鸡笼号",
}, },
report_info: {
type: DataTypes.STRING,
allowNull: false,
comment: "预警信息",
},
type_id: { type_id: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
allowNull: false, allowNull: false,
@ -40,9 +45,15 @@ const Report = seq.define("chicken_report", {
allowNull: false, allowNull: false,
comment: "处理人", comment: "处理人",
}, },
handle_time: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: DataTypes.NOW,
comment: "处理时间",
},
}); });
// 强制同步数据库(创建数据表) // 强制同步数据库(创建数据表)
// Report.sync({ force: true });
Report.sync({ force: true });
module.exports = Report; module.exports = Report;
Loading…
Cancel
Save