Files
evilspins/types/types.ts
valere 34d22b3b17
All checks were successful
Deploy App / build (push) Successful in 43s
Deploy App / deploy (push) Successful in 41s
evilSpins v1
2025-11-04 22:41:41 +01:00

53 lines
1.1 KiB
TypeScript

// types.ts
export type BoxType = 'playlist' | 'compilation' | 'userPlaylist'
export interface Box {
id: string
type: BoxType
name: string
duration: number
tracks?: Track[]
description: string
color2: string
color1: string
color3: string
state: BoxState
// Pour les userPlaylist, on peut ajouter des métadonnées spécifiques
ownerId?: string
isPublic?: boolean
}
export interface Artist {
id: number
name: string
url: string
coverId: string
}
export interface Track {
id: number
order?: number
boxId: string
title: string
artist?: Artist | number | string
start?: number
duration?: number
url: string
coverId?: string
date?: Date
card?: { suit: CardSuit; rank: CardRank }
link?: string
type: BoxType
}
export interface Playlist {
id: number
date: Date
title: string
url: string
filename: string
}
export type BoxState = 'box-hidden' | 'box-list' | 'box-selected'
export type CardSuit = '♠' | '♣' | '♦' | '♥'
export type CardRank = 'A' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | 'J' | 'Q' | 'K'