You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
1.9 KiB
87 lines
1.9 KiB
2 years ago
|
/* eslint-disable*/
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
module.exports = dc => {
|
||
|
const DataTypes = dc.ORM;
|
||
|
const sequelize = dc.orm;
|
||
|
const TaskManage = sequelize.define("taskManage", {
|
||
|
id: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "id",
|
||
|
primaryKey: true,
|
||
|
field: "id",
|
||
|
autoIncrement: true
|
||
|
},
|
||
|
roadid: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "道路id",
|
||
|
primaryKey: false,
|
||
|
field: "roadid",
|
||
|
autoIncrement: false,
|
||
|
references: {
|
||
|
key: "id",
|
||
|
model: "road"
|
||
|
}
|
||
|
},
|
||
|
dangerDescription: {
|
||
|
type: DataTypes.CHAR,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: "隐患说明",
|
||
|
primaryKey: false,
|
||
|
field: "danger_description",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
issuanceTime: {
|
||
|
type: DataTypes.DATE,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: "下发时间",
|
||
|
primaryKey: false,
|
||
|
field: "issuance_time",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
userid: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "用户id",
|
||
|
primaryKey: false,
|
||
|
field: "userid",
|
||
|
autoIncrement: false,
|
||
|
references: {
|
||
|
key: "id",
|
||
|
model: "user"
|
||
|
}
|
||
|
},
|
||
|
isdanger: {
|
||
|
type: DataTypes.BOOLEAN,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: "是否存在安全隐患,flase(不存在)",
|
||
|
primaryKey: false,
|
||
|
field: "isdanger",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
reportTime: {
|
||
|
type: DataTypes.DATE,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: "上报时间",
|
||
|
primaryKey: false,
|
||
|
field: "report_time",
|
||
|
autoIncrement: false
|
||
|
}
|
||
|
}, {
|
||
|
tableName: "task_manage",
|
||
|
comment: "",
|
||
|
indexes: []
|
||
|
});
|
||
|
dc.models.TaskManage = TaskManage;
|
||
|
return TaskManage;
|
||
|
};
|