feat: now-playing polling from Record API with station mapping and WebSocket broadcast
This commit is contained in:
@@ -35,20 +35,21 @@ model MagicLinkToken {
|
||||
}
|
||||
|
||||
model Station {
|
||||
id String @id @default(cuid())
|
||||
stationId Int @unique @map("station_id")
|
||||
name String
|
||||
prefix String
|
||||
streamUrl String @map("stream_url")
|
||||
coverUrl String? @map("cover_url")
|
||||
genre String?
|
||||
tags String[]
|
||||
sortOrder Int @map("sort_order")
|
||||
source String // "record" | "local"
|
||||
isOnline Boolean @default(true) @map("is_online")
|
||||
lastCheckAt DateTime? @map("last_check_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
id String @id @default(cuid())
|
||||
stationId Int @unique @map("station_id")
|
||||
name String
|
||||
prefix String
|
||||
streamUrl String @map("stream_url")
|
||||
coverUrl String? @map("cover_url")
|
||||
genre String?
|
||||
tags String[]
|
||||
sortOrder Int @map("sort_order")
|
||||
source String @default("local") // "record" | "local"
|
||||
isOnline Boolean @default(true) @map("is_online")
|
||||
lastCheckAt DateTime? @map("last_check_at")
|
||||
recordStationId Int? @unique @map("record_station_id")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
favorites UserFavorite[]
|
||||
history PlayHistory[]
|
||||
@@ -56,6 +57,7 @@ model Station {
|
||||
|
||||
@@index([isOnline])
|
||||
@@index([source])
|
||||
@@index([recordStationId])
|
||||
@@map("stations")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user