added and updated models

This commit is contained in:
timurgordon
2025-05-12 01:54:47 +03:00
parent f388fde388
commit 52528ca99f
25 changed files with 734 additions and 182 deletions

View File

@@ -10,20 +10,6 @@ pub enum EventStatus {
tentative
}
// EventColor represents the color categorization of a calendar event
pub enum EventColor {
red
blue
green
yellow
purple
orange
cyan
magenta
gray
custom // For custom color values
}
// EventVisibility represents the visibility setting of a calendar event
pub enum EventVisibility {
public
@@ -41,7 +27,7 @@ pub enum AttendeeResponse {
// Calendar represents a collection of events
pub struct Calendar {
base.Base
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
@@ -74,7 +60,6 @@ pub mut:
attendees []Attendee // List of attendees
organizer u32 // The user (see circle) who created the event
status EventStatus // Status of the event
color EventColor // User-friendly color categorization
reminders []Reminder // Reminders for this event
timezone string // Timezone for this specific event
visibility EventVisibility // Visibility setting for the event

View File

@@ -37,7 +37,7 @@ pub enum SocialPlatformType {
// Contact represents a contact with all their information
pub struct Contact {
base.Base
base.Base // Provides id u32, creation_time, mod_time, comments []u32
pub mut:
name string // Display name of the contact
first_name string
@@ -101,7 +101,7 @@ pub mut:
// ContactGroup represents a group of contacts
pub struct ContactGroup {
base.Base
base.Base // Provides id u32, creation_time, mod_time, comments []u32
pub mut:
name string
description string

View File

@@ -12,29 +12,29 @@ pub enum MessagePriority {
// Message represents an email message that can be used for email as well as chat
pub struct Message {
base.Base // Base struct for common fields
base.Base // Provides id u32, creation_time, mod_time, comments []u32
pub mut:
// Database ID
conversation_id string // ID for grouping messages in the same thread
folder string // The folder this email belongs to (inbox, sent, drafts, etc.)
labels []u16 //from circle config called message (config with name message)
conversation_id string // Grouping ID for messages in the same thread (not an entity foreign key)
folder string // The folder this email belongs to (e.g., inbox, sent, drafts)
labels []u16 // Numeric label codes, defined in 'message' circle configuration
message string // The email body content
attachments []u32// Any file attachment, is in circle
attachments []u32 // List of Attachment.id references, stored in circle
send_time ourtime.OurTime
scheduled_send ourtime.OurTime // Time to send if scheduled
size u32 // Size of the message in bytes
read bool // Whether the email has been read
flagged bool // Whether the email has been flagged/starred
priority MessagePriority // Priority level
size u32 // Size of the message in bytes
read bool // Whether the email has been read
flagged bool // Whether the email has been flagged/starred
priority MessagePriority // Priority level
// Header information
subject string
from []u32 // List of user IDs (or email addresses) who sent the email user needs to exist in circle where we use this
sender []u32
reply_to []u32
to []u32
cc []u32
bcc []u32
in_reply_to u32
draft bool // Whether this is a draft message
from []u32 // List of User.id's who authored the message
sender []u32 // List of User.id's who sent the message (if different from 'from')
reply_to []u32 // List of User.id's to reply to
to []u32 // List of User.id's of primary recipients
cc []u32 // List of User.id's of CC recipients
bcc []u32 // List of User.id's of BCC recipients
in_reply_to_message_id u32? // Optional: Message.id of the message this is a reply to
draft bool // Whether this is a draft message
}