| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 | /** * 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 shareSchema = new Schema({    userID: String, //userID    allowCopy: {type: Boolean, default: false},    allowCooperate: {type: Boolean, default: false},    shareDate: String,}, {versionKey: false, _id: false});const ProjectSchema = new Schema({    "ID": {type: Number, index: true},    "ParentID": Number,    "NextSiblingID": Number,    "userID": String,    "code": {type: String, default: ''},    "name": String,    "projType": String,    "recentDateTime": Date,    "createDateTime": Date,    "compilation": String,    "deleteInfo": deleteSchema,    'fullFolder': Array,    //"shareInfo": [shareSchema],    "property": {        type: Schema.Types.Mixed,        default: {}    },    "summaryFees":{        totalFee: String,        estimateFee: String,        safetyFee: String,        chargeFee: String    },    "changeMark":String,//更新标记  feeRate:费率文件发生了改变,unitFile 单件文件发生了改变    "remark":String, //备注    "fileVer": String});mongoose.model(collectionName, ProjectSchema, collectionName);
 |