协议修改:增加热度值和收藏时间

This commit is contained in:
chen wei bo
2025-10-08 13:39:14 +08:00
parent 7489206537
commit 8b4f2d7262
8 changed files with 2827 additions and 59 deletions
@@ -9,27 +9,33 @@ export class GirlFavorabilityData extends BaseData {
private id: number;
// 星级
private star: number;
// 收藏时间,时间戳,秒,0: 表示还没收藏
private bookmarkTime: number;
constructor() {
super();
this.id = 0;
this.star = 0;
this.bookmarkTime = 0;
}
public reset(): void {
this.id = 0;
this.star = 0;
this.bookmarkTime = 0;
}
public clear(): void {
this.id = 0;
this.star = 0;
this.bookmarkTime = 0;
}
public destroy(): void {
super.destroy();
this.id = null;
this.star = null;
this.bookmarkTime = null;
}
/** 获取 id */
@@ -51,4 +57,20 @@ export class GirlFavorabilityData extends BaseData {
public setStar(value: number): void {
this.star = value;
}
/** 获取 收藏时间,时间戳,秒 */
public getBookmarkTime(): number {
return this.bookmarkTime;
}
/** 保存 收藏时间,时间戳,秒 */
public setBookmarkTime(value: number): void {
this.bookmarkTime = value;
// logger.log("设置角色 ", this.id, " 的收藏时间:", this.bookmarkTime);
}
/** 是否已经收藏 */
public isBookmarkGirl(): boolean {
return this.bookmarkTime !== 0;
}
}