Skip to content

Commit

Permalink
Merge pull request #2058 from MahtabBukhari/Implement_TicketMessage_S…
Browse files Browse the repository at this point in the history
…tructure_for_WebSocket_Communication_in_Back_End

Implement TicketMessage Structure for WebSocket Communication in Back End
  • Loading branch information
humansinstitute authored Dec 3, 2024
2 parents 324ec48 + 9d5b0a9 commit 3b261f4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions db/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,30 @@ type Tickets struct {
UpdatedAt time.Time `gorm:"type:timestamp;default:current_timestamp" json:"updated_at"`
}

type BroadcastType string

const (
PoolBroadcast BroadcastType = "pool"

DirectBroadcast BroadcastType = "direct"
)

type ActionType string

const (
ProcessAction ActionType = "process"

MessageAction ActionType = "message"
)

type TicketMessage struct {
BroadcastType BroadcastType `json:"broadcastType"`
SourceSessionID string `json:"sourceSessionID"`
Message string `json:"message"`
Action ActionType `json:"action"`
TicketDetails Tickets `json:"ticketDetails"`
}

func (Person) TableName() string {
return "people"
}
Expand Down

0 comments on commit 3b261f4

Please sign in to comment.