/** * Created by zhang on 2019/4/12. */ //用户在线时长统计 let mongoose = require("mongoose"); let Schema = mongoose.Schema; // 表结构 let schema = { userID: String, compilationID: String, dateString: String, dateTime:Number,//dateString转换回毫秒数对应的数值,方便查询 online_times: Number }; mongoose.model("online_logs", new Schema(schema, {versionKey: false}),"online_logs");