瀏覽代碼

user表增加登录时长字段

zhangweicheng 4 年之前
父節點
當前提交
ff9af7e0f6
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      modules/all_models/user.js

+ 5 - 1
modules/all_models/user.js

@@ -66,7 +66,11 @@ let modelSchema = {
     user_type:{
         type:String,
         default:'normal'//  normal : 普通用户,test:测试用户
-    }
+    },
+    online_times: {
+        type: Number,
+        default: 0
+    } //最近一天的登录时长累计
 };
 mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));