| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /**
- * Created by Zhong on 2018/3/22.
- */
- /*项目*/
- const mongoose = require('mongoose');
- const { stringAt } = require('pdfkit/js/data');
- 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 },
- "GUID": String, // 接口需要
- "ParentID": { type: Number, index: true },
- "NextSiblingID": Number,
- "userID": String,
- "importedByInterface": { type: Boolean, default: false },
- "name": String,
- "projType": String,
- "recentDateTime": Date,
- "createDateTime": Date,
- "compilation": String,
- "deleteInfo": deleteSchema,
- 'fullFolder': Array,
- //"shareInfo": [shareSchema],
- "property": {
- type: Schema.Types.Mixed,
- default: {}
- },
- "location": String,//工程所在地
- "summaryFees": {
- totalFee: String,
- estimateFee: String,
- safetyFee: String,
- chargeFee: String
- },
- "changeMark": String,//更新标记 feeRate:费率文件发生了改变,unitFile 单件文件发生了改变
- "remark": String, //备注
- "fileVer": String, // 创建时程序版本号
- "lastFileVer": String, // 最新打开并计算时的程序版本号
- "keyIDData": { // 广西接口需要
- type: Schema.Types.Mixed,
- },
- });
- mongoose.model(collectionName, ProjectSchema, collectionName);
|