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
852e4965
Commit
852e4965
authored
Jul 17, 2015
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
行为限制 model
parent
f6b40e47
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
0 deletions
+93
-0
ForumLimitAction.js
app/models/ForumLimitAction.js
+48
-0
ForumLimitActionRef.js
app/models/ForumLimitActionRef.js
+45
-0
No files found.
app/models/ForumLimitAction.js
0 → 100644
View file @
852e4965
'use strict'
;
var
mongoose
=
require
(
'mongoose'
),
Schema
=
mongoose
.
Schema
;
//限制行为规则
var
ForumLimitActionSchema
=
new
Schema
({
ent_code
:
{
type
:
Number
,
require
:
true
,
index
:
true
},
title
:
{
type
:
String
,
require
:
true
},
description
:
{
type
:
String
,
require
:
false
},
status
:
{
//0表示禁用,1表示启用
type
:
Number
,
require
:
true
,
default
:
1
},
type
:
{
//0表示 无,1表示 不加积分, 2表示 禁言
type
:
Number
,
require
:
true
,
default
:
0
},
begin_time
:
{
type
:
Date
,
required
:
false
},
end_time
:
{
type
:
Date
,
required
:
false
},
create_at
:
{
type
:
Date
,
required
:
true
,
default
:
Date
.
now
}
},
{
'collection'
:
'pisns_forum_limit_action'
});
module
.
exports
=
mongoose
.
model
(
'ForumLimitAction'
,
ForumLimitActionSchema
);
app/models/ForumLimitActionRef.js
0 → 100644
View file @
852e4965
'use strict'
;
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
}
},
{
'collection'
:
'pisns_forum_limit_action_ref'
});
module
.
exports
=
mongoose
.
model
(
'ForumLimitActionRef'
,
ForumLimitActionRefSchema
);
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