Files
leim-tools/models/Category.ts
2025-04-15 15:34:05 +02:00

17 lines
337 B
TypeScript

import { z } from "zod"
import type { RPGColor } from "./Color"
export interface Category {
id?: number
name: string
color?: RPGColor
}
export const categorySchema = z.object({
category: z.object({
name: z.string(),
color: z.string().default("black"),
}),
calendarId: z.number({ coerce: true }).int().positive()
})