Compare commits

..

7 Commits

7 changed files with 104 additions and 18 deletions

View File

@@ -9,23 +9,9 @@ type DBAmendment struct {
AmendmentValue string
Requestor string
RequestedAt time.Time
Sequence string
}
func (DBAmendment) TableName() string {
return "gc_amendments"
}
type DBAmendmentLog struct {
Id int `gorm:"primaryKey;autoIncrement"`
ConversationId string `gorm:"index"`
AmendmentColumn string
OldValue string
NewValue string
Requestor string
RequestedAt time.Time
AmendedAt time.Time
}
func (DBAmendmentLog) TableName() string {
return "gc_amendment_logs"
}

View File

@@ -1,5 +1,6 @@
package models
/*
import (
"time"
)
@@ -26,3 +27,4 @@ type BaseCall struct {
func (BaseCall) TableName() string {
return "gc_base_calls"
}
*/

View File

@@ -1,5 +1,6 @@
package models
/*
import (
"time"
)
@@ -25,3 +26,4 @@ type CallStat struct {
func (CallStat) TableName() string {
return "gc_call_stats"
}
*/

92
models/formatter.go Normal file
View File

@@ -0,0 +1,92 @@
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
Status string
}
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
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 {
return "gc_call_stats"
}

View File

@@ -1,5 +1,6 @@
package models
/*
import (
"time"
)
@@ -21,3 +22,4 @@ type InterpreterAttempt struct {
func (InterpreterAttempt) TableName() string {
return "gc_interpreter_attempts"
}
*/

View File

@@ -1,5 +1,6 @@
package models
/*
import (
"time"
)
@@ -20,3 +21,4 @@ type InterpreterConnection struct {
func (InterpreterConnection) TableName() string {
return "gc_interpreter_connections"
}
*/

View File

@@ -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"`
@@ -54,7 +54,7 @@ type DBClientProcessed struct {
// PARTNER DETAILS:
// ---
PartnerBill float64
ParnterRate float64
PartnerRate float64
// TIMESTAMP DETAILS:
// ---
@@ -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"`