1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- /**
- * 工料机数据模型
- *
- * @author CaiAoLin
- * @date 2017/6/29
- * @version
- */
- import mongoose from "mongoose";
- let Schema = mongoose.Schema;
- let collectionName = 'glj_list';
- let modelSchema = {
- // 自增id
- id: Number,
- // 工料机总库ID
- glj_repository_id: Number,
- // 项目ID
- project_id: Number,
- // 标段ID
- tender_id: Number,
- // 编码
- code: String,
- // 名称
- name: String,
- unit: String,
- // 规格型号
- specs: {
- type: String,
- default: ''
- },
- // 类型
- type: Number,
- // 人工工种
- type_of_work: Number,
- // 是否暂估 (0为否 1为是)
- is_evaluate: {
- type: Number,
- default: 0
- },
- // 供货方式
- supply: {
- type: String,
- default: ''
- },
- // 甲供数量
- supply_quantity: {
- type: Number,
- default: 0
- },
- // 交货方式
- delivery: {
- type: String,
- default: ''
- },
- // 送达地点
- delivery_address: {
- type: String,
- default: ''
- },
- // 不调价
- is_adjust_price: {
- type: Number,
- default: 0
- },
- // 调整系数
- adjustment: {
- type: Number,
- default: 1
- },
- // 显示调整基价
- adjust_price: String,
- // 显示关联单价文件的字段
- unit_price: Schema.Types.Mixed
- };
- let model = mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false}));
- export { model as default, collectionName as collectionName} ;
|