|
@@ -6,32 +6,27 @@ const { ObjectId } = require('mongoose').Types;
|
|
|
// 查新检索-交底单
|
|
|
const patentanalysis = {
|
|
|
user_id: { type: ObjectId }, // 用户id
|
|
|
+ user_name: { type: ObjectId }, // 用户id
|
|
|
admin_id: { type: ObjectId }, // 管理员id
|
|
|
- is_mech: { type: String }, // 是否需要机构
|
|
|
- mechanism_id: { type: ObjectId }, // 机构id
|
|
|
- mechanism_name: { type: String }, // 机构名称
|
|
|
+ admin_name: { type: ObjectId }, // 管理员id
|
|
|
name: { type: String }, // 发明名称
|
|
|
apply_name: { type: String }, // 申请人
|
|
|
- type: { type: String }, // 申请类型
|
|
|
+ type: { type: String }, // 专利类型
|
|
|
inventor: { type: String }, // 发明人
|
|
|
contact: { type: String }, // 联系人
|
|
|
phone: { type: String }, // 联系人电话
|
|
|
email: { type: String }, // 联系人邮箱
|
|
|
- questions: { type: Object }, // 问题
|
|
|
+ questions: { type: Object, default: {} }, // 问题
|
|
|
file: { type: Array }, // 报告文件
|
|
|
- record: { type: Array }, // 记录
|
|
|
status: { type: String, default: '0' }, // 状态
|
|
|
+ record: { type: Array }, // 记录
|
|
|
remark: { type: String },
|
|
|
};
|
|
|
const schema = new Schema(patentanalysis, { toJSON: { virtuals: true } });
|
|
|
schema.index({ id: 1 });
|
|
|
schema.index({ user_id: 1 });
|
|
|
schema.index({ admin_id: 1 });
|
|
|
-schema.index({ is_mech: 1 });
|
|
|
-schema.index({ mechanism_id: 1 });
|
|
|
-schema.index({ mechanism_name: 1 });
|
|
|
schema.index({ name: 1 });
|
|
|
-schema.index({ apply_name: 1 });
|
|
|
schema.index({ status: 1 });
|
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
|
schema.plugin(metaPlugin);
|