From 4c6eed2e477c2445997344a158375eeed0753cbf Mon Sep 17 00:00:00 2001 From: Frederick Holland Date: Thu, 11 Sep 2025 09:23:03 +1000 Subject: [PATCH] Split out interpreter_count in CallStats model --- models/formatter.go | 42 +++++++++++++++++++++++------------------- models/processed.go | 4 ++-- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/models/formatter.go b/models/formatter.go index 9630faa..ebfd0d9 100644 --- a/models/formatter.go +++ b/models/formatter.go @@ -62,25 +62,29 @@ func (InterpreterConnection) TableName() string { } type CallStat struct { - ClientConversationId string `gorm:"primaryKey;index"` - CallType string `gorm:"index"` - ClientId int `gorm:"index"` - CustomerDnis string - CustomerAni string - SearchStartTime *time.Time - P1ConnectTime time.Time `gorm:"index"` - P1DisconnectTime time.Time `gorm:"index"` - BookingRequestNumber *int `gorm:"index"` - UtsQueue bool - InterpreterCount int - InterpreterConnected bool - ClientDisconnected bool - UtsDuration int - UtsEntries int - Status string - FirstLanguageId int - LastLanguageId int - FirstInterpreter string + ClientConversationId string `gorm:"primaryKey;index"` + CallType string `gorm:"index"` + ClientId int `gorm:"index"` + CustomerDnis string + CustomerAni string + SearchStartTime *time.Time + P1ConnectTime time.Time `gorm:"index"` + P1DisconnectTime time.Time `gorm:"index"` + BookingRequestNumber *int `gorm:"index"` + UtsQueue bool + InterpreterAcceptedCount int + InterpreterAccepted bool + InterpreterConnectedCount int + InterpreterConnected bool + // InterpreterCount int + // InterpreterConnected bool + ClientDisconnected bool + UtsDuration int + UtsEntries int + Status string + FirstLanguageId int + LastLanguageId int + FirstInterpreter string } func (CallStat) TableName() string { diff --git a/models/processed.go b/models/processed.go index 97a5d69..e926d98 100644 --- a/models/processed.go +++ b/models/processed.go @@ -20,7 +20,7 @@ type DBClientProcessed struct { // --- BuggedCall bool Amended bool - CreatedAt time.Time + CreatedAt time.Time `gorm:"autoCreateTime"` ModifiedAt time.Time CustomData *string `gorm:"type:json"` InternalUse *string `gorm:"type:json"` @@ -85,7 +85,7 @@ type DBInterpreterProcessed struct { // --- BuggedCall bool Amended bool - CreatedAt time.Time + CreatedAt time.Time `gorm:"autoCreateTime"` ModifiedAt time.Time CustomData *string `gorm:"type:json"` InternalUse *string `gorm:"type:json"`