44 lines
1.3 KiB
V
44 lines
1.3 KiB
V
module crm
|
|
import base
|
|
|
|
import freeflowuniverse.herolib.data.ourtime
|
|
|
|
// TaskStatus represents the status of a task
|
|
pub enum TaskStatus {
|
|
not_started
|
|
in_progress
|
|
completed
|
|
deferred
|
|
canceled
|
|
}
|
|
|
|
// TaskPriority represents the priority of a task
|
|
pub enum TaskPriority {
|
|
low
|
|
medium
|
|
high
|
|
urgent
|
|
}
|
|
|
|
// Task represents a task or to-do item in the CRM system
|
|
pub struct Task {
|
|
base.Base // Base struct for common fields (id u32, creation_time, mod_time)
|
|
pub mut:
|
|
// id u32 // Removed, provided by base.Base
|
|
name string
|
|
status TaskStatus
|
|
priority TaskPriority
|
|
due_date ourtime.OurTime // Optional
|
|
completed_at ourtime.OurTime // Optional
|
|
description string
|
|
parent_type string // Optional: Can be 'Account', 'Contact', 'Lead', 'Opportunity', 'Case'
|
|
parent_id u32 // Optional: Reference to the parent entity
|
|
account_id u32 // Optional: Reference to Account
|
|
contact_id u32 // Optional: Reference to Contact
|
|
reminder_time ourtime.OurTime // Optional
|
|
// created_at ourtime.OurTime // Removed, provided by base.Base.creation_time
|
|
// updated_at ourtime.OurTime // Removed, provided by base.Base.mod_time
|
|
assigned_user_id u32 // Reference to User
|
|
created_by_id u32 // Reference to User
|
|
}
|