Commit 8cd71c2a authored by 邓军's avatar 邓军

PV UV log

parent 5438bec5
'use strict';
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
//话题广场,板块
var ForumPVLogSchema = new Schema({
ent_code: {
type: Number,
require: true,
index: true
},
mid: { //会员ID
type: Number,
require: true,
index: true
},
forumInfo: { //板块ID
type: String,
index: true,
ref: 'ForumInfo'
},
forumThread: { //话题、文章、照片墙的ID
type: String,
index: true,
ref: 'ForumThread'
},
open_id: { //微信公众号唯一识别
type: String,
require: true,
index: true
},
user: { //访问者
type: String,
require: true,
index: true,
ref: 'ForumUser'
},
source: { //分享者
type: String
},
type: { //页面:1.主页 2.板块 3.文章
type: Number,
index: true,
require: true
},
thread_type: { //文章类型:1.话题 2.文章 3.照片墙 4.子文章
type: Number,
index: true
},
ip: { //IP地址
type: String
},
userAgent: {
type: String
},
created: {
type: Date,
required: true,
default: Date.now
}
}, {
'collection': 'pisns_forum_pv_log'
});
module.exports = mongoose.model('ForumPVLog', ForumPVLogSchema);
'use strict';
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
//话题广场,板块
var ForumUVLogSchema = new Schema({
ent_code: {
type: Number,
require: true,
index: true
},
mid: { //会员ID
type: Number,
require: true,
index: true
},
forumInfo: { //板块ID
type: String,
index: true,
ref: 'ForumInfo'
},
forumThread: { //话题、文章、照片墙的ID
type: String,
index: true,
ref: 'forumThread'
},
open_id: { //微信公众号唯一识别
type: String,
require: true,
index: true
},
user: { //访问者
type: String,
require: true,
index: true,
ref: 'ForumUser'
},
source: { //分享者
type: String
},
type: { //页面:1.主页 2.板块 3.文章
type: Number,
index: true,
require: true
},
thread_type: { //文章类型:1.话题 2.文章 3.照片墙 4.子文章
type: Number,
index: true
},
ip: { //IP地址
type: String
},
userAgent: {
type: String
},
created: {
type: Date,
required: true,
default: Date.now
}
}, {
'collection': 'pisns_forum_uv_log'
});
module.exports = mongoose.model('ForumUVLog', ForumUVLogSchema);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment