package model import "time" type Message struct { ID string `bson:"_id" json:"id"` TicketID string `bson:"TicketID" json:"ticket_id"` UserID string `bson:"UserID" json:"user_id"` SessionID string `bson:"SessionID" json:"session_id"` Message string `bson:"Message" json:"message"` Files []string `bson:"Files" json:"files"` Shown map[string]int `bson:"Shown" json:"shown"` RequestScreenshot string `bson:"RequestScreenshot" json:"request_screenshot"` CreatedAt time.Time `bson:"CreatedAt" json:"created_at"` } const ( StateClose = "close" StateOpen = "open" StateWait = "wait" StateNeedAnswer = "answer" ) type Ticket struct { ID string `bson:"_id" json:"id"` UserID string `bson:"UserID" json:"user"` SessionID string `bson:"SessionID" json:"sess"` AnswererID string `bson:"AnswererID" json:"ans"` State string `bson:"State" json:"state"` TopMessage Message `bson:"TopMessage" json:"top_message"` Title string `bson:"Title" json:"title"` CreatedAt time.Time `bson:"CreatedAt" json:"created_at"` UpdatedAt time.Time `bson:"UpdatedAt" json:"updated_at"` Rate int `bson:"Rate" json:"rate"` }