This commit is contained in:
2025-08-21 17:26:40 +02:00
parent 58ed59cd12
commit 095a4d0c69
96 changed files with 1070 additions and 10 deletions

View File

@@ -0,0 +1,39 @@
module crm
import base
import freeflowuniverse.herolib.data.ourtime
// CallStatus represents the status of a call
pub enum CallStatus {
planned
held
not_held
canceled
}
// CallDirection represents the direction of a call
pub enum CallDirection {
outbound
inbound
}
// Call represents a phone call in the CRM system
pub struct Call {
base.Base // Base struct for common fields (id u32, creation_time, mod_time)
pub mut:
name string
status CallStatus
direction CallDirection
date_start ourtime.OurTime
duration u32 // Duration in minutes
description string
parent_type string // Can be 'Account', 'Contact', 'Lead', 'Opportunity', 'Case'
parent_id u32 // Reference to the parent entity
account_id u32 // Reference to Account
contact_id u32 // Reference to Contact
lead_id u32 // Reference to Lead
phone_number string
recording_url string // Optional
assigned_user_id u32 // Reference to User
created_by_id u32 // Reference to User
}