|
@@ -7,12 +7,18 @@ const { ObjectId } = require('mongoose').Types;
|
|
|
const answer = {
|
|
|
questionnaire_id: { type: ObjectId }, // 问卷id
|
|
|
answer: { type: Array }, // 答案
|
|
|
- user_id: { type: ObjectId },
|
|
|
- phone: { type: String },
|
|
|
- contacts: { type: String },
|
|
|
- company: { type: String },
|
|
|
+ user_id: { type: ObjectId },//用户id
|
|
|
+ phone: { type: String },//电话
|
|
|
+ contacts: { type: String },//联系人
|
|
|
+ company: { type: String },//企业名称
|
|
|
+ address: { type: String },//联系地址
|
|
|
+ attribute: { type: String },//企业属性
|
|
|
+ category: { type: String },//产品类别
|
|
|
remark: { type: String, maxLength: 200 },
|
|
|
- create_time: { type: String, default: moment(new Date()).format('YYYY-MM-DD HH:mm:ss') },
|
|
|
+ create_time: {
|
|
|
+ type: String,
|
|
|
+ default: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"),
|
|
|
+ },
|
|
|
};
|
|
|
const schema = new Schema(answer, { toJSON: { virtuals: true } });
|
|
|
schema.index({ id: 1 });
|