/* 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" }, resourceId: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "资源id", primaryKey: false, field: "resource_id", autoIncrement: false }, 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 }, restServiceId: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "rest服务id", primaryKey: false, field: "rest_service_id", autoIncrement: false }, orgId: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "申请资源所属机构id", primaryKey: false, field: "orgId", autoIncrement: false } }, { tableName: "t_resource_consumption", comment: "", indexes: [] }); dc.models.ResourceConsumption = ResourceConsumption; return ResourceConsumption; };