Added UserId to participant model

This commit is contained in:
Frederick Holland 2025-10-19 19:16:41 +11:00
parent 643c5cc695
commit 7bf15cce48
3 changed files with 6 additions and 3 deletions

View File

@ -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"`

View File

@ -17,6 +17,7 @@ type DBParticipant struct {
Name *string `gorm:"index"`
Purpose *string `gorm:"index"`
QueueId *string
UserId *string
Wrapup *string `gorm:"type:json"`
WrapupExpected *bool
WrapupRequired *bool

View File

@ -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)