♻️ 重新建表以存储新格式数据

This commit is contained in:
目棃
2024-08-16 14:53:02 +08:00
parent 27e22acdf6
commit 68f91035df
9 changed files with 254 additions and 550 deletions

View File

@@ -123,12 +123,12 @@ declare namespace TGApp.Game.Avatar {
* @property {Relic[]} relics - 角色圣遗物信息
* @property {Constellation[]} constellations - 角色命座信息
* @property {Costume[]} costumes - 角色时装信息
* @property {WeaponProp[]} selected_properties - 角色选中属性
* @property {WeaponProp[]} base_properties - 角色基础属性
* @property {WeaponProp[]} extra_properties - 角色额外属性
* @property {WeaponProp[]} element_properties - 角色元素属性
* @property {Prop[]} selected_properties - 角色选中属性
* @property {Prop[]} base_properties - 角色基础属性
* @property {Prop[]} extra_properties - 角色额外属性
* @property {Prop[]} element_properties - 角色元素属性
* @property {Skill[]} skills - 角色技能信息
* @property {RelicRecommendProp[]} recommend_relic_properties - 推荐圣遗物属性
* @property {RelicRecommendProp} recommend_relic_property - 推荐圣遗物属性
* @return DetailList
*/
interface DetailList {
@@ -137,12 +137,12 @@ declare namespace TGApp.Game.Avatar {
relics: Relic[];
constellations: Constellation[];
costumes: Costume[];
selected_properties: WeaponProp[];
base_properties: WeaponProp[];
extra_properties: WeaponProp[];
element_properties: WeaponProp[];
selected_properties: Prop[];
base_properties: Prop[];
extra_properties: Prop[];
element_properties: Prop[];
skills: Skill[];
recommend_relic_properties: RelicRecommendProp[];
recommend_relic_property: RelicRecommendProp;
}
/**
@@ -159,8 +159,8 @@ declare namespace TGApp.Game.Avatar {
* @property {string} type_name - 武器类型名称
* @property {string} desc - 武器描述
* @property {number} affix_level - 武器精炼等级
* @property {WeaponProp} main_property - 武器主属性
* @property {WeaponProp} sub_property - 武器副属性
* @property {Prop} main_property - 武器主属性
* @property {Prop} sub_property - 武器副属性
* @return WeaponDetail
*/
interface WeaponDetail {
@@ -174,21 +174,21 @@ declare namespace TGApp.Game.Avatar {
type_name: string;
desc: string;
affix_level: number;
main_property: WeaponProp;
sub_property: WeaponProp;
main_property: Prop;
sub_property: Prop;
}
/**
* @description 角色详情武器属性数据类型
* @interface WeaponProp
* @interface Prop
* @since Beta v0.5.3
* @property {number} property_type - 属性类型
* @property {string} base - 基础属性
* @property {string} add - 附加属性
* @property {string} final - 最终属性
* @return WeaponProp
* @return Prop
*/
interface WeaponProp {
interface Prop {
property_type: number;
base: string;
add: string;

View File

@@ -1,12 +1,12 @@
/**
* @file types/Sqlite/Character.d.ts
* @description 角色相关类型定义文件
* @since Alpha v0.2.0
* @since Beta v0.5.3
*/
/**
* @namespace TGApp.Sqlite.Character
* @since Alpha v0.2.0
* @since Beta v0.5.3
* @description 角色相关类型定义命名空间
* @memberof TGApp.Sqlite
*/
@@ -40,157 +40,71 @@ declare namespace TGApp.Sqlite.Character {
/**
* @description 用户角色列表的角色类型
* @since Alpha v0.2.1
* @since Beta v0.5.3
* @interface UserRole
* @property {number} uid - 用户 ID
* @property {number} cid - 角色 ID
* @property {string} img - 全身像
* @property {string} name - 角色名称
* @property {number} fetter - 角色好感
* @property {number} level - 角色等级
* @property {string} element - 角色元素类型
* @property {number} star - 角色星级
* @property {RoleWeapon} weapon - 角色武器类型 // 数据库中以字符串形式存储
* @property {RoleReliquary[]} reliquary - 角色圣遗物套装 // 数据库中以字符串形式存储
* @property {RoleConstellation[]} constellation - 角色命座 // 数据库中以字符串形式存储
* @property {number} activeConstellation - 角色激活命座
* @property {RoleCostume} costume - 角色时装 // 数据库中以字符串形式存储
* @property {RoleTalent[]} talent - 角色天赋 // 数据库中以字符串形式存储
* @property {TGApp.Game.Avatar.Avatar} avatar - 角色信息
* @property {TGApp.Game.Avatar.WeaponDetail} weapon - 角色武器信息
* @property {TGApp.Game.Avatar.Relic[]} relics - 角色圣遗物信息
* @property {TGApp.Game.Avatar.Constellation[]} constellations - 角色命之座信息
* @property {TGApp.Game.Avatar.Costume[]} costumes - 角色衣装信息
* @property {TGApp.Game.Avatar.Skill[]} skills - 角色技能信息
* @property {TGApp.Game.Avatar.Prop[]} propSelected - 角色属性信息
* @property {TGApp.Game.Avatar.Prop[]} propBase - 角色基础属性信息
* @property {TGApp.Game.Avatar.Prop[]} propExtra - 角色额外属性信息
* @property {TGApp.Game.Avatar.RelicRecommendProp} propRecommend - 角色推荐属性信息
* @property {string} updated - 数据更新时间
* @return UserRole
*/
interface UserRole {
uid: number;
cid: number;
img: string;
name: string;
fetter: number;
level: number;
element: string;
star: number;
weapon: string;
reliquary: string;
constellation: string;
activeConstellation: number;
costume: string;
talent: string;
avatar: TGApp.Game.Avatar.Avatar;
weapon: TGApp.Game.Avatar.WeaponDetail;
relics: TGApp.Game.Avatar.Relic[];
constellations: TGApp.Game.Avatar.Constellation[];
costumes: TGApp.Game.Avatar.Costume[];
skills: TGApp.Game.Avatar.Skill[];
propSelected: TGApp.Game.Avatar.Prop[];
propBase: TGApp.Game.Avatar.Prop[];
propExtra: TGApp.Game.Avatar.Prop[];
propRecommend: TGApp.Game.Avatar.RelicRecommendProp;
updated: string;
}
/**
* @description 角色列表的武器数据类型
* @since Alpha v0.2.0
* @interface RoleWeapon
* @property {number} id - 武器 ID
* @property {string} name - 武器名称
* @property {string} type - 武器类型
* @property {number} star - 武器星级
* @property {number} level - 武器等级
* @property {number} promote - 武器突破
* @property {string} description - 武器描述
* @property {number} affix - 武器精炼
* @return RoleWeapon
* @description 存于数据库的角色数据
* @since Beta v0.5.3
* @interface UserRoleDB
* @property {number} uid - 用户 ID
* @property {number} cid - 角色 ID
* @property {string} avatar - 角色信息
* @property {string} weapon - 角色武器信息
* @property {string} relics - 角色圣遗物信息
* @property {string} constellations - 角色命之座信息
* @property {string} costumes - 角色衣装信息
* @property {string} skills - 角色技能信息
* @property {string} propSelected - 角色属性信息
* @property {string} propBase - 角色基础属性信息
* @property {string} propExtra - 角色额外属性信息
* @property {string} propRecommend - 角色推荐属性信息
* @property {string} updated - 数据更新时间
* @return UserRoleDB
*/
interface RoleWeapon {
id: number;
name: string;
type: string;
star: number;
level: number;
promote: number;
description: string;
affix: number;
}
/**
* @description 角色列表的圣遗物数据类型
* @since Alpha v0.2.0
* @interface RoleReliquary
* @property {number} id - 圣遗物 ID
* @property {string} name - 圣遗物名称
* @property {number} pos - 圣遗物部位
* @property {string} posName - 圣遗物部位名称
* @property {number} star - 圣遗物星级
* @property {number} level - 圣遗物等级
* @property {string} icon - 圣遗物图标
* @property {number} set.id - 圣遗物套装 ID
* @property {string} set.name - 圣遗物套装名称
* @property {number} set.effect[].active - 圣遗物套装效果激活数量
* @property {string} set.effect[].description - 圣遗物套装效果描述
* @return RoleReliquary
*/
interface RoleReliquary {
id: number;
name: string;
pos: number;
posName: string;
star: number;
level: number;
icon: string;
set: {
id: number;
name: string;
effect: Array<{
active: number;
description: string;
}>;
};
}
/**
* @description 角色列表的命座数据类型
* @since Alpha v0.2.0
* @interface RoleConstellation
* @property {number} id - 命座 ID
* @property {string} name - 命座名称
* @property {string} icon - 命座图标
* @property {string} description - 命座描述
* @property {boolean} active - 命座是否激活
* @property {number} pos - 命座位置
* @return RoleConstellation
*/
interface RoleConstellation {
id: number;
name: string;
icon: string;
description: string;
active: boolean;
pos: number;
}
/**
* @description 角色列表的时装数据类型
* @since Alpha v0.2.0
* @interface RoleCostume
* @property {number} id - 时装 ID
* @property {string} name - 时装名称
* @property {string} icon - 时装图标
* @return RoleCostume
*/
interface RoleCostume {
id: number;
name: string;
icon: string;
}
/**
* @description 角色列表的天赋数据类型
* @since Alpha v0.2.1
* @interface RoleTalent
* @property {number} id - 天赋 ID
* @property {number} pos - 天赋位置
* @property {string} name - 天赋名称
* @property {string} icon - 天赋图标
* @property {number} max - 天赋最大等级
* @property {number} level - 天赋等级
* @return RoleTalent
*/
interface RoleTalent {
id: number;
pos: number;
name: string;
icon: string;
max: number;
level: number;
interface UserRoleDB {
uid: number;
cid: number;
avatar: string;
weapon: string;
relics: string;
constellations: string;
costumes: string;
skills: string;
propSelected: string;
propBase: string;
propExtra: string;
propRecommend: string;
updated: string;
}
}