|
@@ -18,6 +18,7 @@ const afterSale = {
|
|
end_time: { type: String, required: false, zh: '售后结束时间' }, //
|
|
end_time: { type: String, required: false, zh: '售后结束时间' }, //
|
|
status: { type: String, required: false, zh: '售后状态' }, // 字典:afterSale_status
|
|
status: { type: String, required: false, zh: '售后状态' }, // 字典:afterSale_status
|
|
result: { type: Object, required: false, zh: '售后结果' }, // 售后完成后需要补充的内容,例如:退款的金额
|
|
result: { type: Object, required: false, zh: '售后结果' }, // 售后完成后需要补充的内容,例如:退款的金额
|
|
|
|
+ deal_person: { type: String, required: false, zh: '处理人', ref: 'User.Admin' }, //
|
|
};
|
|
};
|
|
const schema = new Schema(afterSale, { toJSON: { getters: true, virtuals: true } });
|
|
const schema = new Schema(afterSale, { toJSON: { getters: true, virtuals: true } });
|
|
schema.index({ id: 1 });
|
|
schema.index({ id: 1 });
|
|
@@ -25,6 +26,7 @@ schema.index({ 'meta.createdAt': 1 });
|
|
schema.index({ type: 1 });
|
|
schema.index({ type: 1 });
|
|
schema.index({ apply_time: 1 });
|
|
schema.index({ apply_time: 1 });
|
|
schema.index({ end_time: 1 });
|
|
schema.index({ end_time: 1 });
|
|
|
|
+schema.index({ deal_person: 1 });
|
|
|
|
|
|
schema.plugin(metaPlugin);
|
|
schema.plugin(metaPlugin);
|
|
schema.plugin(MoneyPlugin({ zh: '退款金额', required: false, key: 'money' }));
|
|
schema.plugin(MoneyPlugin({ zh: '退款金额', required: false, key: 'money' }));
|