/**
 * Created by Tony on 2017/5/31.
 */
var mongoose = require('mongoose');
var dbm = require("../../../config/db/db_manager");
var db = dbm.getCfgConnection("scConstruct");
var Schema = mongoose.Schema;
var TreeNodeSchema = new Schema({
    ID:Number,
    ParentID:Number,
    NextSiblingID:Number,
    grpType: Number, //建筑(const : 1)/公路(const 2)/其他 etc...
    nodeType: Number,//节点类型：树节点(枝) 或 模板节点(叶)
    tplType: Number, //概算、预算、招投标 etc...
    userId: String,   //用户自定义模板用
    refId: Number,   //
    name: String,
    isDeleted: Boolean
});

var TreeNodeModel = db.model("rpt_tpl_tree", TreeNodeSchema, "rpt_tpl_tree");

module.exports = TreeNodeModel;
