Added category creation interface

This commit is contained in:
Alexis
2025-04-15 15:34:05 +02:00
parent c25c10f7b7
commit 58f3783b13
12 changed files with 285 additions and 32 deletions

View File

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