mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Add collection example
This commit is contained in:
parent
e8c9dfce56
commit
4538d9ce98
@ -1,5 +1,6 @@
|
|||||||
import { t } from "elysia";
|
import { t } from "elysia";
|
||||||
import type { Prettify } from "elysia/dist/types";
|
import type { Prettify } from "elysia/dist/types";
|
||||||
|
import { bubbleImages, duneCollection, registerExamples } from "./examples";
|
||||||
import {
|
import {
|
||||||
ExternalId,
|
ExternalId,
|
||||||
Genre,
|
Genre,
|
||||||
@ -74,3 +75,9 @@ export const SeedCollection = t.Intersect([
|
|||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
export type SeedCollection = Prettify<typeof SeedCollection.static>;
|
export type SeedCollection = Prettify<typeof SeedCollection.static>;
|
||||||
|
|
||||||
|
registerExamples(Collection, {
|
||||||
|
...duneCollection,
|
||||||
|
...duneCollection.translations.en,
|
||||||
|
...bubbleImages,
|
||||||
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { SeedMovie } from "../movie";
|
import type { SeedMovie } from "~/models/movie";
|
||||||
import type { Video } from "../video";
|
import type { Video } from "~/models/video";
|
||||||
|
|
||||||
export const duneVideo: Video = {
|
export const duneVideo: Video = {
|
||||||
id: "c9a0d02e-6b8e-4ac1-b431-45b022ec0708",
|
id: "c9a0d02e-6b8e-4ac1-b431-45b022ec0708",
|
||||||
@ -38,8 +38,8 @@ export const dune: SeedMovie = {
|
|||||||
originalLanguage: "en",
|
originalLanguage: "en",
|
||||||
externalId: {
|
externalId: {
|
||||||
themoviedatabase: {
|
themoviedatabase: {
|
||||||
dataId: "496243",
|
dataId: "438631",
|
||||||
link: "https://www.themoviedb.org/movie/496243",
|
link: "https://www.themoviedb.org/movie/438631-dune",
|
||||||
},
|
},
|
||||||
imdb: {
|
imdb: {
|
||||||
dataId: "tt1160419",
|
dataId: "tt1160419",
|
||||||
|
29
api/src/models/examples/dune-collection.ts
Normal file
29
api/src/models/examples/dune-collection.ts
Normal file
@ -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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
@ -32,3 +32,7 @@ export const registerExamples = <T extends TSchema>(
|
|||||||
|
|
||||||
export * from "./bubble";
|
export * from "./bubble";
|
||||||
export * from "./made-in-abyss";
|
export * from "./made-in-abyss";
|
||||||
|
export * from "./dune-1984";
|
||||||
|
export * from "./dune-2021";
|
||||||
|
export * from "./dune-collection";
|
||||||
|
export * from "./others";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user