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
090e0b51
Commit
090e0b51
authored
Jan 19, 2015
by
杨翌文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f5a7697e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
14 deletions
+20
-14
forumAccessContorl.js
app/models/forumAccessContorl.js
+7
-2
forumComment.js
app/models/forumComment.js
+1
-1
forumThread.js
app/models/forumThread.js
+7
-1
forumUser.js
app/models/forumUser.js
+1
-6
config.js
config/config.js
+4
-4
No files found.
app/models/forumAccessContorl.js
View file @
090e0b51
...
...
@@ -9,18 +9,23 @@ var ForumAccessControlSchema = new Schema({
require
:
true
,
index
:
true
},
forum
:
{
type
:
Schema
.
Types
.
ObjectId
,
require
:
true
,
ref
:
'ForumInfo'
},
role
:
{
//角色
type
:
Schema
.
Types
.
ObjectId
,
require
:
true
,
index
:
true
,
ref
:
'ForumRole'
},
action
:
{
//角色行为
action
:
{
//角色行为
type
:
String
,
require
:
true
,
index
:
true
},
status
:
{
//行为状态1,允许,
0
拒绝
status
:
{
//行为状态1,允许,
2
拒绝
type
:
Number
,
require
:
true
,
default
:
1
...
...
app/models/forumComment.js
View file @
090e0b51
...
...
@@ -22,7 +22,7 @@ var ForumCommentSchema = new Schema({
ref
:
'ForumUser'
},
comments
:
{
//评论的评论
type
.
Array
type
:
[
ForumCommentSchema
]
},
content
:
{
//评论内容
type
:
String
,
...
...
app/models/forumThread.js
View file @
090e0b51
...
...
@@ -15,6 +15,12 @@ var ForumThreadSchema = new Schema({
index
:
true
,
ref
:
'Forum'
},
from
:
{
//发帖者
type
:
Schema
.
Types
.
ObjectId
,
require
:
true
,
index
:
true
,
ref
:
'ForumUser'
}
title
:
{
//话题标题
type
:
String
,
require
:
true
...
...
@@ -67,7 +73,7 @@ var ForumThreadSchema = new Schema({
require
:
true
,
default
:
0
},
status
:
{
//
论坛状态,1启用,0禁用
status
:
{
//
文章状态,1启用,0禁用,2需审核
type
:
Number
,
require
:
true
,
default
:
1
...
...
app/models/forumUser.js
View file @
090e0b51
...
...
@@ -15,8 +15,7 @@ var ForumUserSchema = new Schema({
require
:
true
},
nickName
:
{
//用户昵称,这里直接存放用户的nickname
type
:
String
,
require
:
true
type
:
String
},
displayName
:
{
//自定义显示名称
type
:
String
...
...
@@ -33,10 +32,6 @@ var ForumUserSchema = new Schema({
require
:
true
,
default
:
0
},
role
:
{
//用户角色
type
:
Schema
.
Types
.
ObjectId
,
require
:
true
}
status
:
{
//用户状态1,正常,2黑名单
type
:
Number
,
require
:
true
,
...
...
config/config.js
View file @
090e0b51
...
...
@@ -14,7 +14,7 @@ var config = {
uri
:
'114.215.206.32:27018'
username
:
''
,
password
:
''
,
dbname
:
'pis
cr
m'
,
dbname
:
'pis
ns-foru
m'
,
poolSize
:
5
}
},
...
...
@@ -29,7 +29,7 @@ var config = {
uri
:
'114.215.206.32:27018'
username
:
''
,
password
:
''
,
dbname
:
'
sandbox
'
,
dbname
:
'
pisns-forum
'
,
poolSize
:
5
}
...
...
@@ -42,10 +42,10 @@ var config = {
},
port
:
3011
,
mongo
:
{
uri
:
'10.1
65.15.168
:27017'
uri
:
'10.1
73.226.96
:27017'
username
:
'future'
,
password
:
'future123456'
,
dbname
:
'pis
cr
m'
,
dbname
:
'pis
ns-foru
m'
,
poolSize
:
50
}
}
...
...
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