guhongwei 3 vuotta sitten
vanhempi
commit
1c95d02ef3

+ 20 - 9
app/controller/user/config/.organization.js

@@ -2,13 +2,15 @@ module.exports = {
   create: {
     requestBody: [
       "!name",
+      "!phone",
       "!password",
-      "phone",
+      "code",
+      "role",
       "email",
       "addr",
-      "code",
       "office_phone",
       "profession",
+      "juris",
       "institution_code",
       "companytype",
       "companydate",
@@ -21,9 +23,11 @@ module.exports = {
       "companybrief",
       "mainproduct",
       "qualifications",
-      "remark",
-      "juris",
       "status",
+      "openid",
+      "isdel",
+      "remark",
+      "create_time",
     ],
   },
   destroy: {
@@ -35,11 +39,14 @@ module.exports = {
     requestBody: [
       "name",
       "phone",
+      "password",
+      "code",
+      "role",
       "email",
       "addr",
-      "code",
       "office_phone",
       "profession",
+      "juris",
       "institution_code",
       "companytype",
       "companydate",
@@ -52,9 +59,11 @@ module.exports = {
       "companybrief",
       "mainproduct",
       "qualifications",
-      "juris",
-      "remark",
       "status",
+      "openid",
+      "isdel",
+      "remark",
+      "create_time",
     ],
   },
   show: {
@@ -66,13 +75,15 @@ module.exports = {
   index: {
     parameters: {
       query: {
+        name: "name",
         phone: "phone",
         code: "code",
+        role: "role",
+        juris: "juris",
         profession: "profession",
+        status: "status",
         institution_code: "institution_code",
         companyperson: "companyperson",
-        status: "status",
-        juris: "juris",
         "create_time@start": "create_time@start",
         "create_time@end": "create_time@end",
       },

+ 22 - 18
app/controller/user/config/.personal.js

@@ -2,23 +2,25 @@ module.exports = {
   create: {
     requestBody: [
       "!name",
-      "!password",
       "!phone",
+      "!password",
+      "code",
+      "role",
       "email",
       "addr",
       "office_phone",
       "profession",
-      "code",
-      "openid",
-      "status",
-      "remark",
       "juris",
-      "create_time",
-      "is_expert",
-      "school",
-      "major",
       "card",
       "zwzc",
+      "school",
+      "major",
+      "status",
+      "openid",
+      "isdel",
+      "remark",
+      "is_expert",
+      "create_time",
     ],
   },
   destroy: {
@@ -30,22 +32,24 @@ module.exports = {
     requestBody: [
       "name",
       "phone",
+      "password",
+      "code",
+      "role",
       "email",
       "addr",
       "office_phone",
       "profession",
-      "code",
-      "openid",
-      "status",
-      "remark",
       "juris",
-      "create_time",
-      "is_expert",
-      "school",
-      "major",
       "card",
       "zwzc",
+      "school",
+      "major",
+      "status",
+      "openid",
       "isdel",
+      "remark",
+      "is_expert",
+      "create_time",
     ],
   },
   show: {
@@ -60,10 +64,10 @@ module.exports = {
         name: "name",
         phone: "phone",
         code: "code",
+        role: "role",
         juris: "juris",
         status: "status",
         profession: "profession",
-        role: "role",
         "create_time@start": "create_time@start",
         "create_time@end": "create_time@end",
       },

+ 7 - 6
app/model/user/organization.js

@@ -7,15 +7,17 @@ const { Secret } = require('naf-framework-mongoose-free/lib/model/schema');
 // 机构表
 const organization = {
   name: { type: String, required: true, maxLength: 200 }, // 用户名
-  password: { type: Secret, required: true, select: false }, // 登录密码
   phone: { type: String, required: false, maxLength: 200 }, // 电话号码
+  password: { type: Secret, required: true, select: false }, // 登录密码
+  code: { type: String, required: false, default: "INVESTORS" }, // 邀请码
+  role: { type: String, required: false, default: "4" }, // 角色
   email: { type: String, required: false, maxLength: 200 }, // 邮箱
   addr: { type: String, required: false, maxLength: 500 }, // 地址
   office_phone: { type: String, required: false, maxLength: 500 }, // 办公电话
   profession: { type: String, required: false, maxLength: 500 }, // 所属行业
-  institution_code: { type: String, required: false, maxLength: 500 }, // 机构代码
-  code: { type: String, required: false, default: 'INVESTORS' }, // 邀请码
+  juris: { type: String }, // 辖区
 
+  institution_code: { type: String, required: false, maxLength: 500 }, // 机构代码
   companytype: { type: String, required: false, maxLength: 300 }, // 注册类型
   companydate: { type: String, required: false, maxLength: 300 }, // 注册时间
   companycapital: { type: String, required: false, maxLength: 300 }, // 注册资金
@@ -27,11 +29,10 @@ const organization = {
   companybrief: { type: String, required: false }, // 企业简介
   mainproduct: { type: String, required: false, maxLength: 300 }, // 主要产品
   qualifications: { type: String, required: false, maxLength: 300 }, // 企业资质&荣誉
-  status: { type: String, required: false, default: '0', maxLength: 200 }, // 审核状态,0-注册,1-通过,2-拒绝
-  juris: { type: String }, // 辖区
 
+  status: { type: String, required: false, default: "0", maxLength: 200 }, // 审核状态,0-注册,1-通过,2-拒绝
   openid: { type: String }, // 微信openid
-  isdel: { type: String, required: false, default: '0' }, // 0=>未删除;1=>已删除
+  isdel: { type: String, required: false, default: "0" }, // 0=>未删除;1=>已删除
   remark: { type: String, maxLength: 200 },
   create_time: { type: String },
 };

+ 12 - 10
app/model/user/personal.js

@@ -7,24 +7,26 @@ const { Secret } = require('naf-framework-mongoose-free/lib/model/schema');
 // 个人用户表
 const personal = {
   name: { type: String, required: true }, // 用户名
-  password: { type: Secret, required: true, select: false }, // 登录密码
   phone: { type: String, required: false, maxLength: 200 }, // 电话号码
+  password: { type: Secret, required: true, select: false }, // 登录密码
+  code: { type: String, required: false, default: "INVESTORS" }, // 邀请码
+  role: { type: String, required: false, default: "3" }, // 角色
   email: { type: String, required: false, maxLength: 200 }, // 邮箱
   addr: { type: String, required: false, maxLength: 500 }, // 地址
   office_phone: { type: String, required: false, maxLength: 500 }, // 办公电话
   profession: { type: String, required: false, maxLength: 500 }, // 所属行业
-  code: { type: String, required: false, default: 'INVESTORS' }, // 邀请码
-  openid: { type: String, required: false }, // 微信openid
-  status: { type: String, required: false, default: '0', maxLength: 200 }, // 审核状态,0-注册,1-通过,2-拒绝
-  isdel: { type: String, required: false, maxLength: 200, default: '0' }, // 是否删除,0-否,1-是
-  remark: { type: String, maxLength: 200 },
   juris: { type: String }, // 辖区
-  is_expert: { type: Boolean, default: false }, // 是否是专家
-  school: { type: String, required: false, maxLength: 500 }, // 院系
-  major: { type: String, required: false, maxLength: 200 }, // 专业
+
   card: { type: String, required: false, maxLength: 200 }, // 身份证号
   zwzc: { type: String, required: false, maxLength: 200 }, // 职务职称
-  role: { type: String, required: false, default: '3' }, // 角色
+  school: { type: String, required: false, maxLength: 500 }, // 院系
+  major: { type: String, required: false, maxLength: 200 }, // 专业
+
+  status: { type: String, required: false, default: "0", maxLength: 200 }, // 审核状态,0-注册,1-通过,2-拒绝
+  openid: { type: String, required: false }, // 微信openid
+  isdel: { type: String, required: false, maxLength: 200, default: "0" }, // 是否删除,0-否,1-是
+  remark: { type: String, maxLength: 200 },
+  is_expert: { type: Boolean, default: false }, // 是否是专家
   create_time: { type: String },
 };
 const schema = new Schema(personal, { toJSON: { virtuals: true } });