好友:初步申请到查看链

This commit is contained in:
luying
2021-02-02 14:16:56 +08:00
parent a9e2b79c79
commit 5df5f6ed93
15 changed files with 582 additions and 16 deletions
+61
View File
@@ -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;
}
}