Changed old raw.go into gencloud.go Added GCRaw model
This commit is contained in:
parent
42f9ba2848
commit
abf0d6caf0
@ -13,6 +13,20 @@ type DBAmendment struct {
|
|||||||
Timestamp time.Time
|
Timestamp time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
func (DBConversation) TableName() string {
|
func (DBAmendment) TableName() string {
|
||||||
return "gc_amendments"
|
return "gc_amendments"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type DBAmendmentLog struct {
|
||||||
|
Id int `gorm:"index"`
|
||||||
|
Table string `gorm:"primaryKey;index"`
|
||||||
|
AmendmentColumn string
|
||||||
|
OldValue string
|
||||||
|
NewValue string
|
||||||
|
Requestor string
|
||||||
|
Timestamp time.Time
|
||||||
|
}
|
||||||
|
|
||||||
|
func (DBAmendmentLog) TableName() string {
|
||||||
|
return "gc_amendment_logs"
|
||||||
|
}
|
||||||
|
|||||||
185
models/gencloud.go
Normal file
185
models/gencloud.go
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
package models
|
||||||
|
|
||||||
|
type AnalyticsConversationWithAttributesQuery struct {
|
||||||
|
Conversations []AnalyticsConversationWithAttributes `json:"conversations"`
|
||||||
|
Cursor *string `json:"cursor"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type AnalyticsConversationWithAttributes struct {
|
||||||
|
ConversationEnd string `json:"conversationEnd"`
|
||||||
|
ConversationId string `json:"conversationId"`
|
||||||
|
ConversationStart string `json:"conversationStart"`
|
||||||
|
DivisionIds []string `json:"divisionIds"`
|
||||||
|
ExternalTag string `json:"externalTag"`
|
||||||
|
MediaStatsMinConversationMos float32 `json:"mediaStatsMinConversationMos"`
|
||||||
|
MediaStatsMinConversationRFactor float32 `json:"mediaStatsMinConversationRFactor"`
|
||||||
|
OriginatingDirection string `json:"originatingDirection"`
|
||||||
|
Participants []struct {
|
||||||
|
ExternalContactId string `json:"externalContactId"`
|
||||||
|
ParticipantId string `json:"participantId"`
|
||||||
|
ParticipantName string `json:"participantName"`
|
||||||
|
Purpose string `json:"purpose"`
|
||||||
|
Sessions []struct {
|
||||||
|
ANI string `json:"ani"`
|
||||||
|
Direction string `json:"direction"`
|
||||||
|
DNIS string `json:"dnis"`
|
||||||
|
EdgeId string `json:"edgeId"`
|
||||||
|
MediaType string `json:"mediaType"`
|
||||||
|
ProtocolCallId string `json:"protocolCallId"`
|
||||||
|
Provider string `json:"provider"`
|
||||||
|
Recording bool `json:"recording"`
|
||||||
|
RemoteNameDisplayable string `json:"remoteNameDisplayable"`
|
||||||
|
SessionDnis string `json:"sessionDnis"`
|
||||||
|
SessionId string `json:"sessionId"`
|
||||||
|
MediaEndpointStats []struct {
|
||||||
|
Codecs []string `json:"codecs"`
|
||||||
|
EventTime string `json:"eventTime"`
|
||||||
|
MaxLatencyMs int `json:"maxLatencyMs"`
|
||||||
|
MinMos float32 `json:"minMos"`
|
||||||
|
MinRFactor float32 `json:"minRFactor"`
|
||||||
|
ReceivedPackets int `json:"receivedPackets"`
|
||||||
|
} `json:"mediaEndpointStats"`
|
||||||
|
Metrics []struct {
|
||||||
|
EmitDate string `json:"emitDate"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Value int `json:"value"`
|
||||||
|
} `json:"metrics"`
|
||||||
|
Segments []struct {
|
||||||
|
Conference bool `json:"conference"`
|
||||||
|
DisconnectType string `json:"disconnectType"`
|
||||||
|
Q850ResponseCodes []int `json:"q850ResponseCodes"`
|
||||||
|
SegmentEnd string `json:"segmentEnd"`
|
||||||
|
SegmentStart string `json:"segmentStart"`
|
||||||
|
SegmentType string `json:"segmentType"`
|
||||||
|
WrapUpCode string `json:"wrapUpCode"`
|
||||||
|
} `json:"segments"`
|
||||||
|
} `json:"sessions"`
|
||||||
|
Attributes map[string]any `json:"attributes"`
|
||||||
|
} `json:"participants"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type AnalyticsConversationWithoutAttributesQuery struct {
|
||||||
|
Conversations []AnalyticsConversationWithoutAttributes `json:"conversations"`
|
||||||
|
TotalHits int `json:"totalHits"`
|
||||||
|
}
|
||||||
|
type AnalyticsConversationWithoutAttributes struct {
|
||||||
|
ConversationId string `json:"conversationId"`
|
||||||
|
ConversationStart string `json:"conversationStart"`
|
||||||
|
ConversationEnd string `json:"conversationEnd"`
|
||||||
|
MediaStatsMinConversationMos float32 `json:"mediaStatsMinConversationMos"`
|
||||||
|
MediaStatsMinConversationRFactor float32 `json:"mediaStatsMinConversationRFactor"`
|
||||||
|
OriginatingDirection string `json:"originatingDirection"`
|
||||||
|
DivisionIds []string `json:"divisionIds"`
|
||||||
|
Participants []struct {
|
||||||
|
ParticipantId string `json:"participantId"`
|
||||||
|
ParticipantName string `json:"participantName"`
|
||||||
|
Purpose string `json:"purpose"`
|
||||||
|
ExternalContactId string `json:"externalContactId"`
|
||||||
|
Sessions []struct {
|
||||||
|
MediaType string `json:"mediaType"`
|
||||||
|
SessionId string `json:"sessionId"`
|
||||||
|
ANI string `json:"ani"`
|
||||||
|
Direction string `json:"direction"`
|
||||||
|
DNIS string `json:"dnis"`
|
||||||
|
SessionDNIS string `json:"sessionDnis"`
|
||||||
|
EdgeId string `json:"edgeId"`
|
||||||
|
RemoteNameDisplayable string `json:"remoteNameDisplayable"`
|
||||||
|
Segments []struct {
|
||||||
|
SegmentStart string `json:"segmentStart"`
|
||||||
|
SegmentEnd string `json:"segmentEnd"`
|
||||||
|
WrapUpCode string `json:"wrapUpCode"`
|
||||||
|
DisconnectType string `json:"disconnectType"`
|
||||||
|
SegmentType string `json:"SegmentType"`
|
||||||
|
Q850ResponseCodes []int `json:"q850ResponseCodes"`
|
||||||
|
Conference bool `json:"conference"`
|
||||||
|
} `json:"segments"`
|
||||||
|
Flow struct {
|
||||||
|
EndingLanguage string `json:"endingLanguage"`
|
||||||
|
EntryReason string `json:"entryReason"`
|
||||||
|
EntryType string `json:"entryType"`
|
||||||
|
ExitReason string `json:"exitReason"`
|
||||||
|
FlowId string `json:"flowId"`
|
||||||
|
FlowName string `json:"flowName"`
|
||||||
|
FlowType string `json:"flowType"`
|
||||||
|
FlowVersion string `json:"flowVersion"`
|
||||||
|
StartingLanguage string `json:"startingLanguage"`
|
||||||
|
TransferTargetAddress string `json:"transferTargetAddress"`
|
||||||
|
TransferTargetName string `json:"transferTargetName"`
|
||||||
|
TransferType string `json:"transferType"`
|
||||||
|
} `json:"flow"`
|
||||||
|
Metrics []struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Value int `json:"value"`
|
||||||
|
EmitDate string `json:"emitDate"`
|
||||||
|
} `json:"metrics"`
|
||||||
|
MediaEndpointStats []struct {
|
||||||
|
Codecs []string `json:"codecs"`
|
||||||
|
MinMos float32 `json:"minMos"`
|
||||||
|
MinRFactor float32 `json:"minRFactor"`
|
||||||
|
MaxLatencyMs int `json:"maxLatencyMs"`
|
||||||
|
ReceivedPackets int `json:"receivedPackets"`
|
||||||
|
} `json:"mediaEndpointStats"`
|
||||||
|
Recording bool `json:"recording"`
|
||||||
|
ProtocolCallId string `json:"protocolCallId"`
|
||||||
|
Provider string `json:"provider"`
|
||||||
|
} `json:"sessions"`
|
||||||
|
} `json:"participants"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type NotificationConversationWithAttributes struct {
|
||||||
|
Address string `json:"address"`
|
||||||
|
Divisions []struct {
|
||||||
|
Division struct {
|
||||||
|
Id string `json:"id"`
|
||||||
|
SelfUri string `json:"selfUri"`
|
||||||
|
} `json:"division"`
|
||||||
|
Entities []struct {
|
||||||
|
DateDivisionUpdated string `json:"dateDivisionUpdated"`
|
||||||
|
Id string `json:"id"`
|
||||||
|
SelfUri string `json:"selfUri"`
|
||||||
|
} `json:"entities"`
|
||||||
|
} `json:"divisions"`
|
||||||
|
ExternalTag string `json:"externalTag"`
|
||||||
|
Id string `json:"id"`
|
||||||
|
Participants []struct {
|
||||||
|
Address string `json:"address"`
|
||||||
|
Attributes map[string]any `json:"attributes"`
|
||||||
|
Calls []struct {
|
||||||
|
AfterCallWorkRequired bool `json:"afterCallWorkRequired"`
|
||||||
|
Confined bool `json:"confined"`
|
||||||
|
ConnectedTime string `json:"connectedTime"`
|
||||||
|
Direction string `json:"direction"`
|
||||||
|
DisconnectReasons []struct{} `json:"disconnectReasons"`
|
||||||
|
DisconnectType string `json:"disconnectType"`
|
||||||
|
DisconnectedTime string `json:"disconnectedTime"`
|
||||||
|
Held bool `json:"held"`
|
||||||
|
Id string `json:"id"`
|
||||||
|
InitialState string `json:"initialState"`
|
||||||
|
Muted bool `json:"muted"`
|
||||||
|
Other map[string]any `json:"other"`
|
||||||
|
PeerId string `json:"peerId"`
|
||||||
|
Provider string `json:"provider"`
|
||||||
|
Recording bool `json:"recording"`
|
||||||
|
RecordingState string `json:"recordingState"`
|
||||||
|
SecurePause bool `json:"securePause"`
|
||||||
|
Self map[string]any `json:"self"`
|
||||||
|
State string `json:"state"`
|
||||||
|
} `json:"calls"`
|
||||||
|
ConnectedTime string `json:"connectedTime"`
|
||||||
|
EndTime string `json:"endTime"`
|
||||||
|
ExternalContactId string `json:"externalContactId"`
|
||||||
|
ExternalContactInitialDivisionId string `json:"externalContactInitialDivisionId"`
|
||||||
|
Id string `json:"id"`
|
||||||
|
MediaRoles []string `json:"mediaRoles"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Purpose string `json:"purpose"`
|
||||||
|
QueueId string `json:"queueId"`
|
||||||
|
Wrapup map[string]any `json:"wrapup"`
|
||||||
|
WrapupExpected bool `json:"wrapupExpected"`
|
||||||
|
WrapupRequired bool `json:"wrapupRequired"`
|
||||||
|
} `json:"participants"`
|
||||||
|
RecentTransfers []map[string]any `json:"recentTransfers"`
|
||||||
|
RecordingState string `json:"recordingState"`
|
||||||
|
SecurePause bool `json:"securePause"`
|
||||||
|
UtilizationLabelId string `json:"utilizationLabelId"`
|
||||||
|
}
|
||||||
202
models/raw.go
202
models/raw.go
@ -1,185 +1,27 @@
|
|||||||
package models
|
package models
|
||||||
|
|
||||||
type AnalyticsConversationWithAttributesQuery struct {
|
import "time"
|
||||||
Conversations []AnalyticsConversationWithAttributes `json:"conversations"`
|
|
||||||
Cursor *string `json:"cursor"`
|
type GCRaw struct {
|
||||||
|
ClientConversationId string
|
||||||
|
InterpreterConversationId string
|
||||||
|
LanguageId int
|
||||||
|
CallType string
|
||||||
|
GenderPreference string
|
||||||
|
ClientId int
|
||||||
|
CustomerDnis string
|
||||||
|
CustomerAni string
|
||||||
|
ClientConnectTimeUtc *time.Time
|
||||||
|
ClientDisconnectTimeUtc *time.Time
|
||||||
|
NesConnectTimeUtc *time.Time
|
||||||
|
NesDisconnectTimeUtc *time.Time
|
||||||
|
BookingReference *int
|
||||||
|
IvrData *int
|
||||||
|
InterpreterId int
|
||||||
|
InterpreterConnectTimeUtc time.Time
|
||||||
|
InterpreterDisconnectTimeUtc time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
type AnalyticsConversationWithAttributes struct {
|
func (GCRaw) TableName() string {
|
||||||
ConversationEnd string `json:"conversationEnd"`
|
return "gc_raw"
|
||||||
ConversationId string `json:"conversationId"`
|
|
||||||
ConversationStart string `json:"conversationStart"`
|
|
||||||
DivisionIds []string `json:"divisionIds"`
|
|
||||||
ExternalTag string `json:"externalTag"`
|
|
||||||
MediaStatsMinConversationMos float32 `json:"mediaStatsMinConversationMos"`
|
|
||||||
MediaStatsMinConversationRFactor float32 `json:"mediaStatsMinConversationRFactor"`
|
|
||||||
OriginatingDirection string `json:"originatingDirection"`
|
|
||||||
Participants []struct {
|
|
||||||
ExternalContactId string `json:"externalContactId"`
|
|
||||||
ParticipantId string `json:"participantId"`
|
|
||||||
ParticipantName string `json:"participantName"`
|
|
||||||
Purpose string `json:"purpose"`
|
|
||||||
Sessions []struct {
|
|
||||||
ANI string `json:"ani"`
|
|
||||||
Direction string `json:"direction"`
|
|
||||||
DNIS string `json:"dnis"`
|
|
||||||
EdgeId string `json:"edgeId"`
|
|
||||||
MediaType string `json:"mediaType"`
|
|
||||||
ProtocolCallId string `json:"protocolCallId"`
|
|
||||||
Provider string `json:"provider"`
|
|
||||||
Recording bool `json:"recording"`
|
|
||||||
RemoteNameDisplayable string `json:"remoteNameDisplayable"`
|
|
||||||
SessionDnis string `json:"sessionDnis"`
|
|
||||||
SessionId string `json:"sessionId"`
|
|
||||||
MediaEndpointStats []struct {
|
|
||||||
Codecs []string `json:"codecs"`
|
|
||||||
EventTime string `json:"eventTime"`
|
|
||||||
MaxLatencyMs int `json:"maxLatencyMs"`
|
|
||||||
MinMos float32 `json:"minMos"`
|
|
||||||
MinRFactor float32 `json:"minRFactor"`
|
|
||||||
ReceivedPackets int `json:"receivedPackets"`
|
|
||||||
} `json:"mediaEndpointStats"`
|
|
||||||
Metrics []struct {
|
|
||||||
EmitDate string `json:"emitDate"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
Value int `json:"value"`
|
|
||||||
} `json:"metrics"`
|
|
||||||
Segments []struct {
|
|
||||||
Conference bool `json:"conference"`
|
|
||||||
DisconnectType string `json:"disconnectType"`
|
|
||||||
Q850ResponseCodes []int `json:"q850ResponseCodes"`
|
|
||||||
SegmentEnd string `json:"segmentEnd"`
|
|
||||||
SegmentStart string `json:"segmentStart"`
|
|
||||||
SegmentType string `json:"segmentType"`
|
|
||||||
WrapUpCode string `json:"wrapUpCode"`
|
|
||||||
} `json:"segments"`
|
|
||||||
} `json:"sessions"`
|
|
||||||
Attributes map[string]any `json:"attributes"`
|
|
||||||
} `json:"participants"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type AnalyticsConversationWithoutAttributesQuery struct {
|
|
||||||
Conversations []AnalyticsConversationWithoutAttributes `json:"conversations"`
|
|
||||||
TotalHits int `json:"totalHits"`
|
|
||||||
}
|
|
||||||
type AnalyticsConversationWithoutAttributes struct {
|
|
||||||
ConversationId string `json:"conversationId"`
|
|
||||||
ConversationStart string `json:"conversationStart"`
|
|
||||||
ConversationEnd string `json:"conversationEnd"`
|
|
||||||
MediaStatsMinConversationMos float32 `json:"mediaStatsMinConversationMos"`
|
|
||||||
MediaStatsMinConversationRFactor float32 `json:"mediaStatsMinConversationRFactor"`
|
|
||||||
OriginatingDirection string `json:"originatingDirection"`
|
|
||||||
DivisionIds []string `json:"divisionIds"`
|
|
||||||
Participants []struct {
|
|
||||||
ParticipantId string `json:"participantId"`
|
|
||||||
ParticipantName string `json:"participantName"`
|
|
||||||
Purpose string `json:"purpose"`
|
|
||||||
ExternalContactId string `json:"externalContactId"`
|
|
||||||
Sessions []struct {
|
|
||||||
MediaType string `json:"mediaType"`
|
|
||||||
SessionId string `json:"sessionId"`
|
|
||||||
ANI string `json:"ani"`
|
|
||||||
Direction string `json:"direction"`
|
|
||||||
DNIS string `json:"dnis"`
|
|
||||||
SessionDNIS string `json:"sessionDnis"`
|
|
||||||
EdgeId string `json:"edgeId"`
|
|
||||||
RemoteNameDisplayable string `json:"remoteNameDisplayable"`
|
|
||||||
Segments []struct {
|
|
||||||
SegmentStart string `json:"segmentStart"`
|
|
||||||
SegmentEnd string `json:"segmentEnd"`
|
|
||||||
WrapUpCode string `json:"wrapUpCode"`
|
|
||||||
DisconnectType string `json:"disconnectType"`
|
|
||||||
SegmentType string `json:"SegmentType"`
|
|
||||||
Q850ResponseCodes []int `json:"q850ResponseCodes"`
|
|
||||||
Conference bool `json:"conference"`
|
|
||||||
} `json:"segments"`
|
|
||||||
Flow struct {
|
|
||||||
EndingLanguage string `json:"endingLanguage"`
|
|
||||||
EntryReason string `json:"entryReason"`
|
|
||||||
EntryType string `json:"entryType"`
|
|
||||||
ExitReason string `json:"exitReason"`
|
|
||||||
FlowId string `json:"flowId"`
|
|
||||||
FlowName string `json:"flowName"`
|
|
||||||
FlowType string `json:"flowType"`
|
|
||||||
FlowVersion string `json:"flowVersion"`
|
|
||||||
StartingLanguage string `json:"startingLanguage"`
|
|
||||||
TransferTargetAddress string `json:"transferTargetAddress"`
|
|
||||||
TransferTargetName string `json:"transferTargetName"`
|
|
||||||
TransferType string `json:"transferType"`
|
|
||||||
} `json:"flow"`
|
|
||||||
Metrics []struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
Value int `json:"value"`
|
|
||||||
EmitDate string `json:"emitDate"`
|
|
||||||
} `json:"metrics"`
|
|
||||||
MediaEndpointStats []struct {
|
|
||||||
Codecs []string `json:"codecs"`
|
|
||||||
MinMos float32 `json:"minMos"`
|
|
||||||
MinRFactor float32 `json:"minRFactor"`
|
|
||||||
MaxLatencyMs int `json:"maxLatencyMs"`
|
|
||||||
ReceivedPackets int `json:"receivedPackets"`
|
|
||||||
} `json:"mediaEndpointStats"`
|
|
||||||
Recording bool `json:"recording"`
|
|
||||||
ProtocolCallId string `json:"protocolCallId"`
|
|
||||||
Provider string `json:"provider"`
|
|
||||||
} `json:"sessions"`
|
|
||||||
} `json:"participants"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type NotificationConversationWithAttributes struct {
|
|
||||||
Address string `json:"address"`
|
|
||||||
Divisions []struct {
|
|
||||||
Division struct {
|
|
||||||
Id string `json:"id"`
|
|
||||||
SelfUri string `json:"selfUri"`
|
|
||||||
} `json:"division"`
|
|
||||||
Entities []struct {
|
|
||||||
DateDivisionUpdated string `json:"dateDivisionUpdated"`
|
|
||||||
Id string `json:"id"`
|
|
||||||
SelfUri string `json:"selfUri"`
|
|
||||||
} `json:"entities"`
|
|
||||||
} `json:"divisions"`
|
|
||||||
ExternalTag string `json:"externalTag"`
|
|
||||||
Id string `json:"id"`
|
|
||||||
Participants []struct {
|
|
||||||
Address string `json:"address"`
|
|
||||||
Attributes map[string]any `json:"attributes"`
|
|
||||||
Calls []struct {
|
|
||||||
AfterCallWorkRequired bool `json:"afterCallWorkRequired"`
|
|
||||||
Confined bool `json:"confined"`
|
|
||||||
ConnectedTime string `json:"connectedTime"`
|
|
||||||
Direction string `json:"direction"`
|
|
||||||
DisconnectReasons []struct{} `json:"disconnectReasons"`
|
|
||||||
DisconnectType string `json:"disconnectType"`
|
|
||||||
DisconnectedTime string `json:"disconnectedTime"`
|
|
||||||
Held bool `json:"held"`
|
|
||||||
Id string `json:"id"`
|
|
||||||
InitialState string `json:"initialState"`
|
|
||||||
Muted bool `json:"muted"`
|
|
||||||
Other map[string]any `json:"other"`
|
|
||||||
PeerId string `json:"peerId"`
|
|
||||||
Provider string `json:"provider"`
|
|
||||||
Recording bool `json:"recording"`
|
|
||||||
RecordingState string `json:"recordingState"`
|
|
||||||
SecurePause bool `json:"securePause"`
|
|
||||||
Self map[string]any `json:"self"`
|
|
||||||
State string `json:"state"`
|
|
||||||
} `json:"calls"`
|
|
||||||
ConnectedTime string `json:"connectedTime"`
|
|
||||||
EndTime string `json:"endTime"`
|
|
||||||
ExternalContactId string `json:"externalContactId"`
|
|
||||||
ExternalContactInitialDivisionId string `json:"externalContactInitialDivisionId"`
|
|
||||||
Id string `json:"id"`
|
|
||||||
MediaRoles []string `json:"mediaRoles"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
Purpose string `json:"purpose"`
|
|
||||||
QueueId string `json:"queueId"`
|
|
||||||
Wrapup map[string]any `json:"wrapup"`
|
|
||||||
WrapupExpected bool `json:"wrapupExpected"`
|
|
||||||
WrapupRequired bool `json:"wrapupRequired"`
|
|
||||||
} `json:"participants"`
|
|
||||||
RecentTransfers []map[string]any `json:"recentTransfers"`
|
|
||||||
RecordingState string `json:"recordingState"`
|
|
||||||
SecurePause bool `json:"securePause"`
|
|
||||||
UtilizationLabelId string `json:"utilizationLabelId"`
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user