diff --git a/api/src/models/collections.ts b/api/src/models/collections.ts index d62f3632..db393f3e 100644 --- a/api/src/models/collections.ts +++ b/api/src/models/collections.ts @@ -1,5 +1,6 @@ import { t } from "elysia"; import type { Prettify } from "elysia/dist/types"; +import { bubbleImages, duneCollection, registerExamples } from "./examples"; import { ExternalId, Genre, @@ -74,3 +75,9 @@ export const SeedCollection = t.Intersect([ }), ]); export type SeedCollection = Prettify; + +registerExamples(Collection, { + ...duneCollection, + ...duneCollection.translations.en, + ...bubbleImages, +}); diff --git a/api/src/models/examples/dune-2021.ts b/api/src/models/examples/dune-2021.ts index 64f5985f..fa2b017f 100644 --- a/api/src/models/examples/dune-2021.ts +++ b/api/src/models/examples/dune-2021.ts @@ -1,5 +1,5 @@ -import type { SeedMovie } from "../movie"; -import type { Video } from "../video"; +import type { SeedMovie } from "~/models/movie"; +import type { Video } from "~/models/video"; export const duneVideo: Video = { id: "c9a0d02e-6b8e-4ac1-b431-45b022ec0708", @@ -38,8 +38,8 @@ export const dune: SeedMovie = { originalLanguage: "en", externalId: { themoviedatabase: { - dataId: "496243", - link: "https://www.themoviedb.org/movie/496243", + dataId: "438631", + link: "https://www.themoviedb.org/movie/438631-dune", }, imdb: { dataId: "tt1160419", diff --git a/api/src/models/examples/dune-collection.ts b/api/src/models/examples/dune-collection.ts new file mode 100644 index 00000000..c0b636aa --- /dev/null +++ b/api/src/models/examples/dune-collection.ts @@ -0,0 +1,29 @@ +import type { SeedCollection } from "~/models/collections"; + +export const duneCollection: SeedCollection = { + slug: "dune-collection", + translations: { + en: { + name: " Dune Collection", + tagline: "A mythic and emotionally charged hero's journey.", + description: + "The saga of Paul Atreides and his rise to power on the deadly planet Arrakis.", + aliases: [], + tags: ["sci-fi", "adventure", "drama", "action", "epic"], + poster: + "https://image.tmdb.org/t/p/original/wD57HqZ6fXwwDdfQLo4hXLRwGV1.jpg", + thumbnail: + "https://image.tmdb.org/t/p/original/k2ocXnNkmvE6rJomRkExIStFq3v.jpg", + banner: null, + logo: "https://image.tmdb.org/t/p/original/5nDsd3u1c6kDphbtIqkHseLg7HL.png", + }, + }, + genres: ["adventure", "science-fiction"], + rating: 80, + externalId: { + themoviedatabase: { + dataId: "726871", + link: "https://www.themoviedb.org/collection/726871-dune-collection", + }, + }, +}; diff --git a/api/src/models/examples/index.ts b/api/src/models/examples/index.ts index 2fe6e6a8..7bc7a3ba 100644 --- a/api/src/models/examples/index.ts +++ b/api/src/models/examples/index.ts @@ -32,3 +32,7 @@ export const registerExamples = ( export * from "./bubble"; export * from "./made-in-abyss"; +export * from "./dune-1984"; +export * from "./dune-2021"; +export * from "./dune-collection"; +export * from "./others";