Added category creation interface
This commit is contained in:
@@ -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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user