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
2.7 KiB
124 lines
2.7 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const Materials = sequelize.define("materials", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true
|
|
},
|
|
factor: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "监测因素",
|
|
primaryKey: false,
|
|
field: "factor",
|
|
autoIncrement: false
|
|
},
|
|
type: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "类型",
|
|
primaryKey: false,
|
|
field: "type",
|
|
autoIncrement: false
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "名称",
|
|
primaryKey: false,
|
|
field: "name",
|
|
autoIncrement: false
|
|
},
|
|
model: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "规格/型号",
|
|
primaryKey: false,
|
|
field: "model",
|
|
autoIncrement: false
|
|
},
|
|
code: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "物料代码",
|
|
primaryKey: false,
|
|
field: "code",
|
|
autoIncrement: false
|
|
},
|
|
unit: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "单位",
|
|
primaryKey: false,
|
|
field: "unit",
|
|
autoIncrement: false
|
|
},
|
|
price: {
|
|
type: DataTypes.DOUBLE,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "单价",
|
|
primaryKey: false,
|
|
field: "price",
|
|
autoIncrement: false
|
|
},
|
|
lineLength: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "线长",
|
|
primaryKey: false,
|
|
field: "line_length",
|
|
autoIncrement: false
|
|
},
|
|
description: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "说明",
|
|
primaryKey: false,
|
|
field: "description",
|
|
autoIncrement: false
|
|
},
|
|
structureType: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: "桥梁",
|
|
comment: "结构物类型",
|
|
primaryKey: false,
|
|
field: "structure_type",
|
|
autoIncrement: false
|
|
},
|
|
productLibraryId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "项企产品库ID",
|
|
primaryKey: false,
|
|
field: "product_library_id",
|
|
autoIncrement: false
|
|
},
|
|
}, {
|
|
tableName: "materials",
|
|
comment: "物料固化表",
|
|
indexes: []
|
|
});
|
|
dc.models.Materials = Materials;
|
|
return Materials;
|
|
};
|