Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
8cd71c2a
Commit
8cd71c2a
authored
Apr 17, 2015
by
邓军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PV UV log
parent
5438bec5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
136 additions
and
0 deletions
+136
-0
forumPVLog.js
app/models/forumPVLog.js
+68
-0
forumUVLog.js
app/models/forumUVLog.js
+68
-0
No files found.
app/models/forumPVLog.js
0 → 100644
View file @
8cd71c2a
'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
);
app/models/forumUVLog.js
0 → 100644
View file @
8cd71c2a
'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
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment