Added DBTicket (from Go version of zoho_desk_sync)

This commit is contained in:
Frederick Holland 2025-08-01 10:13:18 +10:00
parent 24d4ab7bd0
commit 1872e23ec1

View File

@ -2,6 +2,73 @@ package models
import "time" import "time"
type DBTicket struct {
AccountId int
ApprovalCount int
Assignee string `gorm:"type:json"`
AssigneeId int
AttachmentCount int
Category string
CF string `gorm:"type:json"`
Channel string
ChannelCode string
ChannelRelatedInfo string
Classification string
ClosedTime *time.Time
CommentCount int
Contact string `gorm:"type:json"`
ContactId int
CreatedBy int
CreatedTime time.Time
CustomerResponseTime time.Time
DepartmentId int
DescAttachments string `gorm:"type:json"`
Description string
DueDate *time.Time
Email string
EntitySkills string `gorm:"type:json"`
FirstThread string `gorm:"type:json"`
FollowerCount int
Id string `gorm:"primaryKey"`
IsArchived bool
IsDeleted bool
IsEscalated bool
IsOverdue bool
IsResponseOverdue bool
IsSpam bool
IsTrashed bool
Language string
LayoutDetails string `gorm:"type:json"`
LayoutId int
ModifiedBy int
ModifiedTime time.Time
OnHoldTime *time.Time
Phone string
Priority string
ProductId string
Resolution string
ResponseDueDate *time.Time
SecondaryContacts string `gorm:"type:json"`
Sentiment string
SharedDepartments string `gorm:"type:json"`
Source string `gorm:"type:json"`
Status string
StatusType string
SubCategory string
Subject string
TagCount int
TaskCount int
TeamId int
ThreadCount int
TicketNumber int
TimeEntryCount int
WebUrl string
}
func (DBTicket) TableName() string {
return "zoho_live_tickets"
}
type Ticket struct { type Ticket struct {
TicketID string `gorm:"primaryKey;column:ticket_id" json:"ticket_id"` TicketID string `gorm:"primaryKey;column:ticket_id" json:"ticket_id"`
TicketReferenceID *string `gorm:"column:ticket_reference_id" json:"ticket_reference_id"` TicketReferenceID *string `gorm:"column:ticket_reference_id" json:"ticket_reference_id"`