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,53 @@
module crm
import base
import freeflowuniverse.herolib.data.ourtime
// CaseStatus represents the status of a support case
pub enum CaseStatus {
new
assigned
pending
closed
rejected
duplicate
}
// CasePriority represents the priority of a support case
pub enum CasePriority {
low
medium
high
urgent
}
// CaseType represents the type of a support case
pub enum CaseType {
question
incident
problem
feature_request
bug
}
// Case represents a customer support case in the CRM system
pub struct Case {
base.Base // Base struct for common fields (id u32, creation_time, mod_time)
pub mut:
// id u32 // Removed, provided by base.Base
number string // Auto-generated case number (e.g., "C-00001")
name string
status CaseStatus
priority CasePriority
type CaseType
account_id u32 // Reference to Account
contact_id u32 // Reference to Contact
description string
resolution string // Optional
solution string // Optional
resolved_at 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
}