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.
75 lines
2.0 KiB
75 lines
2.0 KiB
2 years ago
|
/* eslint-disable*/
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
module.exports = dc => {
|
||
|
const DataTypes = dc.ORM;
|
||
|
const sequelize = dc.orm;
|
||
|
const AcquisitionLog = sequelize.define("acquisitionLog", {
|
||
|
id: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "ID唯一标识",
|
||
|
primaryKey: true,
|
||
|
field: "id",
|
||
|
autoIncrement: true,
|
||
|
unique: "t_acquisition_log_id_uindex"
|
||
|
},
|
||
|
task: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "采集任务",
|
||
|
primaryKey: false,
|
||
|
field: "task",
|
||
|
autoIncrement: false,
|
||
|
references: {
|
||
|
key: "id",
|
||
|
model: "tAcquisitionTask"
|
||
|
}
|
||
|
},
|
||
|
success: {
|
||
|
type: DataTypes.BOOLEAN,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "是否采集成功",
|
||
|
primaryKey: false,
|
||
|
field: "success",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
startTime: {
|
||
|
type: DataTypes.DATE,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "任务开始时间",
|
||
|
primaryKey: false,
|
||
|
field: "start_time",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
endTime: {
|
||
|
type: DataTypes.DATE,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "任务结束时间",
|
||
|
primaryKey: false,
|
||
|
field: "end_time",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
details: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "采集详情",
|
||
|
primaryKey: false,
|
||
|
field: "details",
|
||
|
autoIncrement: false
|
||
|
}
|
||
|
}, {
|
||
|
tableName: "t_acquisition_log",
|
||
|
comment: "",
|
||
|
indexes: []
|
||
|
});
|
||
|
dc.models.AcquisitionLog = AcquisitionLog;
|
||
|
return AcquisitionLog;
|
||
|
};
|