好友:玩家武将详细信息
This commit is contained in:
@@ -2,7 +2,7 @@ import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType, mongoose, Ref } from '@typegoose/typegoose';
|
||||
import Role, { RoleType } from './Role';
|
||||
import FriendShip, { FriendShipType } from './FriendShip';
|
||||
import { ROLE, POPULATE_TYPE } from '../consts';
|
||||
import { ROLE_SELECT, POPULATE_TYPE } from '../consts';
|
||||
|
||||
export class Relation {
|
||||
@prop({ required: true, default: '' })
|
||||
@@ -47,11 +47,11 @@ export default class FriendRelation extends BaseModel {
|
||||
|
||||
if (populateType == POPULATE_TYPE.FRIEND) {
|
||||
document
|
||||
.populate('friends.role', ROLE.SHOW_SIMPLE, 'Role')
|
||||
.populate('friends.role', ROLE_SELECT.SHOW_SIMPLE, 'Role')
|
||||
.populate('friends.friendShip', null, 'FriendShip');
|
||||
} else if (populateType == POPULATE_TYPE.BLACKLIST) {
|
||||
document
|
||||
.populate('blacklist.role', ROLE.SHOW_SIMPLE, 'Role')
|
||||
.populate('blacklist.role', ROLE_SELECT.SHOW_SIMPLE, 'Role')
|
||||
} else if (populateType == POPULATE_TYPE.FRIENDSHIP) {
|
||||
document.populate('friends.friendShip', null, 'FriendShip');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user