Jelajahi Sumber

新增密码

cheny 4 tahun lalu
induk
melakukan
fbab69582b
2 mengubah file dengan 14 tambahan dan 12 penghapusan
  1. 12 12
      app/model/dock.js
  2. 2 0
      app/service/dock.js

+ 12 - 12
app/model/dock.js

@@ -4,14 +4,14 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 
 // 产品
 const goods = new Schema({
-  totaltype: { type: String, required: true, maxLength: 5 }, // 产品类型
-  name: { type: String, required: true, maxLength: 200 }, // 产品名称
-  product_type_id: { type: Object, required: true, maxLength: 200 }, // 类型
-  introduction: { type: String, required: true, maxLength: 1000 }, // 产品简介
-  phase: { type: String, required: true, maxLength: 200 }, // 研发阶段
-  price: { type: String, required: true, maxLength: 200 }, // 产品单价
-  priceunit: { type: String, required: true, maxLength: 200 }, // 产品单位
-  image: { type: String, required: true, maxLength: 200 }, // 产品图片
+  totaltype: { type: String, required: false, maxLength: 5 }, // 产品类型
+  name: { type: String, required: false, maxLength: 200 }, // 产品名称
+  product_type_id: { type: Object, required: false, maxLength: 200 }, // 类型
+  introduction: { type: String, required: false, maxLength: 1000 }, // 产品简介
+  phase: { type: String, required: false, maxLength: 200 }, // 研发阶段
+  price: { type: String, required: false, maxLength: 200 }, // 产品单价
+  priceunit: { type: String, required: false, maxLength: 200 }, // 产品单位
+  image: { type: String, required: false, maxLength: 200 }, // 产品图片
   field: { type: String, maxLength: 200 }, // 所属领域
   scope: { type: String, maxLength: 200 }, // 服务范围
   coopermode: { type: String, maxLength: 200 }, // 合作方式
@@ -37,8 +37,8 @@ const apply = new Schema({
   user_name: { type: String, required: true, maxLength: 200 }, // 用户名称
   buyer: { type: String, required: true, maxLength: 1 }, // 买家/卖家 0/1
   goodsList: { type: [ goods ], default: [] }, // 产品列表
-  contact: { type: String, required: true, maxLength: 200 }, // 联系人
-  contact_tel: { type: String, required: true, maxLength: 200 }, // 联系人电话
+  contact: { type: String, required: false, maxLength: 200 }, // 联系人
+  contact_tel: { type: String, required: false, maxLength: 200 }, // 联系人电话
   email: { type: String, maxLength: 200 }, // 邮箱
   company: { type: String, maxLength: 200 }, // 单位名称
   apply_time: { type: String, maxLength: 200 }, // 申请时间
@@ -61,14 +61,14 @@ vipuser.index({ id: 1 });
 const Dock = {
   room_id: { type: String, required: true, maxLength: 10 }, // 房间号
   password: { type: String, required: false, maxLength: 200 }, // 密码
-  title: { type: String, required: true, maxLength: 200 }, // 对接会标题
+  title: { type: String, required: false, maxLength: 200 }, // 对接会标题
   desc: { type: String, maxLength: 1000 }, // 简介
   status: { type: String, default: '0', maxLength: 1 }, // 状态:0准备中;1已开始;2已结束
   start_time: { type: String, required: true, maxLength: 200 }, // 开始时间
   end_time: { type: String, required: true, maxLength: 200 }, // 结束时间
   join_end: { type: String, required: true, maxLength: 200 }, // 报名截止时间
   apply: { type: [ apply ], default: [] }, // 申请用户
-  user_id: { type: String, required: true, maxLength: 200 }, // 创建人id
+  user_id: { type: String, required: false, maxLength: 200 }, // 创建人id
   province: { type: String, required: false }, // 省
   place: { type: String, required: false }, // 市
   file_path: { type: String, required: false }, // 视频路径

+ 2 - 0
app/service/dock.js

@@ -22,6 +22,8 @@ class ChatService extends CrudService {
         role: '3',
         pid: body.pid,
         code: body.code,
+        room_id: '123',
+        password: '123',
       };
       const user = await this.ctx.curl(url, {
         method: 'post',