Files
2025-09-08 16:35:26 +08:00

148 lines
3.1 KiB
TypeScript

/**
* 技师的简要数据
*/
import { BaseData } from "./BaseData";
import proto from 'db://assets/Scripts/proto/proto.pb.js';
export class GirlBriefData extends BaseData {
// id
private id: number;
// 名字键
private nameKey: string;
// 年龄
private age: string;
// 主题枚举
private category: number;
// 标签键
private tagKey: string;
// 付费类型
private priceType: number;
// 购买价格
private price: number;
// VIP能否解锁
private vipUnlock: number;
// 头像路径
private avatarPath: string;
// list头像路径
private listAvatarPath: string;
constructor() {
super();
this.id = 0;
this.nameKey = "";
this.age = "";
this.category = 0;
this.tagKey = "";
this.priceType = 0;
this.price = 0;
this.vipUnlock = 0;
this.avatarPath = "";
this.listAvatarPath = "";
}
public reset(): void {
this.id = 0;
this.nameKey = "";
this.age = "";
this.category = 0;
this.tagKey = "";
this.priceType = 0;
this.price = 0;
this.vipUnlock = 0;
this.avatarPath = "";
this.listAvatarPath = "";
}
public clear(): void {
this.id = 0;
this.nameKey = "";
this.age = "";
this.category = 0;
this.tagKey = "";
this.priceType = 0;
this.price = 0;
this.vipUnlock = 0;
this.avatarPath = "";
this.listAvatarPath = "";
}
public destroy(): void {
super.destroy();
this.id = null;
this.nameKey = null;
this.age = null;
this.category = null;
this.tagKey = null;
this.priceType = null;
this.price = null;
this.vipUnlock = null;
this.avatarPath = null;
this.listAvatarPath = null;
}
/** 保存数据 */
public setData(data: proto.cs.IGirls): void {
if (!data) return;
this.id = data.id;
this.nameKey = data.nameKey;
this.age = data.age;
this.category = data.category;
this.tagKey = data.tagKey;
this.priceType = data.priceType;
this.price = data.price;
this.vipUnlock = data.vipUnlock;
this.avatarPath = data.avatarPath;
this.listAvatarPath = data.listAvatarPath;
}
/** 获取 id */
public getId(): number {
return this.id;
}
/** 获取名字键 */
public getGrilName(): string {
return this.nameKey;
}
/** 获取年龄 */
public getGrilAge(): string {
return this.age;
}
/** 获取主题枚举 */
public getGrilCategory(): number {
return this.category;
}
/** 获取标签键 */
public getGrilTagKey(): string {
return this.tagKey;
}
/** 获取付费类型 */
public getGrilPriceType(): number {
return this.priceType;
}
/** 获取价格 */
public getGrilPrice(): number {
return this.price;
}
/** 获取VIP能否解锁 */
public getGrilVipUnlock(): number {
return this.vipUnlock;
}
/** 获取头像路径 */
public getGrilAvatar(): string {
return this.avatarPath;
}
/** 获取list头像路径 */
public getGrilListAvatar(): string {
return this.listAvatarPath;
}
}