model spec
This commit is contained in:
22
specs/models/mcc/calendar.v
Normal file
22
specs/models/mcc/calendar.v
Normal file
@@ -0,0 +1,22 @@
|
||||
module biz
|
||||
import base
|
||||
|
||||
import freeflowuniverse.herolib.data.ourtime
|
||||
|
||||
// CalendarEvent represents a calendar event with all its properties
|
||||
pub struct CalendarEvent {
|
||||
base.Base
|
||||
pub mut:
|
||||
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 []u32 // List of contact id's
|
||||
organizer u32 // The user (see circle) who created the event
|
||||
status string // "CONFIRMED", "CANCELLED", "TENTATIVE" //TODO: make enum
|
||||
color string // User-friendly color categorization, e.g., "red", "blue" //TODO: make enum
|
||||
reminder []ourtime.OurTime // Reminder time before the event
|
||||
}
|
16
specs/models/mcc/contacts.v
Normal file
16
specs/models/mcc/contacts.v
Normal file
@@ -0,0 +1,16 @@
|
||||
module biz
|
||||
import base
|
||||
|
||||
// import freeflowuniverse.herolib.data.ourtime
|
||||
|
||||
|
||||
pub struct Contact {
|
||||
base.Base
|
||||
pub mut:
|
||||
name string // name of the contact as we use in this circle
|
||||
first_name string
|
||||
last_name string
|
||||
email []string
|
||||
tel []string
|
||||
}
|
||||
|
40
specs/models/mcc/message.v
Normal file
40
specs/models/mcc/message.v
Normal file
@@ -0,0 +1,40 @@
|
||||
module biz
|
||||
import base
|
||||
|
||||
import freeflowuniverse.herolib.data.ourtime
|
||||
|
||||
// our attempt to make a message object which can be used for email as well as chat
|
||||
pub struct Message {
|
||||
base.Base // Base struct for common fields
|
||||
pub mut:
|
||||
// Database ID
|
||||
id u32 // Database ID (assigned by DBHandler)
|
||||
message_id string // Unique identifier for the email
|
||||
folder string // The folder this email belongs to (inbox, sent, drafts, etc.)
|
||||
message string // The email body content
|
||||
attachments []Attachment // Any file attachments
|
||||
send_time ourtime.OurTime
|
||||
|
||||
date i64 // Unix timestamp when the email was sent/received
|
||||
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
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// Attachment represents an email attachment
|
||||
pub struct Attachment {
|
||||
pub mut:
|
||||
filename string
|
||||
content_type string
|
||||
hash string // Hash of the attachment data
|
||||
}
|
Reference in New Issue
Block a user