Officially documented release
This commit is contained in:
@@ -2,6 +2,17 @@ package models
|
||||
|
||||
import "time"
|
||||
|
||||
// DBTicket is a model that stores Ticket records from Zoho Desk.
|
||||
//
|
||||
// - The intention of the model is to map JSON -> struct -> JSON
|
||||
//
|
||||
// Table Schema:
|
||||
//
|
||||
// Primary Key: Id
|
||||
// Indexes: Id
|
||||
// JSON Fields: Assignee, CF, Contact, DescAttachment, EntitySkills, FirstThread, LayoutDetails, SecondaryContacts, SharedDepartments, Source
|
||||
//
|
||||
// NOTE: CF stands for Custom Fields and stores all layout fields that are not in this struct (this struct contains only the defaults).
|
||||
type DBTicket struct {
|
||||
AccountId int
|
||||
ApprovalCount int
|
||||
@@ -68,67 +79,3 @@ type DBTicket struct {
|
||||
func (DBTicket) TableName() string {
|
||||
return "zoho_live_tickets"
|
||||
}
|
||||
|
||||
type Ticket struct {
|
||||
TicketID string `gorm:"primaryKey;column:ticket_id" json:"ticket_id"`
|
||||
TicketReferenceID *string `gorm:"column:ticket_reference_id" json:"ticket_reference_id"`
|
||||
DepartmentID *string `gorm:"column:department_id" json:"department_id"`
|
||||
AccountID *string `gorm:"column:account_id" json:"account_id"`
|
||||
ContactID *string `gorm:"column:contact_id" json:"contact_id"`
|
||||
Email *string `gorm:"column:email" json:"email"`
|
||||
Phone *string `gorm:"column:phone" json:"phone"`
|
||||
Subject *string `gorm:"column:subject" json:"subject"`
|
||||
Description *string `gorm:"column:description" json:"description"`
|
||||
Status *string `gorm:"column:status" json:"status"`
|
||||
ProductID *string `gorm:"column:product_id" json:"product_id"`
|
||||
TicketOwnerID *string `gorm:"column:ticket_owner_id" json:"ticket_owner_id"`
|
||||
CreatedBy *string `gorm:"column:created_by" json:"created_by"`
|
||||
ModifiedBy *string `gorm:"column:modified_by" json:"modified_by"`
|
||||
CreatedTime *time.Time `gorm:"column:created_time" json:"created_time"`
|
||||
OnHoldTime *time.Time `gorm:"column:on_hold_time" json:"on_hold_time"`
|
||||
ClosedTime *time.Time `gorm:"column:closed_time" json:"closed_time"`
|
||||
ModifiedTime *time.Time `gorm:"column:modified_time" json:"modified_time"`
|
||||
TeamID *string `gorm:"column:team_id" json:"team_id"`
|
||||
DueDate *time.Time `gorm:"column:due_date" json:"due_date"`
|
||||
Tags *string `gorm:"column:tags" json:"tags"`
|
||||
Priority *string `gorm:"column:priority" json:"priority"`
|
||||
IsOverdue *bool `gorm:"column:is_overdue" json:"is_overdue"`
|
||||
IsEscalated *bool `gorm:"column:is_escalated" json:"is_escalated"`
|
||||
Classification *string `gorm:"column:classification" json:"classification"`
|
||||
Resolution *string `gorm:"column:resolution" json:"resolution"`
|
||||
TimeToRespond *int `gorm:"column:time_to_respond" json:"time_to_respond"`
|
||||
Category *string `gorm:"column:category" json:"category"`
|
||||
Subcategory *string `gorm:"column:subcategory" json:"subcategory"`
|
||||
Subclassification *string `gorm:"column:subclassification" json:"subclassification"`
|
||||
BookingNumber *int `gorm:"column:booking_number" json:"booking_number"`
|
||||
CostCode *string `gorm:"column:cost_code" json:"cost_code"`
|
||||
LanguageRequired *string `gorm:"column:language_required" json:"language_required"`
|
||||
TimeZone *string `gorm:"column:time_zone" json:"time_zone"`
|
||||
DeliveryMethod *string `gorm:"column:delivery_method" json:"delivery_method"`
|
||||
DurationInMinutes *int `gorm:"column:duration_in_minutes" json:"duration_in_minutes"`
|
||||
InterpreterID *int `gorm:"column:interpreter_id" json:"interpreter_id"`
|
||||
InterpreterEmail *string `gorm:"column:interpreter_email" json:"interpreter_email"`
|
||||
InterpreterName *string `gorm:"column:interpreter_name" json:"interpreter_name"`
|
||||
ClientID *int `gorm:"column:client_id" json:"client_id"`
|
||||
ClientName *string `gorm:"column:client_name" json:"client_name"`
|
||||
InterpreterNaati *int `gorm:"column:interpreter_naati" json:"interpreter_naati"`
|
||||
SecondaryInterpreterID *int `gorm:"column:secondary_interpreter_id" json:"secondary_interpreter_id"`
|
||||
PayCycle *int `gorm:"column:pay_cycle" json:"pay_cycle"`
|
||||
BookingTime *time.Time `gorm:"column:booking_time" json:"booking_time"`
|
||||
BillingGroup *string `gorm:"column:billing_group" json:"billing_group"`
|
||||
VideoLink *string `gorm:"column:video_link" json:"video_link"`
|
||||
ConversationID *string `gorm:"column:conversation_id" json:"conversation_id"`
|
||||
DNIS *string `gorm:"column:dnis" json:"dnis"`
|
||||
ClientAgentName *string `gorm:"column:client_agent_name" json:"client_agent_name"`
|
||||
ClientAgentPhone *string `gorm:"column:client_agent_phone" json:"client_agent_phone"`
|
||||
ClientAgentEmail *string `gorm:"column:client_agent_email" json:"client_agent_email"`
|
||||
BillingCode *string `gorm:"column:billing_code" json:"billing_code"`
|
||||
MBIEFeedback *string `gorm:"column:mbie_feedback" json:"mbie_feedback"`
|
||||
BookingComments *string `gorm:"column:booking_comments" json:"booking_comments"`
|
||||
AdditionalPrebookingInformation *string `gorm:"column:additional_prebooking_information" json:"additional_prebooking_information"`
|
||||
ForceUpdate *bool `gorm:"column:force_update" json:"force_update"`
|
||||
}
|
||||
|
||||
func (Ticket) TableName() string {
|
||||
return "live_tickets"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user