/**
 * Created by Zhong on 2018/3/22.
 */
/*项目*/
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const deleteSchema = require('../all_schemas/delete_schema');

const collectionName = 'projects';
const ProjectSchema = new Schema({
    "ID": Number,
    "ParentID": Number,
    "NextSiblingID": Number,
    "userID": String,
    "name": String,
    "projType": String,
    "recentDateTime": Date,
    "createDateTime": Date,
    "compilation": String,
    "deleteInfo": deleteSchema,
    'fullFolder': Array,
    "property": {
        type: Schema.Types.Mixed,
        default: {}
    },
    "summaryFees":{
        totalFee: String,
        estimateFee: String,
        safetyFee: String,
        chargeFee: String
    },
    "changeMark":String,//更新标记  feeRate:费率文件发生了改变，unitFile 单件文件发生了改变
    "remark":String //备注
});
mongoose.model(collectionName, ProjectSchema, collectionName);