module biz import base import freeflowuniverse.herolib.data.ourtime // EventStatus represents the status of a calendar event pub enum EventStatus { confirmed cancelled tentative } // EventVisibility represents the visibility setting of a calendar event pub enum EventVisibility { public private confidential } // AttendeeResponse represents an attendee's response to an event invitation pub enum AttendeeResponse { accepted declined tentative needs_action } // Calendar represents a collection of events pub struct Calendar { base.Base // Provides id u32, creation_time, mod_time, comments []u32 pub mut: name string // Name of the calendar description string // Description of the calendar color string // Color for the calendar owner_id u32 // User who owns this calendar timezone string // Default timezone for this calendar visibility string // Public, private, etc. shared_with []CalendarShare // Users this calendar is shared with } // CalendarShare represents calendar sharing permissions pub struct CalendarShare { pub mut: user_id u32 // User ID this calendar is shared with permission string // Read, write, owner, etc. } // CalendarEvent represents a calendar event with all its properties pub struct CalendarEvent { base.Base pub mut: calendar_id u32 // ID of the calendar this event belongs to title string // Event title description string // Event details location string // Event location start_time ourtime.OurTime end_time ourtime.OurTime // End time all_day bool // True if it's an all-day event recurrence string // RFC 5545 Recurrence Rule (e.g., "FREQ=DAILY;COUNT=10") attendees []Attendee // List of attendees organizer u32 // The user (see circle) who created the event status EventStatus // Status of the event reminders []Reminder // Reminders for this event timezone string // Timezone for this specific event visibility EventVisibility // Visibility setting for the event attachments []Attachment // Attachments for this event } // Reminder represents a reminder for an event pub struct Reminder { pub mut: event_id u32 // Event this reminder is for time ourtime.OurTime // When to send the reminder method string // How to deliver the reminder (email, notification, etc.) } // Attendee represents an attendee of an event pub struct Attendee { pub mut: contact_id u32 // User ID of the attendee response AttendeeResponse // Attendee's response to the event invitation optional bool // Whether attendance is optional comment string // Attendee's comment } // Attachment represents an attachment for a calendar event pub struct Attachment { pub mut: filename string content_type string hash string // Hash of the attachment data size u32 // Size in bytes }