41 lines
1.3 KiB
V
41 lines
1.3 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 // Base struct for common fields
|
|
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)
|
|
message string // The email body content
|
|
attachments []u32// Any file attachment, is 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 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
|
|
}
|