40 lines
1.1 KiB
V
40 lines
1.1 KiB
V
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
|
|
}
|