feat(media-supply): persist favorites with multi-group membership
Move media favorites from client state to PostgreSQL with server-side search and pagination. - Store favorites keyed by (tenant, user, group, resource) so a resource can belong to multiple groups; the 500-resource cap counts distinct resources, not memberships. - Add favorite-group CRUD and group/global removal routes, with silent cleanup of delisted or invisible resources on read. - Serve favorite resource details server-side, 10 per page, with name/ID search; favorites-page removal is group-scoped, resources-page removal is global. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -604,6 +604,29 @@ export interface MediaSupplySearchOptionsResponse {
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface MediaSupplyFavoriteGroupRecord {
|
||||
id: string
|
||||
name: string
|
||||
resource_ids: number[]
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface MediaSupplyFavoriteGroupsResponse {
|
||||
groups: MediaSupplyFavoriteGroupRecord[]
|
||||
initialized: boolean
|
||||
revision: number
|
||||
}
|
||||
|
||||
export interface ListMediaSupplyFavoriteResourcesParams {
|
||||
keyword?: string
|
||||
page?: number
|
||||
}
|
||||
|
||||
export interface CreateMediaSupplyFavoriteGroupRequest {
|
||||
name: string
|
||||
resource_id?: number
|
||||
}
|
||||
|
||||
export interface CreateMediaSupplyOrderRequest {
|
||||
article_id?: number | null
|
||||
model_id: number
|
||||
|
||||
Reference in New Issue
Block a user