// src/types/calendar.ts

export interface CalendarEvent {
    id: number;
    title: string;
    description?: string | null; // Make optional to match backend base
    start: string; // ISO string format
    end?: string | null; // ISO string format
    location?: string | null; // Make optional
    color?: string | null; // Keep optional
    all_day?: boolean | null; // Add all_day field
    tags?: string[]; // Add optional tags array
    user_id: number; // Add user_id as it's in the response
}

// Type for creating an event (matches backend schema)
export type CalendarEventCreate = {
    title: string;
    description?: string | null;
    start: string; // ISO string format
    end?: string | null; // ISO string format
    location?: string | null;
    color?: string | null;
    all_day?: boolean | null; // Add all_day field
    tags?: string[]; // Add optional tags array
};

// Type for updating an event (matches backend schema)
export type CalendarEventUpdate = {
    title?: string | null;
    description?: string | null;
    start?: string | null; // ISO string format
    end?: string | null; // ISO string format
    location?: string | null;
    color?: string | null;
    all_day?: boolean | null; // Add all_day field
    tags?: string[]; // Add optional tags array
};