Compare commits

..

7 Commits

7 changed files with 193 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ type BaseCall struct {
CallType string `gorm:"index"` CallType string `gorm:"index"`
GenderPreference string GenderPreference string
ClientId int `gorm:"index"` ClientId int `gorm:"index"`
LanguageId int
CustomerDnis string CustomerDnis string
CustomerAni string CustomerAni string
SearchStartTime *time.Time SearchStartTime *time.Time

27
models/call_stat.go Normal file
View File

@@ -0,0 +1,27 @@
package models
import (
"time"
)
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"
}

View File

@@ -16,7 +16,7 @@ type AnalyticsConversationWithAttributes struct {
OriginatingDirection string `json:"originatingDirection"` OriginatingDirection string `json:"originatingDirection"`
Participants []struct { Participants []struct {
ExternalContactId string `json:"externalContactId"` ExternalContactId string `json:"externalContactId"`
ParticipantId string `json:"participantId"` ParticipantId string `json:"id"`
ParticipantName string `json:"participantName"` ParticipantName string `json:"participantName"`
Purpose string `json:"purpose"` Purpose string `json:"purpose"`
Sessions []struct { Sessions []struct {

View File

@@ -0,0 +1,23 @@
package models
import (
"time"
)
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"
}

View File

@@ -4,6 +4,144 @@ import (
"time" "time"
) )
type DBClientProcessed struct {
// CALL DETAILS
// ---
ClientConversationId string `gorm:"primaryKey"`
CallType string
GenderPreference string
BookingReference *int
IvrData *int
BillableClient bool
CallOutcome string
// FLAGS / METADATA:
// ---
BuggedCall bool
Amended bool
CreatedAt time.Time
ModifiedAt time.Time
CustomData *string `gorm:"type:json"`
InternalUse *string `gorm:"type:json"`
// LANGUAGE DETAILS:
// ---
LanguageId int
LanguageCrmId string
LanguageName string
// CLIENT DETAILS:
// ---
ClientId int
CustomerDnis string
CustomerAni string
ClientName string
ClientState string
ClientFunding bool
ClientGroupId int
ClientGroupName string
ClientPoReference string
InvoiceConfigCrmId string
InvoiceConfigName string
InvoiceConfigUsed string
ClientCallDuration int
ClientTimeOfDay string
ClientBill float64
ClientRate float64
ClientTaxStatus string
// PARTNER DETAILS:
// ---
PartnerBill float64
ParnterRate float64
// TIMESTAMP DETAILS:
// ---
P1SearchStartTime *time.Time
P1ConnectTime time.Time
P1DisconnectTime time.Time
P3ConnectTime *time.Time
P3DisconnectTime *time.Time
}
func (DBClientProcessed) TableName() string {
return "gc_client_processed"
}
type DBInterpreterProcessed struct {
// CALL DETAILS
// ---
ClientConversationId string
InterpreterConversationId string `gorm:"primaryKey"`
CallType string
GenderPreference string
BookingReference *int
BillableInterpreter bool
BillableTpa bool
// FLAGS / METADATA:
// ---
BuggedCall bool
Amended bool
CreatedAt time.Time
ModifiedAt time.Time
CustomData *string `gorm:"type:json"`
InternalUse *string `gorm:"type:json"`
// LANGUAGE DETAILS:
// ---
LanguageId int
LanguageCrmId string
LanguageName string
// CLIENT DETAILS:
// ---
ClientId int
ClientName string
ClientState string
// INTERPRETER DETAILS:
// ---
InterpreterId int
InterpreterCrmId string
InterpreterName string
InterpreterPhone string
InterpreterGst bool
InterpreterNaatiId string
InterpreterGender string
InterpreterState string
InterpreterPaymentState string
InterpreterEmployer string
InterpreterLanguagePriority int
InterpreterLanguageNaatiLevel int
InterpreterLanguageNaatiDescription string
InterpreterLanguageWtn bool
InterpreterCallDuration int
InterpreterTimeOfDay string
InterpreterPayment float64
InterpreterRate float64
PaymentConfigCrmId string
PaymentConfigName string
PaymentConfigUsed string
// TIMESTAMP DETAILS:
// ---
P1SearchStartTime *time.Time
P1ConnectTime time.Time
P1DisconnectTime time.Time
P2SearchStartTime *time.Time
P2AcceptanceTime time.Time
P2ConferenceTime time.Time
P2DisconnectTime time.Time
}
func (DBInterpreterProcessed) TableName() string {
return "gc_interpreter_processed"
}
/*
type Processed struct { type Processed struct {
ClientConversationId string `gorm:"index"` ClientConversationId string `gorm:"index"`
InterpreterConversationId string `gorm:"primaryKey;index"` InterpreterConversationId string `gorm:"primaryKey;index"`
@@ -43,3 +181,4 @@ type Processed struct {
func (Processed) TableName() string { func (Processed) TableName() string {
return "gc_processed" return "gc_processed"
} }
*/

View File

@@ -8,6 +8,7 @@ type DBQueueLog struct {
Start time.Time `gorm:"index"` Start time.Time `gorm:"index"`
End time.Time `gorm:"index"` End time.Time `gorm:"index"`
Duration float64 Duration float64
NextQueue string
Result string `gorm:"type:json"` Result string `gorm:"type:json"`
} }

View File

@@ -12,7 +12,7 @@ type DBSegment struct {
SegmentEnd time.Time `gorm:"index"` SegmentEnd time.Time `gorm:"index"`
SegmentStart time.Time `gorm:"index"` SegmentStart time.Time `gorm:"index"`
SegmentType string `gorm:"index"` SegmentType string `gorm:"index"`
SessionId string `gorm:"foreignKey"` SessionId string `gorm:"index;foreignKey"`
WrapUpCode string WrapUpCode string
} }