Commit b95efeaa authored by 刘文胜's avatar 刘文胜

111

parent 4de68b8f
...@@ -25,7 +25,9 @@ module.exports = function(app) { ...@@ -25,7 +25,9 @@ module.exports = function(app) {
}; };
function moderatorOperateLog(forumUser,thread,type){ function moderatorOperateLog(forumUser,thread,type){
var ent_code= thread.ent_code;
var forumModerator = new ForumModerator({ var forumModerator = new ForumModerator({
ent_code:ent_code
info:thread.info, info:thread.info,
userName:thread.from.nickName || thread.from.displayName, userName:thread.from.nickName || thread.from.displayName,
content:thread._id, content:thread._id,
......
...@@ -3,15 +3,19 @@ ...@@ -3,15 +3,19 @@
var mongoose = require('mongoose'), var mongoose = require('mongoose'),
Schema = mongoose.Schema; Schema = mongoose.Schema;
var ForumModeratorSchema=new Schema({ var ForumModeratorSchema=new Schema({
ent_code:{
type: Number,
require: true
},
info: { info: {
type: Schema.Types.ObjectId, type: Schema.Types.ObjectId,
require: true, require: false,
index: true, index: true,
ref: 'ForumInfo' ref: 'ForumInfo'
}, },
userName:{ userName:{
type:String, type:String,
require: true require: false
}, },
content:{ content:{
type:Schema.Types.ObjectId, type:Schema.Types.ObjectId,
...@@ -19,11 +23,15 @@ var ForumModeratorSchema=new Schema({ ...@@ -19,11 +23,15 @@ var ForumModeratorSchema=new Schema({
}, },
behavior:{//行为:1.加精 2.取消精华 3.删帖 behavior:{//行为:1.加精 2.取消精华 3.删帖
type: Number, type: Number,
require: true require: false
}, },
moderatorName:{ moderatorName:{
type:String, type:String,
require:true require:false
},
created:{
type:Date,
default: Date.now
} }
}, { }, {
'collection': 'pisns_forum_moderator_operation' 'collection': 'pisns_forum_moderator_operation'
......
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