Add staff examples

This commit is contained in:
Zoe Roux 2025-03-10 10:22:31 +01:00
parent 43a128ebe8
commit 25f042fbd7
No known key found for this signature in database
3 changed files with 46 additions and 1 deletions

View File

@ -5,7 +5,7 @@ export const duneCollection: SeedCollection = {
translations: { translations: {
en: { en: {
name: " Dune Collection", name: " Dune Collection",
tagline: "A mythic and emotionally charged hero's journey.", tagline: "A mythic and emotionally charged hero journey.",
description: description:
"The saga of Paul Atreides and his rise to power on the deadly planet Arrakis.", "The saga of Paul Atreides and his rise to power on the deadly planet Arrakis.",
aliases: [], aliases: [],

View File

@ -295,4 +295,26 @@ export const madeInAbyss = {
}, },
}, },
], ],
staff: [
{
kind: "actor",
character: {
name: "レグ",
latinName: "Reg",
image: "https://cdn.myanimelist.net/images/characters/4/326001.jpg",
},
staff: {
slug: "mariya-ise",
name: "伊瀬茉莉也",
latinName: "Mariya Ise",
image: "https://cdn.myanimelist.net/images/voiceactors/2/65504.jpg",
externalId: {
themoviedatabase: {
dataId: "1250465",
link: "https://www.themoviedb.org/person/1250465",
},
},
},
},
],
} satisfies SeedSerie; } satisfies SeedSerie;

View File

@ -1,4 +1,5 @@
import { t } from "elysia"; import { t } from "elysia";
import { bubbleImages, madeInAbyss, registerExamples } from "./examples";
import { DbMetadata, ExternalId, Image, Resource, SeedImage } from "./utils"; import { DbMetadata, ExternalId, Image, Resource, SeedImage } from "./utils";
export const Character = t.Object({ export const Character = t.Object({
@ -49,3 +50,25 @@ export const SeedStaff = t.Intersect([
}), }),
]); ]);
export type SeedStaff = typeof SeedStaff.static; export type SeedStaff = typeof SeedStaff.static;
const role = madeInAbyss.staff[0];
registerExamples(SeedStaff, role);
registerExamples(Staff, {
...role.staff,
image: {
id: bubbleImages.poster.id,
source: role.staff.image,
blurhash: bubbleImages.poster.blurhash,
},
});
registerExamples(Role, {
...role,
character: {
...role.character,
image: {
id: bubbleImages.poster.id,
source: role.character.image,
blurhash: bubbleImages.poster.blurhash,
},
},
});