feat: Replace Meetings with Calendar - events with types and assigned users
- Rename meetings table to events with type field (meeting/event) - Add eventUsers junction table for user assignments - Members see only events they're assigned to - Calendar endpoint returns events + todos for month - Add migration SQL for database changes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -171,3 +171,22 @@ export const updateTimeEntrySchema = z.object({
|
||||
companyId: optionalUuid('Neplatný formát company ID'),
|
||||
description: optionalDescription,
|
||||
});
|
||||
|
||||
// Event validators
|
||||
export const createEventSchema = z.object({
|
||||
title: z.string().min(1, 'Názov je povinný'),
|
||||
description: z.string().optional(),
|
||||
type: z.enum(['meeting', 'event']).default('meeting'),
|
||||
start: z.string().min(1, 'Začiatok je povinný'),
|
||||
end: z.string().min(1, 'Koniec je povinný'),
|
||||
assignedUserIds: z.array(z.string().uuid('Neplatný formát user ID')).optional(),
|
||||
});
|
||||
|
||||
export const updateEventSchema = z.object({
|
||||
title: z.string().min(1).optional(),
|
||||
description: z.string().optional(),
|
||||
type: z.enum(['meeting', 'event']).optional(),
|
||||
start: z.string().optional(),
|
||||
end: z.string().optional(),
|
||||
assignedUserIds: z.array(z.string().uuid('Neplatný formát user ID')).optional(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user