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
4445d745
Commit
4445d745
authored
Jul 21, 2015
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
55e1df9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
37 deletions
+51
-37
ForumLimitAction.js
app/models/ForumLimitAction.js
+10
-4
ForumLimitActionRef.js
app/models/ForumLimitActionRef.js
+41
-33
No files found.
app/models/ForumLimitAction.js
View file @
4445d745
'use strict'
;
var
mongoose
=
require
(
'mongoose'
),
Schema
=
mongoose
.
Schema
;
//限制行为规则
//限制行为规则
var
ForumLimitActionSchema
=
new
Schema
({
ent_code
:
{
type
:
Number
,
...
...
@@ -22,11 +23,16 @@ var ForumLimitActionSchema = new Schema({
require
:
true
,
default
:
1
},
type
:
{
//0表示 无,1表示 不加积分, 2表示 禁言
type
:
Number
,
limit_action_type
:
{
//行为限制类型 ,字典看forumLimitActionConnfig表
type
:
String
,
require
:
true
,
default
:
0
},
limit_time
:
{
//行为限制时间类型
type
:
Number
,
require
:
true
,
default
:
0
},
begin_time
:
{
type
:
Date
,
required
:
false
...
...
@@ -35,7 +41,7 @@ var ForumLimitActionSchema = new Schema({
type
:
Date
,
required
:
false
},
create
_at
:
{
create
d
:
{
type
:
Date
,
required
:
true
,
default
:
Date
.
now
...
...
app/models/ForumLimitActionRef.js
View file @
4445d745
...
...
@@ -2,41 +2,49 @@
var
mongoose
=
require
(
'mongoose'
),
Schema
=
mongoose
.
Schema
;
//
话题,文章
//
行为限制中间表
var
ForumLimitActionRefSchema
=
new
Schema
({
ent_code
:
{
type
:
Number
,
require
:
true
,
index
:
true
},
limit_action_id
:
{
//标签标题
type
:
Schema
.
Types
.
ObjectId
,
require
:
true
,
index
:
true
,
ref
:
'ForumLimitAction'
},
mid
:
{
//标签标题
type
:
String
,
index
:
true
,
unique
:
true
,
require
:
true
},
uid
:
{
//用户ID,这里直接存放用户的openId
type
:
String
,
index
:
true
,
unique
:
true
,
require
:
false
},
status
:
{
//标签状态,1启用,0禁用
type
:
Number
,
require
:
true
,
default
:
1
},
created
:
{
type
:
Date
,
required
:
true
,
default
:
Date
.
now
}
type
:
Number
,
index
:
true
,
require
:
true
},
mid
:
{
type
:
String
,
index
:
true
,
unique
:
true
,
require
:
true
},
uid
:
{
//用户ID,这里直接存放用户的openId
type
:
String
,
require
:
false
},
status
:
{
//状态,1启用,0禁用
type
:
Number
,
require
:
true
,
default
:
1
},
limit_actions
:
[{
limit_action
:
{
type
:
String
,
default
:
''
},
limit_action_type
:
{
type
:
String
,
default
:
''
},
begin_time
:
{
type
:
Date
},
end_time
:
{
type
:
Date
}
}],
created
:
{
type
:
Date
,
required
:
true
,
default
:
Date
.
now
}
},
{
'collection'
:
'pisns_forum_limit_action_ref'
});
...
...
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