[INT-TYPE-003] Standardize Playlist.id to string everywhere
This commit is contained in:
parent
e4ba1ef215
commit
6aff5a7383
4 changed files with 36 additions and 14 deletions
|
|
@ -268,7 +268,8 @@
|
|||
"description": "Playlist.id doit être string (UUID) partout.",
|
||||
"priority": "P1",
|
||||
"priority_rank": 6,
|
||||
"status": "todo",
|
||||
"status": "completed",
|
||||
"completed_at": "2025-01-27T13:00:00Z",
|
||||
"estimated_hours": 1.5,
|
||||
"side": "frontend_only",
|
||||
"files_to_modify": [
|
||||
|
|
@ -1087,13 +1088,13 @@
|
|||
},
|
||||
"progress_tracking": {
|
||||
"total_tasks": 32,
|
||||
"completed": 5,
|
||||
"completed": 6,
|
||||
"in_progress": 0,
|
||||
"todo": 27,
|
||||
"todo": 26,
|
||||
"blocked": 0,
|
||||
"completion_percentage": 16,
|
||||
"last_updated": "2025-01-27T12:45:00Z",
|
||||
"completion_percentage": 19,
|
||||
"last_updated": "2025-01-27T13:00:00Z",
|
||||
"estimated_completion_date": null,
|
||||
"estimated_hours_remaining": 39.5
|
||||
"estimated_hours_remaining": 38
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,12 @@
|
|||
|
||||
/**
|
||||
* Interface représentant une playlist
|
||||
* INT-TYPE-003: Playlist.id is UUID (string) from backend - always string
|
||||
*/
|
||||
export interface Playlist {
|
||||
// UUID from backend - always string
|
||||
id: string;
|
||||
// UUID from backend - always string
|
||||
user_id: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
|
|
@ -26,10 +29,14 @@ export interface Playlist {
|
|||
|
||||
/**
|
||||
* Interface représentant un track dans une playlist
|
||||
* INT-TYPE-003: All IDs are UUID (string) from backend - always string
|
||||
*/
|
||||
export interface PlaylistTrack {
|
||||
// UUID from backend - always string
|
||||
id: string;
|
||||
// UUID from backend - always string
|
||||
playlist_id: string;
|
||||
// UUID from backend - always string
|
||||
track_id: string;
|
||||
position: number;
|
||||
added_at: string;
|
||||
|
|
|
|||
|
|
@ -123,10 +123,11 @@ export type Track = z.infer<typeof trackSchema>;
|
|||
|
||||
/**
|
||||
* Playlist schema
|
||||
* INT-TYPE-003: Playlist.id is UUID (string) from backend - always string
|
||||
*/
|
||||
export const playlistSchema = z.object({
|
||||
id: uuidSchema,
|
||||
user_id: uuidSchema,
|
||||
id: uuidSchema, // UUID from backend - always string
|
||||
user_id: uuidSchema, // UUID from backend - always string
|
||||
title: z.string().min(1),
|
||||
description: z.string().optional().nullable(),
|
||||
is_public: z.boolean(),
|
||||
|
|
@ -245,11 +246,12 @@ export type Notification = z.infer<typeof notificationSchema>;
|
|||
|
||||
/**
|
||||
* PlaylistTrack schema
|
||||
* INT-TYPE-003: All IDs are UUID (string) from backend - always string
|
||||
*/
|
||||
export const playlistTrackSchema = z.object({
|
||||
id: uuidSchema,
|
||||
playlist_id: uuidSchema,
|
||||
track_id: uuidSchema,
|
||||
id: uuidSchema, // UUID from backend - always string
|
||||
playlist_id: uuidSchema, // UUID from backend - always string
|
||||
track_id: uuidSchema, // UUID from backend - always string
|
||||
position: z.number().int().nonnegative(),
|
||||
added_by: uuidSchema,
|
||||
added_at: isoDateSchema,
|
||||
|
|
@ -261,10 +263,14 @@ export type PlaylistTrack = z.infer<typeof playlistTrackSchema>;
|
|||
/**
|
||||
* PlaylistCollaborator schema
|
||||
*/
|
||||
/**
|
||||
* PlaylistCollaborator schema
|
||||
* INT-TYPE-003: All IDs are UUID (string) from backend - always string
|
||||
*/
|
||||
export const playlistCollaboratorSchema = z.object({
|
||||
id: uuidSchema,
|
||||
playlist_id: uuidSchema,
|
||||
user_id: uuidSchema,
|
||||
id: uuidSchema, // UUID from backend - always string
|
||||
playlist_id: uuidSchema, // UUID from backend - always string
|
||||
user_id: uuidSchema, // UUID from backend - always string
|
||||
role: z.enum(['owner', 'editor', 'viewer']),
|
||||
created_at: isoDateSchema,
|
||||
user: userSchema.optional(),
|
||||
|
|
|
|||
|
|
@ -397,7 +397,9 @@ export interface LibraryState {
|
|||
}
|
||||
|
||||
export interface Playlist {
|
||||
// UUID from backend - always string
|
||||
id: string;
|
||||
// UUID from backend - always string
|
||||
user_id: string;
|
||||
title: string; // Backend uses 'title' in JSON, but column is 'name'
|
||||
description?: string;
|
||||
|
|
@ -415,8 +417,11 @@ export interface Playlist {
|
|||
}
|
||||
|
||||
export interface PlaylistTrack {
|
||||
// UUID from backend - always string
|
||||
id: string;
|
||||
// UUID from backend - always string
|
||||
playlist_id: string;
|
||||
// UUID from backend - always string
|
||||
track_id: string;
|
||||
position: number;
|
||||
added_by: string;
|
||||
|
|
@ -425,8 +430,11 @@ export interface PlaylistTrack {
|
|||
}
|
||||
|
||||
export interface PlaylistCollaborator {
|
||||
// UUID from backend - always string
|
||||
id: string;
|
||||
// UUID from backend - always string
|
||||
playlist_id: string;
|
||||
// UUID from backend - always string
|
||||
user_id: string;
|
||||
role: 'owner' | 'editor' | 'viewer';
|
||||
created_at: string;
|
||||
|
|
|
|||
Loading…
Reference in a new issue