|
@@ -6,37 +6,38 @@ const { ObjectId } = require('mongoose').Types;
|
|
// 专利申请-审批单
|
|
// 专利申请-审批单
|
|
const patentapply = {
|
|
const patentapply = {
|
|
user_id: { type: ObjectId }, // 用户id
|
|
user_id: { type: ObjectId }, // 用户id
|
|
|
|
+ user_name: { type: String }, // 用户姓名
|
|
|
|
+ mech_id: { type: ObjectId }, // 机构id
|
|
|
|
+ mech_name: { type: String }, // 机构名称
|
|
admin_id: { type: ObjectId }, // 管理员id
|
|
admin_id: { type: ObjectId }, // 管理员id
|
|
- is_mech: { type: String }, // 是否需要机构
|
|
|
|
- mechanism_id: { type: ObjectId }, // 机构id
|
|
|
|
- mechanism_name: { type: String }, // 机构名称
|
|
|
|
- water_number: { type: String }, // 流水号
|
|
|
|
|
|
+ admin_name: { type: String }, // 管理员姓名
|
|
|
|
+ agentmech_id: { type: ObjectId }, // 代理机构id
|
|
|
|
+ agentmech_name: { type: String }, // 代理机构姓名
|
|
create_number: { type: String }, // 申请号
|
|
create_number: { type: String }, // 申请号
|
|
name: { type: String }, // 发明名称
|
|
name: { type: String }, // 发明名称
|
|
apply_name: { type: String }, // 申请人
|
|
apply_name: { type: String }, // 申请人
|
|
type: { type: String }, // 申请类型
|
|
type: { type: String }, // 申请类型
|
|
inventor: { type: Array }, // 发明人
|
|
inventor: { type: Array }, // 发明人
|
|
- contact: { type: Array }, // 联系人
|
|
|
|
- phone: { type: String }, // 联系人电话
|
|
|
|
- email: { type: String }, // 联系人邮箱
|
|
|
|
|
|
+ contact: { type: Array }, // 技术联系人
|
|
|
|
+ phone: { type: String }, // 联系电话
|
|
|
|
+ email: { type: String }, // 电子邮箱
|
|
questions: { type: Object }, // 问题
|
|
questions: { type: Object }, // 问题
|
|
check_url: { type: Array }, // 审查文件
|
|
check_url: { type: Array }, // 审查文件
|
|
- agent_url: { type: Array }, // 专利代理上报文件
|
|
|
|
|
|
+ agent_url: { type: Array }, // 申请文件
|
|
record: { type: Array }, // 记录
|
|
record: { type: Array }, // 记录
|
|
- status: { type: String, default: '0' }, // 状态
|
|
|
|
|
|
+ status: { type: String, default: '0' }, // 状态0:待审查,1:审查通过,-1:审查未通过,2:科企&&代理机构,3:代理机构选择科企,-3:自己走,4:科企上传并下发
|
|
remark: { type: String },
|
|
remark: { type: String },
|
|
};
|
|
};
|
|
const schema = new Schema(patentapply, { toJSON: { virtuals: true } });
|
|
const schema = new Schema(patentapply, { toJSON: { virtuals: true } });
|
|
schema.index({ id: 1 });
|
|
schema.index({ id: 1 });
|
|
schema.index({ user_id: 1 });
|
|
schema.index({ user_id: 1 });
|
|
|
|
+schema.index({ mech_id: 1 });
|
|
schema.index({ admin_id: 1 });
|
|
schema.index({ admin_id: 1 });
|
|
-schema.index({ is_mech: 1 });
|
|
|
|
-schema.index({ mechanism_id: 1 });
|
|
|
|
-schema.index({ mechanism_name: 1 });
|
|
|
|
-schema.index({ water_number: 1 });
|
|
|
|
|
|
+schema.index({ agentmech_id: 1 });
|
|
schema.index({ create_number: 1 });
|
|
schema.index({ create_number: 1 });
|
|
schema.index({ name: 1 });
|
|
schema.index({ name: 1 });
|
|
schema.index({ apply_name: 1 });
|
|
schema.index({ apply_name: 1 });
|
|
|
|
+schema.index({ type: 1 });
|
|
schema.index({ status: 1 });
|
|
schema.index({ status: 1 });
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
schema.plugin(metaPlugin);
|
|
schema.plugin(metaPlugin);
|