|
@@ -6,6 +6,7 @@ const { ObjectId } = require('mongoose').Types;
|
|
|
// 专利交易表
|
|
|
const patenttrans = {
|
|
|
user_id: { type: ObjectId },
|
|
|
+ admin_id: { type: ObjectId },
|
|
|
patent_id: { type: ObjectId }, // 专利id
|
|
|
create_number: { type: String }, // 专利号
|
|
|
patent_name: { type: String }, // 专利名
|
|
@@ -31,6 +32,7 @@ const patenttrans = {
|
|
|
const schema = new Schema(patenttrans, { toJSON: { virtuals: true } });
|
|
|
schema.index({ id: 1 });
|
|
|
schema.index({ user_id: 1 });
|
|
|
+schema.index({ admin_id: 1 });
|
|
|
schema.index({ patent_id: 1 });
|
|
|
schema.index({ create_number: 1 });
|
|
|
schema.index({ patent_name: 1 });
|