guhongwei 3 lat temu
rodzic
commit
ae0ed016da
1 zmienionych plików z 11 dodań i 5 usunięć
  1. 11 5
      app/model/answer.js

+ 11 - 5
app/model/answer.js

@@ -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 });