import { z } from 'zod'; export const timeCategorySchema = z.enum([ 'focus', 'meeting', 'break', 'admin', 'learning', 'other', ]); export type TimeCategory = z.infer; export const TIME_CATEGORIES: { value: TimeCategory; label: string }[] = [ { value: 'focus', label: 'Fokus' }, { value: 'meeting', label: 'Meeting' }, { value: 'admin', label: 'Admin' }, { value: 'learning', label: 'Lernen' }, { value: 'break', label: 'Pause' }, { value: 'other', label: 'Sonstiges' }, ]; export const startTimeEntryInput = z.object({ todoId: z.string().uuid().optional(), category: timeCategorySchema.default('focus'), description: z.string().max(200).optional(), }); export type StartTimeEntryInput = z.infer; export const updateTimeEntryInput = z.object({ id: z.string().uuid(), startedAt: z.string().datetime().optional(), endedAt: z.string().datetime().nullable().optional(), todoId: z.string().uuid().nullable().optional(), category: timeCategorySchema.optional(), description: z.string().max(200).nullable().optional(), }); export type UpdateTimeEntryInput = z.infer; export const manualTimeEntryInput = z.object({ startedAt: z.string().datetime(), endedAt: z.string().datetime(), todoId: z.string().uuid().optional(), category: timeCategorySchema.default('focus'), description: z.string().max(200).optional(), }); export type ManualTimeEntryInput = z.infer;