feat(37需求): 注销账号

This commit is contained in:
luying
2023-04-18 16:45:39 +08:00
parent 9ac643f6fb
commit 1c18565c8d
7 changed files with 56 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
import { nowSeconds } from 'app/pubUtils/timeUtil';
import { RoleType } from '../../db/Role';
import { ServerlistType } from '../../db/Serverlist';
@@ -55,6 +56,8 @@ export class ServerParamWithRole extends ServerParam {
spine: number; // 形象
lv: number; // 等级
updatedAt: Date;
isClose: boolean; // 是否已经注销
closeTime: number; // 注销生效时间
constructor(role: RoleType, server: ServerlistType) {
super(server);
@@ -68,5 +71,7 @@ export class ServerParamWithRole extends ServerParam {
this.spine = role.spine;
this.lv = role.lv;
this.updatedAt = role.updatedAt;
this.isClose = role.closeTime > 0 && role.closeTime < nowSeconds();
this.closeTime = role.closeTime||0;
}
}