|
@@ -7,6 +7,7 @@ const { ObjectId } = require('mongoose').Types;
|
|
const patenttrans = {
|
|
const patenttrans = {
|
|
user_id: { type: ObjectId },
|
|
user_id: { type: ObjectId },
|
|
patent_id: { type: ObjectId }, // 专利id
|
|
patent_id: { type: ObjectId }, // 专利id
|
|
|
|
+ create_number: { type: String }, // 专利号
|
|
patent_name: { type: String }, // 专利名
|
|
patent_name: { type: String }, // 专利名
|
|
contact: { type: String }, // 联系人
|
|
contact: { type: String }, // 联系人
|
|
phone: { type: String }, // 联系电话
|
|
phone: { type: String }, // 联系电话
|
|
@@ -24,6 +25,7 @@ const patenttrans = {
|
|
const schema = new Schema(patenttrans, { toJSON: { virtuals: true } });
|
|
const schema = new Schema(patenttrans, { toJSON: { virtuals: true } });
|
|
schema.index({ id: 1 });
|
|
schema.index({ id: 1 });
|
|
schema.index({ patent_id: 1 });
|
|
schema.index({ patent_id: 1 });
|
|
|
|
+schema.index({ create_number: 1 });
|
|
schema.index({ patent_name: 1 });
|
|
schema.index({ patent_name: 1 });
|
|
schema.index({ contact: 1 });
|
|
schema.index({ contact: 1 });
|
|
schema.index({ phone: 1 });
|
|
schema.index({ phone: 1 });
|