package models import "time" // Booking is used to store data relating to any interpreter booking. It is the output of the bookings formatter, and contains re-maps of existing ticket data. // // - BookingReference is the reference number the client will use when they call in. It is also the numeric ticket ID from Zoho. // - BookingTime is the nominated time for the booking in TODO: what timezone is BookingTime in? // - Timezone is the customer specified timezone for the above booking time. // - Language is the foreign language requirement from the customer. // - CustomData contains any special customer data, typically from the cost code field in the ticket. // - Method is the type of booking: audio, video, in-person, etc. // - Duration is the currently specified length of the booking after any changes. // - BookedDuration is the initially nominated length of the booking. // - ConversationId is an optional field for a GenesysCloud conversation ID to be manually linked to the ticket. // - CancellationTime is the optional timestamp at which the customer or agent cancelled the request for the booking. // - InterpreterId is the 4-digit identifier of the interpreter selected for the prebooking. // - ClientId is the 5-digit identifier of the client who placed the prebooking. // - AgentName is the customer supplied name of the individual who requested the prebooking. // - AgentEmail is the customer supplied email address of the individual who requested the prebooking. // - AgentPhone is the customer supplied phone number of the individual who requested the prebooking. // - Comments contains any additional information supplied by the individual who requested the prebooking. // - BillingCode is an internal use field that indicates the current billing status and who should be paid/charged. // - TicketId is the Zoho internal use ID (not to be confused with the BookingReference or ticket number). // // Table Schema: // // Primary Key: BookingReference // Indexes: BookingReference, BookingTime, Method, ConversationId, InterpreterId, ClientId type Booking struct { BookingReference int `gorm:"primaryKey;index"` BookingTime *time.Time `gorm:"index"` Timezone *string Language *string CustomData *string Method *string `gorm:"index"` Duration *int BookedDuration *int ConversationId *string `gorm:"index"` CancellationTime *time.Time InterpreterId *int `gorm:"index"` ClientId *int `gorm:"index"` AgentName *string AgentEmail *string AgentPhone *string Comments *string BillingCode *string TicketId string } func (Booking) TableName() string { return "gc_bookings" }