好友:初步申请到查看链
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import { RoleType } from "../../db/Role";
|
||||
import { FriendShipType } from "../../db/FriendShip";
|
||||
|
||||
export class FriendParams {
|
||||
roleId: string;
|
||||
roleName: string;
|
||||
lv: number;
|
||||
headHid: number;
|
||||
sHid: number;
|
||||
ce: number;
|
||||
title: number;
|
||||
|
||||
constructor(role: RoleType) {
|
||||
this.roleId = role.roleId;
|
||||
this.roleName = role.roleName;
|
||||
this.lv = role.lv;
|
||||
this.headHid = role.headHid;
|
||||
this.sHid = role.sHid;
|
||||
this.ce = role.ce;
|
||||
this.title = role.title;
|
||||
}
|
||||
}
|
||||
|
||||
export class FriendApplyParams extends FriendParams {
|
||||
applyCode: string;
|
||||
constructor(applyCode: string, role: RoleType) {
|
||||
super(role);
|
||||
this.applyCode = applyCode;
|
||||
}
|
||||
}
|
||||
|
||||
export class FriendListParam extends FriendParams {
|
||||
guildName: string = "";
|
||||
isOnline: boolean = false;
|
||||
quitTime: number = 0;
|
||||
friendValue: number = 0;
|
||||
friendLv: number = 1;
|
||||
canReceive: boolean = false;
|
||||
canSend: boolean = false;
|
||||
|
||||
constructor(role: RoleType, friendship: FriendShipType) {
|
||||
super(role);
|
||||
if(role.guildName) this.guildName = role.guildName;
|
||||
this.quitTime = role.quitTime;
|
||||
|
||||
this.friendLv = friendship.friendLv;
|
||||
this.friendValue = friendship.friendValue;
|
||||
}
|
||||
|
||||
setOnline(isOnline: boolean) {
|
||||
this.isOnline = isOnline;
|
||||
}
|
||||
|
||||
setCanReceive(canReceive: boolean) {
|
||||
this.canReceive = canReceive;
|
||||
}
|
||||
|
||||
setCanSend(canSend: boolean) {
|
||||
this.canSend = canSend;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user