From a457849977d6fb2cbc313adb5e909bdb9d84520e Mon Sep 17 00:00:00 2001 From: Frederick Holland Date: Fri, 1 Aug 2025 10:49:27 +1000 Subject: [PATCH] Added all gcq_formatter models in --- models/base_call.go | 2 + models/call_stat.go | 2 + models/formatter.go | 83 ++++++++++++++++++++++++++++++++ models/interpreter_attempt.go | 2 + models/interpreter_connection.go | 2 + 5 files changed, 91 insertions(+) create mode 100644 models/formatter.go diff --git a/models/base_call.go b/models/base_call.go index 7ead2d1..8607368 100644 --- a/models/base_call.go +++ b/models/base_call.go @@ -1,5 +1,6 @@ package models +/* import ( "time" ) @@ -26,3 +27,4 @@ type BaseCall struct { func (BaseCall) TableName() string { return "gc_base_calls" } +*/ diff --git a/models/call_stat.go b/models/call_stat.go index 7b80994..fcbbc0a 100644 --- a/models/call_stat.go +++ b/models/call_stat.go @@ -1,5 +1,6 @@ package models +/* import ( "time" ) @@ -25,3 +26,4 @@ type CallStat struct { func (CallStat) TableName() string { return "gc_call_stats" } +*/ diff --git a/models/formatter.go b/models/formatter.go new file mode 100644 index 0000000..24fa3e7 --- /dev/null +++ b/models/formatter.go @@ -0,0 +1,83 @@ +package models + +import "time" + +type BaseCall struct { + ClientConversationId string `gorm:"primaryKey;index"` + CallType string `gorm:"index"` + GenderPreference string + ClientId int `gorm:"index"` + LanguageId int + CustomerDnis string + CustomerAni string + SearchStartTime *time.Time + P1ConnectTime time.Time `gorm:"index"` + P1DisconnectTime time.Time `gorm:"index"` + P3ConnectTime *time.Time + P3DisconnectTime *time.Time + BookingRequestNumber *int `gorm:"index"` + IvrData *int + UtsEntries int + InterpreterCount int +} + +func (BaseCall) TableName() string { + return "gc_base_calls" +} + +type InterpreterAttempt struct { + InterpreterConversationId string `gorm:"primaryKey;index"` + InterpreterResponseTime time.Time + InterpreterAccepted bool + InterpreterId int `gorm:"index"` + CallType string + CallConnected string + ClientConversationId string `gorm:"index"` + LanguageId int + InterpreterPhone string + ConversationStart time.Time + ConversationEnd time.Time +} + +func (InterpreterAttempt) TableName() string { + return "gc_interpreter_attempts" +} + +type InterpreterConnection struct { + InterpreterConversationId string `gorm:"primaryKey;index"` + InterpreterAccepted bool + InterpreterId int `gorm:"index"` + CallType string + CallConnected string + ClientConversationId string `gorm:"index"` + LanguageId int + InterpreterPhone string + ConferenceStart time.Time + ConferenceEnd time.Time +} + +func (InterpreterConnection) TableName() string { + return "gc_interpreter_connections" +} + +type CallStat struct { + ClientConversationId string `gorm:"primaryKey;index"` + CallType string `gorm:"index"` + ClientId int `gorm:"index"` + CustomerDnis string + CustomerAni string + 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 +} + +func (CallStat) TableName() string { + return "gc_call_stats" +} diff --git a/models/interpreter_attempt.go b/models/interpreter_attempt.go index 3d222ce..cd66284 100644 --- a/models/interpreter_attempt.go +++ b/models/interpreter_attempt.go @@ -1,5 +1,6 @@ package models +/* import ( "time" ) @@ -21,3 +22,4 @@ type InterpreterAttempt struct { func (InterpreterAttempt) TableName() string { return "gc_interpreter_attempts" } +*/ diff --git a/models/interpreter_connection.go b/models/interpreter_connection.go index 828a270..1726822 100644 --- a/models/interpreter_connection.go +++ b/models/interpreter_connection.go @@ -1,5 +1,6 @@ package models +/* import ( "time" ) @@ -20,3 +21,4 @@ type InterpreterConnection struct { func (InterpreterConnection) TableName() string { return "gc_interpreter_connections" } +*/