guhongwei %!s(int64=3) %!d(string=hai) anos
pai
achega
541f940cf2
Modificáronse 2 ficheiros con 6 adicións e 6 borrados
  1. 3 3
      app/model/user/personChat.js
  2. 3 3
      app/model/user/personRoom.js

+ 3 - 3
app/model/user/personChat.js

@@ -6,11 +6,11 @@ const { Secret } = require('naf-framework-mongoose-free/lib/model/schema');
 const { ObjectId } = require('mongoose').Types;
 // 个人聊天表
 const person_chat = {
-  sender_id: { type: ObjectId, required: true }, // 发送人id
+  sender_id: { type: String, required: true }, // 发送人id
   sender_name: { type: String, required: false }, // 发送人名字
-  receiver_id: { type: ObjectId, required: true }, // 接收人id
+  receiver_id: { type: String, required: true }, // 接收人id
   receiver_name: { type: String, required: false }, // 接收人名字
-  room_id: { type: ObjectId, required: true }, // 聊天房间id
+  room_id: { type: String, required: true }, // 聊天房间id
   content: { type: String, required: true }, // 内容
   is_read: { type: Boolean, default: false }, // 是否已读
   send_time: { type: String },

+ 3 - 3
app/model/user/personRoom.js

@@ -6,10 +6,10 @@ const { Secret } = require('naf-framework-mongoose-free/lib/model/schema');
 const { ObjectId } = require('mongoose').Types;
 // 个人聊天房间表
 const person_room = {
-  product_id: { type: ObjectId }, // 产品
-  p1_id: { type: ObjectId, required: true }, // 第一个人id
+  product_id: { type: String }, // 产品
+  p1_id: { type: String, required: true }, // 第一个人id
   p1: { type: String, required: false }, // 第一个人名
-  p2_id: { type: ObjectId, required: true }, // 第二个人id
+  p2_id: { type: String, required: true }, // 第二个人id
   p2: { type: String, required: false }, // 第二个人名
   create_time: { type: String },
   last_time: { type: String }, // 最后发言时间