chore: initialize frontend miniapp repository
This commit is contained in:
100
src/types/index.ts
Normal file
100
src/types/index.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* 类型定义文件
|
||||
*/
|
||||
|
||||
// 展品类型
|
||||
export interface Exhibit {
|
||||
id: string
|
||||
name: string
|
||||
artist?: string
|
||||
year?: string
|
||||
material?: string
|
||||
size?: string
|
||||
hall: string
|
||||
hallId: string
|
||||
floor: string
|
||||
image?: string
|
||||
description: string
|
||||
hasAudio: boolean
|
||||
audioUrl?: string
|
||||
position: Position
|
||||
}
|
||||
|
||||
// 展厅类型
|
||||
export interface Hall {
|
||||
id: string
|
||||
name: string
|
||||
floor: string
|
||||
description: string
|
||||
image?: string
|
||||
exhibitCount: number
|
||||
area: string
|
||||
openTime: string
|
||||
position: Position
|
||||
}
|
||||
|
||||
// 设施类型
|
||||
export interface Facility {
|
||||
id: string
|
||||
name: string
|
||||
type: 'restroom' | 'cafe' | 'shop' | 'exit' | 'elevator' | 'info'
|
||||
floor: string
|
||||
openTime: string
|
||||
location: string
|
||||
description?: string
|
||||
position: Position
|
||||
}
|
||||
|
||||
// 楼层类型
|
||||
export interface Floor {
|
||||
id: string
|
||||
name: string
|
||||
label: string
|
||||
order: number
|
||||
halls: string[]
|
||||
facilities: string[]
|
||||
}
|
||||
|
||||
// 路线类型
|
||||
export interface Route {
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
duration: string
|
||||
distance: string
|
||||
stopCount: number
|
||||
difficulty: 'easy' | 'medium' | 'hard'
|
||||
stops: RouteStop[]
|
||||
}
|
||||
|
||||
// 路线站点类型
|
||||
export interface RouteStop {
|
||||
id: string
|
||||
order: number
|
||||
name: string
|
||||
type: 'exhibit' | 'hall' | 'facility'
|
||||
description: string
|
||||
duration: string
|
||||
}
|
||||
|
||||
// 位置类型
|
||||
export interface Position {
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
|
||||
// POI 标记类型
|
||||
export interface POIMarker {
|
||||
id: string
|
||||
position: Position
|
||||
label: string
|
||||
type: 'exhibit' | 'hall' | 'facility' | 'location'
|
||||
showLabel: boolean
|
||||
}
|
||||
|
||||
// 搜索结果类型
|
||||
export interface SearchResult {
|
||||
exhibits: Exhibit[]
|
||||
halls: Hall[]
|
||||
facilities: Facility[]
|
||||
}
|
||||
Reference in New Issue
Block a user