|
@@ -20,10 +20,17 @@ const patenttrans = {
|
|
|
expect: { type: String }, // 预期目标
|
|
|
present: { type: String }, // 需求现状
|
|
|
condition: { type: String }, // 合作条件及要求
|
|
|
- status: { type: String }, // 状态 0:未交易 1:已交易
|
|
|
+ is_contract: { type: String }, // 0:线下合同,1:线上合同
|
|
|
+ contract: { type: Object }, // 线上合同
|
|
|
+ offine_contract: { type: Array }, // 线下合同
|
|
|
+ record: { type: Array }, // 记录
|
|
|
+ status: { type: String }, // 状态
|
|
|
+ remark: { type: String },
|
|
|
+ isdel: { type: String, required: false, default: '0' }, // 0=>未删除;1=>已撤回
|
|
|
};
|
|
|
const schema = new Schema(patenttrans, { toJSON: { virtuals: true } });
|
|
|
schema.index({ id: 1 });
|
|
|
+schema.index({ user_id: 1 });
|
|
|
schema.index({ patent_id: 1 });
|
|
|
schema.index({ create_number: 1 });
|
|
|
schema.index({ patent_name: 1 });
|
|
@@ -34,6 +41,7 @@ schema.index({ budget: 1 });
|
|
|
schema.index({ type: 1 });
|
|
|
schema.index({ is_report: 1 });
|
|
|
schema.index({ status: 1 });
|
|
|
+schema.index({ isdel: 1 });
|
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
|
schema.plugin(metaPlugin);
|
|
|
module.exports = app => {
|