添加ip归属地
This commit is contained in:
@@ -327,6 +327,13 @@ export default class Role extends BaseModel {
|
||||
@prop({ required: false })
|
||||
shushuMark: string; // 数数distinctId
|
||||
|
||||
// 最后登录 IP
|
||||
@prop({ required: false })
|
||||
ip: string;
|
||||
|
||||
@prop({ required: false })
|
||||
ipLocation: string;
|
||||
|
||||
public static async findAllByUid(uid: number, getters = false, virtuals = true) {
|
||||
const role: RoleType[] = await RoleModel.find({ 'userInfo.uid': uid }).select('roleId roleName serverId head frame spine heads frames spines lv updatedAt').lean({ getters, virtuals });
|
||||
return role;
|
||||
|
||||
Reference in New Issue
Block a user