我试图根据喜欢和不喜欢获得平均评分 .

wall schema:

var WallSchema = new mongoose.Schema({

user_id:{type:Schema.Types.ObjectId,ref:'User'},

categories_id:[{type:Schema.Types.ObjectId,ref:'Category'}],

wall_text:String,

描述:字符串,

imgpath_walls:String,

likescount:号码,

dislikecount:号码,

question_text:String,

question_options:阵列,

created_at:{type:Number,default:new Date() . getTime()},

评论:[{type:Schema.Types.ObjectId,ref:'comments'}],

updated_at:{type:Number,default:new Date() . getTime()}});

Like schema: var LikeSchema = new mongoose.Schema({

user_id:{type:Schema.Types.ObjectId,ref:'User'},

wall_id:{type:Schema.Types.ObjectId},

像:号码,

不喜欢:号码,

等级:号码,

created_at:{type:Number,default:new Date() . getTime()},

updated_at:{type:Number,default:new Date() . getTime()}});

How can I get average rating based on walls like and dislike?