Files
18xchat/assets/Scripts/schema/schema.ts
T

488 lines
8.9 KiB
TypeScript
Raw Normal View History

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
import ByteBuf from '../luban/ByteBuf'
2025-08-12 16:08:58 +08:00
export enum Category {
/**
* 熟女
*/
shunv = 0,
/**
* 18岁
*/
eighteen = 1,
/**
* 辣妈
*/
lama = 2,
/**
* 捆绑
*/
kunbang = 3,
/**
* 公众野战
*/
publicfight = 4,
/**
* 卡通
*/
cartoon = 5,
}
export enum PriceType {
/**
* 免费
*/
free = 0,
/**
* 试用
*/
first_time_free = 1,
/**
* 收费
*/
pay = 2,
}
2025-08-12 16:58:02 +08:00
export class Girl {
2025-08-12 16:08:58 +08:00
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
2025-08-12 19:49:50 +08:00
this.nameKey = _buf_.readString()
2025-08-12 16:08:58 +08:00
this.age = _buf_.readString()
this.category = _buf_.readInt()
2025-08-12 19:49:50 +08:00
this.tagKey = _buf_.readString()
2025-08-12 16:08:58 +08:00
this.priceType = _buf_.readInt()
2025-08-12 16:58:02 +08:00
this.avatarPath = _buf_.readString()
this.starCount = _buf_.readInt()
2025-08-12 16:08:58 +08:00
}
/**
* id
*/
readonly id: number
/**
2025-08-12 19:49:50 +08:00
* 名字键
2025-08-12 16:08:58 +08:00
*/
2025-08-12 19:49:50 +08:00
readonly nameKey: string
2025-08-12 16:08:58 +08:00
/**
* 年龄
*/
readonly age: string
/**
* 分类
*/
readonly category: Category
/**
2025-08-12 19:49:50 +08:00
* 标签键
2025-08-12 16:08:58 +08:00
*/
2025-08-12 19:49:50 +08:00
readonly tagKey: string
2025-08-12 16:08:58 +08:00
/**
* 付费类型
*/
readonly priceType: PriceType
2025-08-12 16:58:02 +08:00
/**
* 头像路径
*/
readonly avatarPath: string
/**
* 评价星数
*/
readonly starCount: number
2025-08-12 16:08:58 +08:00
resolve(tables:Tables) {
2025-08-12 16:58:02 +08:00
}
}
export class GirlDetail {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
this.detailDesc = _buf_.readString()
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.pics = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readString(); this.pics.push(_e0);}}
}
/**
* id
*/
readonly id: number
/**
* 自我介绍
*/
readonly detailDesc: string
/**
* 资源列表
*/
readonly pics: string[]
resolve(tables:Tables) {
}
}
2025-08-12 19:49:50 +08:00
export class Language {
constructor(_buf_: ByteBuf) {
this.key = _buf_.readString()
this.languageEn = _buf_.readString()
this.languageCn = _buf_.readString()
this.languageHi = _buf_.readString()
this.languageFr = _buf_.readString()
this.languageDe = _buf_.readString()
}
/**
* key
*/
readonly key: string
readonly languageEn: string
readonly languageCn: string
/**
* 印地语翻译
*/
readonly languageHi: string
/**
* 法语翻译
*/
readonly languageFr: string
/**
* 德语翻译
*/
readonly languageDe: string
resolve(tables:Tables) {
}
}
2025-08-12 16:58:02 +08:00
export class Theme {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
2025-08-12 19:49:50 +08:00
this.key = _buf_.readString()
2025-08-12 16:58:02 +08:00
this.name = _buf_.readString()
this.category = _buf_.readInt()
this.isRelease = _buf_.readBool()
this.path = _buf_.readString()
}
/**
* id
*/
readonly id: number
2025-08-12 19:49:50 +08:00
/**
* 多语言键
*/
readonly key: string
2025-08-12 16:58:02 +08:00
/**
* 主题名称
*/
readonly name: string
/**
* 主题枚举
*/
readonly category: Category
/**
* 是否解锁
*/
readonly isRelease: boolean
/**
* 图片路径
*/
readonly path: string
resolve(tables:Tables) {
2025-08-12 19:49:50 +08:00
2025-08-12 16:08:58 +08:00
}
}
export class vector2 {
constructor(_buf_: ByteBuf) {
this.x = _buf_.readFloat()
this.y = _buf_.readFloat()
}
readonly x: number
readonly y: number
resolve(tables:Tables) {
}
}
export class vector3 {
constructor(_buf_: ByteBuf) {
this.x = _buf_.readFloat()
this.y = _buf_.readFloat()
this.z = _buf_.readFloat()
}
readonly x: number
readonly y: number
readonly z: number
resolve(tables:Tables) {
}
}
export class vector4 {
constructor(_buf_: ByteBuf) {
this.x = _buf_.readFloat()
this.y = _buf_.readFloat()
this.z = _buf_.readFloat()
this.w = _buf_.readFloat()
}
readonly x: number
readonly y: number
readonly z: number
readonly w: number
resolve(tables:Tables) {
}
}
2025-08-12 19:49:50 +08:00
export class TbLanguage {
private _dataMap: Map<string, Language>
private _dataList: Language[]
constructor(_buf_: ByteBuf) {
2025-08-12 19:49:50 +08:00
this._dataMap = new Map<string, Language>()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
2025-08-12 19:49:50 +08:00
let _v: Language
_v = new Language(_buf_)
this._dataList.push(_v)
2025-08-12 19:49:50 +08:00
this._dataMap.set(_v.key, _v)
}
}
2025-08-12 19:49:50 +08:00
getDataMap(): Map<string, Language> { return this._dataMap; }
getDataList(): Language[] { return this._dataList; }
2025-08-12 19:49:50 +08:00
get(key: string): Language | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
2025-08-12 19:49:50 +08:00
2025-08-12 16:08:58 +08:00
export class TbGirls {
2025-08-12 16:58:02 +08:00
private _dataMap: Map<number, Girl>
private _dataList: Girl[]
2025-08-12 16:08:58 +08:00
constructor(_buf_: ByteBuf) {
2025-08-12 16:58:02 +08:00
this._dataMap = new Map<number, Girl>()
2025-08-12 16:08:58 +08:00
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
2025-08-12 16:58:02 +08:00
let _v: Girl
_v = new Girl(_buf_)
2025-08-12 16:08:58 +08:00
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
2025-08-12 16:58:02 +08:00
getDataMap(): Map<number, Girl> { return this._dataMap; }
getDataList(): Girl[] { return this._dataList; }
2025-08-12 16:08:58 +08:00
2025-08-12 16:58:02 +08:00
get(key: number): Girl | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGirlsDetail {
private _dataMap: Map<number, GirlDetail>
private _dataList: GirlDetail[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map<number, GirlDetail>()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
let _v: GirlDetail
_v = new GirlDetail(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, GirlDetail> { return this._dataMap; }
getDataList(): GirlDetail[] { return this._dataList; }
get(key: number): GirlDetail | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbThemes {
private _dataMap: Map<number, Theme>
private _dataList: Theme[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map<number, Theme>()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
let _v: Theme
_v = new Theme(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, Theme> { return this._dataMap; }
getDataList(): Theme[] { return this._dataList; }
get(key: number): Theme | undefined {
2025-08-12 16:08:58 +08:00
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
type ByteBufLoader = (file: string) => ByteBuf
export class Tables {
2025-08-12 19:49:50 +08:00
private _TbLanguage: TbLanguage
get TbLanguage(): TbLanguage { return this._TbLanguage;}
2025-08-12 16:08:58 +08:00
private _TbGirls: TbGirls
get TbGirls(): TbGirls { return this._TbGirls;}
2025-08-12 16:58:02 +08:00
private _TbGirlsDetail: TbGirlsDetail
get TbGirlsDetail(): TbGirlsDetail { return this._TbGirlsDetail;}
private _TbThemes: TbThemes
get TbThemes(): TbThemes { return this._TbThemes;}
static getTableNames(): string[] {
let names: string[] = [];
2025-08-12 19:49:50 +08:00
names.push('tblanguage');
2025-08-12 16:08:58 +08:00
names.push('tbgirls');
2025-08-12 16:58:02 +08:00
names.push('tbgirlsdetail');
names.push('tbthemes');
return names;
}
constructor(loader: ByteBufLoader) {
2025-08-12 19:49:50 +08:00
this._TbLanguage = new TbLanguage(loader('tblanguage'))
2025-08-12 16:08:58 +08:00
this._TbGirls = new TbGirls(loader('tbgirls'))
2025-08-12 16:58:02 +08:00
this._TbGirlsDetail = new TbGirlsDetail(loader('tbgirlsdetail'))
this._TbThemes = new TbThemes(loader('tbthemes'))
2025-08-12 19:49:50 +08:00
this._TbLanguage.resolve(this)
2025-08-12 16:08:58 +08:00
this._TbGirls.resolve(this)
2025-08-12 16:58:02 +08:00
this._TbGirlsDetail.resolve(this)
this._TbThemes.resolve(this)
}
}