//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
import ByteBuf from '../luban/ByteBuf'
export enum Category {
/**
* 熟女
*/
shunv = 0,
/**
* 20s
*/
twenty = 1,
/**
* 辣妈
*/
lama = 2,
/**
* 捆绑
*/
kunbang = 3,
/**
* 公众野战
*/
publicfight = 4,
/**
* 卡通
*/
cartoon = 5,
/**
* 未完成
*/
upcomming = 6,
}
export enum PriceType {
/**
* 免费
*/
free = 0,
/**
* 试用
*/
first_time_free = 1,
/**
* 收费
*/
pay = 2,
}
export enum VideoEmotion {
calm_down = 0,
arousal = 1,
desire = 2,
passion = 3,
orgasm = 4,
}
export class AiCharacters {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
this.basePrompt = _buf_.readString()
this.additionPrompt = _buf_.readString()
}
/**
* 角色id
*/
readonly id: number
/**
* 个人信息基础prompt(聊天&评分都需要)
*/
readonly basePrompt: string
/**
* 额外信息prompt(聊天&评分都需要)
*/
readonly additionPrompt: string
resolve(tables:Tables) {
}
}
export class Girls {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
this.nameKey = _buf_.readString()
this.age = _buf_.readString()
this.category = _buf_.readInt()
this.tagKey = _buf_.readString()
this.priceType = _buf_.readInt()
this.price = _buf_.readInt()
this.vipUnlock = _buf_.readInt()
this.avatarPath = _buf_.readString()
this.listAvatarPath = _buf_.readString()
}
/**
* id
*/
readonly id: number
/**
* 名字键
*/
readonly nameKey: string
/**
* 年龄
*/
readonly age: string
/**
* 分类
*/
readonly category: Category
/**
* 标签键
*/
readonly tagKey: string
/**
* 付费类型
*/
readonly priceType: PriceType
/**
* 购买价格
*/
readonly price: number
/**
* VIP能否解锁
*/
readonly vipUnlock: number
/**
* 头像路径
*/
readonly avatarPath: string
/**
* 头像路径
*/
readonly listAvatarPath: string
resolve(tables:Tables) {
}
}
export class GirlsDetail {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
this.detailDesc = _buf_.readString()
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.commercialImages = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = new purchase.CommercialImage(_buf_); this.commercialImages.push(_e0);}}
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.commercialVideos = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = new purchase.CommercialVideo(_buf_); this.commercialVideos.push(_e0);}}
}
/**
* id
*/
readonly id: number
/**
* 自我介绍
*/
readonly detailDesc: string
/**
* 类型
*/
readonly commercialImages: purchase.CommercialImage[]
/**
* 视频资源列表
*/
readonly commercialVideos: purchase.CommercialVideo[]
resolve(tables:Tables) {
for (let _e of this.commercialImages) { _e?.resolve(tables); }
for (let _e of this.commercialVideos) { _e?.resolve(tables); }
}
}
export class GlobalConfig {
constructor(_buf_: ByteBuf) {
this.ApiKey = _buf_.readString()
this.emotionApiKey = _buf_.readString()
this.Model = _buf_.readString()
this.Temperature = _buf_.readFloat()
this.MaxTokens = _buf_.readInt()
this.Timeout = _buf_.readInt()
this.FreeChatTimes = _buf_.readInt()
this.GameName = _buf_.readString()
this.EmotionRating = _buf_.readString()
this.girlBasePrompt = _buf_.readString()
this.dailyRecommendGirl = _buf_.readInt()
}
/**
* api键
*/
readonly ApiKey: string
/**
* 情绪判断机器人api
*/
readonly emotionApiKey: string
/**
* ai模型
*/
readonly Model: string
readonly Temperature: number
/**
* 单次聊天最大token
*/
readonly MaxTokens: number
/**
* 超时时间(微秒)
*/
readonly Timeout: number
/**
* 单个角色免费聊天次数
*/
readonly FreeChatTimes: number
/**
* 游戏名
*/
readonly GameName: string
/**
* 情绪评分机器人system_prompt,需拼接角色prompt
*/
readonly EmotionRating: string
/**
* ai机器人基础规则
*/
readonly girlBasePrompt: string
/**
* 每日推荐技师ID,参见:girls.id
*/
readonly dailyRecommendGirl: number
resolve(tables:Tables) {
}
}
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) {
}
}
export namespace purchase {
export class CommercialImage {
constructor(_buf_: ByteBuf) {
this.imageType = _buf_.readInt()
this.imagePrice = _buf_.readFloat()
this.path = _buf_.readString()
}
/**
* 1=详情页展示
2=聊天触发
*/
readonly imageType: number
/**
* 价格
*/
readonly imagePrice: number
/**
* 资源路径
*/
readonly path: string
resolve(tables:Tables) {
}
}
}
export namespace purchase {
export class CommercialVideo {
constructor(_buf_: ByteBuf) {
this.path = _buf_.readString()
this.emotion = _buf_.readInt()
this.videoPrice = _buf_.readFloat()
}
/**
* 资源路径
*/
readonly path: string
/**
* 关联情绪
*/
readonly emotion: VideoEmotion
/**
* 价格
*/
readonly videoPrice: number
resolve(tables:Tables) {
}
}
}
export class PurchaseConfig {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
this.name = _buf_.readString()
this.desc = _buf_.readString()
this.count = _buf_.readInt()
}
/**
* 商品id
*/
readonly id: number
/**
* 名称
*/
readonly name: string
/**
* 数量
*/
readonly desc: string
/**
* 计费点ID
*/
readonly count: number
resolve(tables:Tables) {
}
}
export class Themes {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
this.key = _buf_.readString()
this.name = _buf_.readString()
this.category = _buf_.readInt()
this.isRelease = _buf_.readBool()
this.path = _buf_.readString()
}
/**
* id
*/
readonly id: number
/**
* 多语言键
*/
readonly key: string
/**
* 主题名称
*/
readonly name: string
/**
* 主题枚举
*/
readonly category: Category
/**
* 是否解锁
*/
readonly isRelease: boolean
/**
* 图片路径
*/
readonly path: string
resolve(tables:Tables) {
}
}
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) {
}
}
export class TbLanguage {
private _dataMap: Map
private _dataList: Language[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
let _v: Language
_v = new Language(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.key, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): Language[] { return this._dataList; }
get(key: string): Language | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGirls {
private _dataMap: Map
private _dataList: Girls[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
let _v: Girls
_v = new Girls(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): Girls[] { return this._dataList; }
get(key: number): Girls | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGirlsDetail {
private _dataMap: Map
private _dataList: GirlsDetail[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
let _v: GirlsDetail
_v = new GirlsDetail(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): GirlsDetail[] { return this._dataList; }
get(key: number): GirlsDetail | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbThemes {
private _dataMap: Map
private _dataList: Themes[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
let _v: Themes
_v = new Themes(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): Themes[] { return this._dataList; }
get(key: number): Themes | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbAiCharacters {
private _dataMap: Map
private _dataList: AiCharacters[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
let _v: AiCharacters
_v = new AiCharacters(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): AiCharacters[] { return this._dataList; }
get(key: number): AiCharacters | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGlobalConfig {
private _data: GlobalConfig
constructor(_buf_: ByteBuf) {
if (_buf_.readInt() != 1) throw new Error('table mode=one, but size != 1')
this._data = new GlobalConfig(_buf_)
}
getData(): GlobalConfig { return this._data; }
/**
* api键
*/
get ApiKey(): string { return this._data.ApiKey; }
/**
* 情绪判断机器人api
*/
get emotionApiKey(): string { return this._data.emotionApiKey; }
/**
* ai模型
*/
get Model(): string { return this._data.Model; }
get Temperature(): number { return this._data.Temperature; }
/**
* 单次聊天最大token
*/
get MaxTokens(): number { return this._data.MaxTokens; }
/**
* 超时时间(微秒)
*/
get Timeout(): number { return this._data.Timeout; }
/**
* 单个角色免费聊天次数
*/
get FreeChatTimes(): number { return this._data.FreeChatTimes; }
/**
* 游戏名
*/
get GameName(): string { return this._data.GameName; }
/**
* 情绪评分机器人system_prompt,需拼接角色prompt
*/
get EmotionRating(): string { return this._data.EmotionRating; }
/**
* ai机器人基础规则
*/
get girlBasePrompt(): string { return this._data.girlBasePrompt; }
/**
* 每日推荐技师ID,参见:girls.id
*/
get dailyRecommendGirl(): number { return this._data.dailyRecommendGirl; }
resolve(tables:Tables) {
this._data.resolve(tables)
}
}
export class TbPurchaseConfig {
private _dataMap: Map
private _dataList: PurchaseConfig[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
let _v: PurchaseConfig
_v = new PurchaseConfig(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map { return this._dataMap; }
getDataList(): PurchaseConfig[] { return this._dataList; }
get(key: number): PurchaseConfig | undefined {
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 {
private _TbLanguage: TbLanguage
get TbLanguage(): TbLanguage { return this._TbLanguage;}
private _TbGirls: TbGirls
get TbGirls(): TbGirls { return this._TbGirls;}
private _TbGirlsDetail: TbGirlsDetail
get TbGirlsDetail(): TbGirlsDetail { return this._TbGirlsDetail;}
private _TbThemes: TbThemes
get TbThemes(): TbThemes { return this._TbThemes;}
private _TbAiCharacters: TbAiCharacters
get TbAiCharacters(): TbAiCharacters { return this._TbAiCharacters;}
private _TbGlobalConfig: TbGlobalConfig
get TbGlobalConfig(): TbGlobalConfig { return this._TbGlobalConfig;}
private _TbPurchaseConfig: TbPurchaseConfig
get TbPurchaseConfig(): TbPurchaseConfig { return this._TbPurchaseConfig;}
static getTableNames(): string[] {
let names: string[] = [];
names.push('tblanguage');
names.push('tbgirls');
names.push('tbgirlsdetail');
names.push('tbthemes');
names.push('tbaicharacters');
names.push('tbglobalconfig');
names.push('tbpurchaseconfig');
return names;
}
constructor(loader: ByteBufLoader) {
this._TbLanguage = new TbLanguage(loader('tblanguage'))
this._TbGirls = new TbGirls(loader('tbgirls'))
this._TbGirlsDetail = new TbGirlsDetail(loader('tbgirlsdetail'))
this._TbThemes = new TbThemes(loader('tbthemes'))
this._TbAiCharacters = new TbAiCharacters(loader('tbaicharacters'))
this._TbGlobalConfig = new TbGlobalConfig(loader('tbglobalconfig'))
this._TbPurchaseConfig = new TbPurchaseConfig(loader('tbpurchaseconfig'))
this._TbLanguage.resolve(this)
this._TbGirls.resolve(this)
this._TbGirlsDetail.resolve(this)
this._TbThemes.resolve(this)
this._TbAiCharacters.resolve(this)
this._TbGlobalConfig.resolve(this)
this._TbPurchaseConfig.resolve(this)
}
}