Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 567470372f | |||
| 674f7dd5f5 | |||
| f50333d223 | |||
| a7f73eb96a | |||
| 57b4791a4a | |||
| 7737b8b4d2 | |||
| 2f2388caab | |||
| ff0f873dd8 | |||
| 7bf15cce48 | |||
| 643c5cc695 | |||
| 8b2b31ef3f |
@@ -91,3 +91,17 @@ type CallStat struct {
|
||||
func (CallStat) TableName() string {
|
||||
return "gc_call_stats"
|
||||
}
|
||||
|
||||
type Breakdown struct {
|
||||
ClientConversationId string `gorm:"primaryKey;index"`
|
||||
InterpreterConversationId string `gorm:"index"`
|
||||
Timestamp time.Time `gorm:"primaryKey;index"`
|
||||
Task string `gorm:"primaryKey"`
|
||||
Duration int
|
||||
Message string
|
||||
Metadata *string `gorm:"type:json"`
|
||||
}
|
||||
|
||||
func (Breakdown) TableName() string {
|
||||
return "gc_call_breakdown"
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ type AnalyticsConversationWithoutAttributes struct {
|
||||
DivisionIds []string `json:"divisionIds"`
|
||||
Participants []struct {
|
||||
ParticipantId string `json:"participantId"`
|
||||
UserId string `json:"userId"`
|
||||
ParticipantName string `json:"participantName"`
|
||||
Purpose string `json:"purpose"`
|
||||
ExternalContactId string `json:"externalContactId"`
|
||||
@@ -183,3 +184,22 @@ type NotificationConversationWithAttributes struct {
|
||||
SecurePause bool `json:"securePause"`
|
||||
UtilizationLabelId string `json:"utilizationLabelId"`
|
||||
}
|
||||
|
||||
type UsersQuery struct {
|
||||
Entities []GCUser `json:"entities"`
|
||||
PageSize int `json:"pageSize"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
type GCUser struct {
|
||||
Id string `json:"id" gorm:"primaryKey"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
State string `json:"state"`
|
||||
Username string `json:"username"`
|
||||
AcdAutoAnswer bool `json:"acdAutoAnswer"`
|
||||
}
|
||||
|
||||
func (GCUser) TableName() string {
|
||||
return "gc_users"
|
||||
}
|
||||
|
||||
@@ -17,11 +17,14 @@ type DBParticipant struct {
|
||||
Name *string `gorm:"index"`
|
||||
Purpose *string `gorm:"index"`
|
||||
QueueId *string
|
||||
UserId *string
|
||||
Wrapup *string `gorm:"type:json"`
|
||||
WrapupExpected *bool
|
||||
WrapupRequired *bool
|
||||
|
||||
Sessions []DBSession `gorm:"foreignKey:ParticipantId;references:Id"`
|
||||
Calls []DBCall `gorm:"foreignKey:ParticipantId;references:Id"`
|
||||
User *GCUser `gorm:"foreignKey:UserId;references:Id"`
|
||||
}
|
||||
|
||||
func (DBParticipant) TableName() string {
|
||||
|
||||
@@ -49,13 +49,14 @@ func ExtractWithoutAttributes(base models.AnalyticsConversationWithoutAttributes
|
||||
for _, p := range base.Participants {
|
||||
|
||||
participant := models.DBParticipant{
|
||||
ConnectedTime: nil,
|
||||
ConversationId: base.ConversationId,
|
||||
EndTime: nil,
|
||||
// ConnectedTime: nil,
|
||||
ConversationId: base.ConversationId,
|
||||
// EndTime: nil,
|
||||
ExternalContactId: &p.ExternalContactId,
|
||||
Id: p.ParticipantId,
|
||||
Name: &p.ParticipantName,
|
||||
Purpose: &p.Purpose,
|
||||
UserId: &p.UserId,
|
||||
}
|
||||
participants = append(participants, participant)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user