/**
 * Created by chen on 2017/6/29.
 */
var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

var ration_glj = new Schema({
    ID:String,
    GLJID:Number,
    repositoryId:Number,
    projectID: Number,
    rationID:String,
    projectGLJID:Number,
    name:String,
    code:String,
    //原始的编码
    original_code: {
        type: String,
        index: true
    },
    rcode:String,
    specs:String,
    unit:String,
    shortName:String,
    billsItemID: String,
    type:Number,
    // 调整系数ID
    adjCoe: Number,
    quantity:String,
    customQuantity:String,
    rationItemQuantity:String,
    createType: {type: String,default:'normal'},//normal、add、replace  正常、添加工料机、替换工料机
    from:{type: String,default:'std'}//std, cpt  来自标准工料机库、补充工料机库
},{versionKey:false});

mongoose.model('ration_glj', ration_glj);
