mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-18 10:18:14 +08:00
🏷️ calendar: 添加素材日历接口
接口写完了,可以开始数据清洗了
This commit is contained in:
@@ -28,3 +28,22 @@ export interface DBConfig {
|
|||||||
keyPath: string
|
keyPath: string
|
||||||
indexes: string[]
|
indexes: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 地区的枚举
|
||||||
|
* @enum GameCountry
|
||||||
|
* @since Alpha v0.1.2
|
||||||
|
* @property {string} Mondstadt - 蒙德
|
||||||
|
* @property {string} Liyue - 璃月
|
||||||
|
* @property {string} Inazuma - 稻妻
|
||||||
|
* @property {string} Sumaru - 须弥
|
||||||
|
* @property {string} Unknown - 未知
|
||||||
|
* @returns {GameCountry}
|
||||||
|
*/
|
||||||
|
export enum GameCountry {
|
||||||
|
Mondstadt = "Mondstadt",
|
||||||
|
Liyue = "Liyue",
|
||||||
|
Inazuma = "Inazuma",
|
||||||
|
Sumaru = "Sumaru",
|
||||||
|
Unknown = "Unknown",
|
||||||
|
}
|
||||||
|
|||||||
57
src/interface/Calendar.ts
Normal file
57
src/interface/Calendar.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/**
|
||||||
|
* @file interface Calendar.ts
|
||||||
|
* @description 素材日历接口
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.2
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { type GameCountry } from "./Base";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 素材日历接口
|
||||||
|
* @interface Calendar
|
||||||
|
* @since Alpha v0.1.2
|
||||||
|
* @example Map<Calendar>
|
||||||
|
* @property {number} weekDay - 一周的第几天
|
||||||
|
* @property {CalendarCharacter} characters - 该天的角色相关数据
|
||||||
|
* @property {CalendarWeapon} weapons - 该天的武器相关数据
|
||||||
|
* @returns {Calendar}
|
||||||
|
*/
|
||||||
|
export interface Calendar {
|
||||||
|
weekDay: number
|
||||||
|
characters: Record<GameCountry, CalendarItem>
|
||||||
|
weapons: Record<GameCountry, CalendarItem>
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 单日单秘境的素材日历接口
|
||||||
|
* @interface CalendarItem
|
||||||
|
* @since Alpha v0.1.2
|
||||||
|
* @property {string} area - 地区
|
||||||
|
* @property {string} source - 来源秘境
|
||||||
|
* @todo 后续换成更为完善的类型
|
||||||
|
* @property {MiniMaterial[]} materials - 素材 url
|
||||||
|
* @property {MiniMaterial[]} contents - 角色/武器 url
|
||||||
|
* @returns {CalendarItem}
|
||||||
|
*/
|
||||||
|
export interface CalendarItem {
|
||||||
|
area: string
|
||||||
|
source: string
|
||||||
|
materials: string[]
|
||||||
|
contents: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 材料类型
|
||||||
|
* @interface MiniMaterial
|
||||||
|
* @since Alpha v0.1.2
|
||||||
|
* @property {number} star - 星级,或者说稀有度
|
||||||
|
* @property {string} name - 材料名称
|
||||||
|
* @property {string} url - 材料图片 url
|
||||||
|
* @returns {MiniMaterial}
|
||||||
|
*/
|
||||||
|
export interface MiniMaterial {
|
||||||
|
star: number
|
||||||
|
name: string
|
||||||
|
url: string
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user