Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 79bea9002e | |||
| 0e72fa1355 | |||
| db89056468 |
@@ -8,7 +8,7 @@ type DBAmendment struct {
|
|||||||
AmendmentColumn string
|
AmendmentColumn string
|
||||||
AmendmentValue string
|
AmendmentValue string
|
||||||
Requestor string
|
Requestor string
|
||||||
RequestedAt time.Time
|
RequestedAt time.Time `gorm:"index"`
|
||||||
Sequence string
|
Sequence string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,3 +105,26 @@ type Breakdown struct {
|
|||||||
func (Breakdown) TableName() string {
|
func (Breakdown) TableName() string {
|
||||||
return "gc_call_breakdown"
|
return "gc_call_breakdown"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CallMetrics struct {
|
||||||
|
ClientConversationId string `gorm:"primaryKey;index"`
|
||||||
|
//
|
||||||
|
TotalDuration int
|
||||||
|
TotalClientResponseDuration int
|
||||||
|
TotalSystemDuration int
|
||||||
|
TotalTalkDuration int
|
||||||
|
//
|
||||||
|
AgentAlertDuration int
|
||||||
|
AgentHoldDuration int
|
||||||
|
AgentTalkDuration int
|
||||||
|
//
|
||||||
|
SearchingDuration int
|
||||||
|
ConfigurationDuration int
|
||||||
|
QueueDuration int
|
||||||
|
//
|
||||||
|
Metadata *string `gorm:"type:json"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (CallMetrics) TableName() string {
|
||||||
|
return "gc_call_metrics"
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package models
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DBParticipant struct {
|
type DBParticipant struct {
|
||||||
@@ -30,3 +32,11 @@ type DBParticipant struct {
|
|||||||
func (DBParticipant) TableName() string {
|
func (DBParticipant) TableName() string {
|
||||||
return "gc_participants"
|
return "gc_participants"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *DBParticipant) BeforeSave(tx *gorm.DB) error {
|
||||||
|
// Convert empty string to nil
|
||||||
|
if p.UserId != nil && *p.UserId == "" {
|
||||||
|
p.UserId = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user