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.
124 lines
3.4 KiB
124 lines
3.4 KiB
2 years ago
|
/* eslint-disable*/
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
module.exports = dc => {
|
||
|
const DataTypes = dc.ORM;
|
||
|
const sequelize = dc.orm;
|
||
|
const ResourceConsumption = sequelize.define("resourceConsumption", {
|
||
|
id: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "ID唯一标识",
|
||
|
primaryKey: true,
|
||
|
field: "id",
|
||
|
autoIncrement: true,
|
||
|
unique: "t_resource_consumption_id_uindex"
|
||
|
},
|
||
|
resourceName: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "资源名称",
|
||
|
primaryKey: false,
|
||
|
field: "resource_name",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
resourceType: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "资源类型",
|
||
|
primaryKey: false,
|
||
|
field: "resource_type",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
applyBy: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "申请人",
|
||
|
primaryKey: false,
|
||
|
field: "apply_by",
|
||
|
autoIncrement: false,
|
||
|
references: {
|
||
|
key: "id",
|
||
|
model: "tUser"
|
||
|
}
|
||
|
},
|
||
|
applyAt: {
|
||
|
type: DataTypes.DATE,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "申请时间",
|
||
|
primaryKey: false,
|
||
|
field: "apply_at",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
requirements: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "需求描述",
|
||
|
primaryKey: false,
|
||
|
field: "requirements",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
approveState: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "审批状态",
|
||
|
primaryKey: false,
|
||
|
field: "approve_state",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
approveBy: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: "审批人",
|
||
|
primaryKey: false,
|
||
|
field: "approve_by",
|
||
|
autoIncrement: false,
|
||
|
references: {
|
||
|
key: "id",
|
||
|
model: "tUser"
|
||
|
}
|
||
|
},
|
||
|
approveAt: {
|
||
|
type: DataTypes.DATE,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: "审批时间",
|
||
|
primaryKey: false,
|
||
|
field: "approve_at",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
approveRemarks: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: "审批意见",
|
||
|
primaryKey: false,
|
||
|
field: "approve_remarks",
|
||
|
autoIncrement: false
|
||
|
},
|
||
|
token: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: "令牌",
|
||
|
primaryKey: false,
|
||
|
field: "token",
|
||
|
autoIncrement: false
|
||
|
}
|
||
|
}, {
|
||
|
tableName: "t_resource_consumption",
|
||
|
comment: "",
|
||
|
indexes: []
|
||
|
});
|
||
|
dc.models.ResourceConsumption = ResourceConsumption;
|
||
|
return ResourceConsumption;
|
||
|
};
|