fgo-ta-com-website/src/content/config.ts

29 lines
675 B
TypeScript
Raw Normal View History

2024-01-09 14:30:28 +01:00
import { z, defineCollection } from 'astro:content'
const taInfo = defineCollection({
type: 'data',
schema: z.object({
info: z.object({
title: z.string(),
questReleaseDate: z.string().transform((str) => new Date(str)),
2024-01-09 14:30:28 +01:00
shortdescription: z.string(),
description: z.string(),
fightNumber: z.number().default(1),
}),
data: z.array(
z.object({
title: z.string(),
link: z.string().url(),
date: z.string().transform((str) => new Date(str)),
2024-01-09 14:30:28 +01:00
servant: z.string(),
turns: z.string(),
runner: z.string(),
})
),
}),
})
export const collections = {
taInfoData: taInfo,
}