hooked up all items on the list settings section
This commit is contained in:
parent
53df349d9f
commit
91173021b2
32 changed files with 578 additions and 178 deletions
2
app/types/api.ts
Normal file
2
app/types/api.ts
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export type ResourceResponse<T> = { data: T }
|
||||
//export type PaginatedResponse<T> = { data: T[]; meta: PaginationMeta; links: Links }
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
export type Collaborator = {
|
||||
id: number,
|
||||
name: string
|
||||
role: number
|
||||
}
|
||||
|
||||
7
app/types/movie-list-group.ts
Normal file
7
app/types/movie-list-group.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import type {MovieList} from "~/types/movie-list";
|
||||
|
||||
export type MovieListGroup = {
|
||||
movie_lists: MovieList[]
|
||||
shared_lists: MovieList[]
|
||||
}
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
import type {Collaborator} from "~/types/collaborator";
|
||||
import type {User} from "~/types/user";
|
||||
import type {Role} from "~/types/role";
|
||||
|
||||
export type MovieListSettings = {
|
||||
listName: string,
|
||||
isPublic: boolean,
|
||||
collaborators: Collaborator[],
|
||||
collaborators: User[],
|
||||
roles: Role[]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
import {type MovieListSettings} from "~/types/movie-list-settings";
|
||||
import type {Movie} from "~/types/movie";
|
||||
import type {User} from "~/types/user";
|
||||
|
||||
export type MovieList = {
|
||||
id: number,
|
||||
id: number
|
||||
name: string
|
||||
is_public: boolean
|
||||
movieListSettings: MovieListSettings
|
||||
owner: string
|
||||
role: string
|
||||
movies: Movie[]
|
||||
collaborators: User[]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import type {MovieCriticScore} from "~/types/movie-critic-score";
|
||||
|
||||
export type Movie = {
|
||||
id: number,
|
||||
id: number
|
||||
title: string
|
||||
year: number
|
||||
imdb_id: string
|
||||
|
|
@ -8,7 +10,7 @@ export type Movie = {
|
|||
plot: string
|
||||
genre: string
|
||||
mpaa_rating: string
|
||||
critic_scores: string
|
||||
critic_scores: Array<MovieCriticScore>
|
||||
poster: string
|
||||
added_by: number
|
||||
}
|
||||
|
|
|
|||
7
app/types/user.ts
Normal file
7
app/types/user.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export type User = {
|
||||
id: number,
|
||||
username: string
|
||||
email: string
|
||||
role: number
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue