liuyu преди 4 години
родител
ревизия
a78d4c5949
променени са 2 файла, в които са добавени 12 реда и са изтрити 0 реда
  1. 2 0
      app/controller/.dock.js
  2. 10 0
      app/model/dock.js

+ 2 - 0
app/controller/.dock.js

@@ -16,6 +16,7 @@ module.exports = {
       "adminuser",
       "phone",
       "passwd",
+      "vipuser",
     ],
   },
   destroy: {
@@ -39,6 +40,7 @@ module.exports = {
       "adminuser",
       "phone",
       "passwd",
+      "vipuser",
     ],
   },
   show: {

+ 10 - 0
app/model/dock.js

@@ -17,6 +17,15 @@ const apply = new Schema({
 });
 apply.index({ id: 1 });
 apply.index({ userid: 1 });
+const vipuser = new Schema({
+  vipname: { type: String, required: false, maxLength: 200 }, // 用户名称
+  vipphone: { type: String, required: false, maxLength: 200 }, // 联系人手机
+  role: { type: String, required: false, maxLength: 200 }, // 申请人类型
+  company: { type: String, required: false, maxLength: 500 }, // 单位名称
+  email: { type: String, required: false, maxLength: 20 }, // 单位名称
+  content: { type: String, required: false }, // 单位名称
+});
+vipuser.index({ id: 1 });
 const Dock = {
   title: { type: String, required: true, maxLength: 200 }, // 对接会标题
   desc: { type: String, maxLength: 1000 }, // 简介
@@ -35,6 +44,7 @@ const Dock = {
   uid: { type: String, required: false, maxLength: 200 }, // 所属用户
   adminuser: { type: String, required: false, maxLength: 200 }, // 所属用户姓名
   phone: { type: String, required: false, maxLength: 200 }, // 所属电话
+  vipuser: { type: [ vipuser ], default: [] }, // vip用户
 };
 const schema = new Schema(Dock, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });