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.
74 lines
1.6 KiB
74 lines
1.6 KiB
2 years ago
|
/* eslint-disable*/
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
module.exports = dc => {
|
||
|
const DataTypes = dc.ORM;
|
||
|
const sequelize = dc.orm;
|
||
|
const WorkerAttendance = sequelize.define("workerAttendance", {
|
||
|
id: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: null,
|
||
|
primaryKey: true,
|
||
|
field: "id",
|
||
|
autoIncrement: true,
|
||
|
},
|
||
|
siteId: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: '工地id',
|
||
|
primaryKey: false,
|
||
|
field: "site_id",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
workerId: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: '工人id',
|
||
|
primaryKey: false,
|
||
|
field: "worker_id",
|
||
|
},
|
||
|
temperature: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: '体温',
|
||
|
primaryKey: false,
|
||
|
field: "temperature",
|
||
|
},
|
||
|
code: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: '健康码',
|
||
|
primaryKey: false,
|
||
|
field: "code",
|
||
|
},
|
||
|
type: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: '进出类型',
|
||
|
primaryKey: false,
|
||
|
field: "type",
|
||
|
},
|
||
|
time: {
|
||
|
type: DataTypes.DATE,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: '通行时间',
|
||
|
primaryKey: false,
|
||
|
field: "time",
|
||
|
}
|
||
|
}, {
|
||
|
tableName: "worker_attendance",
|
||
|
comment: "",
|
||
|
indexes: []
|
||
|
});
|
||
|
dc.models.WorkerAttendance = WorkerAttendance;
|
||
|
return WorkerAttendance;
|
||
|
};
|