|
@@ -7,12 +7,16 @@ const { ObjectId } = require('mongoose').Types;
|
|
|
const kjzl_order = {
|
|
|
medium_id: { type: ObjectId }, // 机构id
|
|
|
openid: { type: String }, // 微信openid
|
|
|
- project: { type: String }, // 服务项目
|
|
|
+ project: { type: Object }, // 服务项目
|
|
|
contact: { type: String }, // 联系人
|
|
|
phone: { type: String }, // 联系电话
|
|
|
email: { type: String }, // 邮件
|
|
|
server_time: { type: String }, // 服务时间
|
|
|
remark: { type: String }, // 预约备注
|
|
|
+ type: { type: String }, // 服务类型
|
|
|
+ invoice: { type: String }, // 开具发票
|
|
|
+ company: { type: String }, // 公司名称
|
|
|
+ number: { type: String }, // 纳税人识别号
|
|
|
status: { type: String, default: '0' }, // 状态:0-预约;1-完成
|
|
|
};
|
|
|
const schema = new Schema(kjzl_order, { toJSON: { virtuals: true } });
|
|
@@ -23,6 +27,10 @@ schema.index({ project: 1 });
|
|
|
schema.index({ contact: 1 });
|
|
|
schema.index({ phone: 1 });
|
|
|
schema.index({ server_time: 1 });
|
|
|
+schema.index({ type: 1 });
|
|
|
+schema.index({ invoice: 1 });
|
|
|
+schema.index({ company: 1 });
|
|
|
+schema.index({ number: 1 });
|
|
|
schema.index({ status: 1 });
|
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
|
schema.plugin(metaPlugin);
|