41 lines
1.7 KiB
V
41 lines
1.7 KiB
V
module biz
|
|
import base
|
|
|
|
import freeflowuniverse.herolib.data.ourtime
|
|
|
|
// MessagePriority represents the priority level of a message
|
|
pub enum MessagePriority {
|
|
low
|
|
normal
|
|
high
|
|
}
|
|
|
|
// Message represents an email message that can be used for email as well as chat
|
|
pub struct Message {
|
|
base.Base // Provides id u32, creation_time, mod_time, comments []u32
|
|
pub mut:
|
|
// Database ID
|
|
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 // 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
|
|
|
|
// Header information
|
|
subject string
|
|
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
|
|
}
|