55 lines
1.7 KiB
Go
55 lines
1.7 KiB
Go
|
|
package dto
|
||
|
|
|
||
|
|
import "time"
|
||
|
|
|
||
|
|
type CollarAddRecipientRequest struct {
|
||
|
|
BroadcastID int `json:"broadcast_id"`
|
||
|
|
TemplateID int `json:"template_id"`
|
||
|
|
Details CollarDetails `json:"details"`
|
||
|
|
Attachment *CollarAttachment `json:"attachment,omitempty"`
|
||
|
|
Labels map[string]string `json:"labels,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type CollarDetails struct {
|
||
|
|
Recipient string `json:"recipient"`
|
||
|
|
Message string `json:"message"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type CollarAttachment struct {
|
||
|
|
Type string `json:"type"`
|
||
|
|
Caption string `json:"caption"`
|
||
|
|
File string `json:"file"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type CollarAPIResponse struct {
|
||
|
|
Success bool `json:"success"`
|
||
|
|
Message string `json:"message"`
|
||
|
|
Data CollarResponseData `json:"data"`
|
||
|
|
Errors map[string][]string `json:"errors,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type CollarResponseData struct {
|
||
|
|
BroadcastID int `json:"broadcast_id"`
|
||
|
|
RecipientDetailID int64 `json:"recipient_detail_id"`
|
||
|
|
Recipient string `json:"recipient"`
|
||
|
|
Status string `json:"status"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type CollarRecipientDetailResponse struct {
|
||
|
|
Success bool `json:"success"`
|
||
|
|
Message string `json:"message"`
|
||
|
|
Data CollarRecipientDetailData `json:"data"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type CollarRecipientDetailData struct {
|
||
|
|
ID int64 `json:"id"`
|
||
|
|
BroadcastID int `json:"broadcast_id"`
|
||
|
|
Recipient string `json:"recipient"`
|
||
|
|
TemplateID int `json:"template_id"`
|
||
|
|
Status string `json:"status"` // pending, sent, delivered, read, failed
|
||
|
|
ErrorMessage *string `json:"error_message"`
|
||
|
|
SentAt *time.Time `json:"sent_at"`
|
||
|
|
DeliveredAt *time.Time `json:"delivered_at"`
|
||
|
|
ReadAt *time.Time `json:"read_at"`
|
||
|
|
}
|