Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DBConn *gorm.DB
)
Functions ¶
Types ¶
type Person ¶
type Person struct { ID uint `gorm:"primary_key" json:"id"` FirstName string `gorm:"type:varchar(50)" json:"first_name"` LastName string `gorm:"type:varchar(50);not null" json:"last_name"` Username string `gorm:"type:varchar(20);not null;unique_index" json:"username"` Email string `gorm:"type:varchar(128);not null;unique_index" json:"email"` Phone string `gorm:"type:varchar(13);not null" json:"phone"` Password string `gorm:"type:varchar(255)" json:"-"` // use json:"-" to prevent it from being returned, this is an internal-only field Created time.Time `json:"created"` Deleted bool `gorm:"type:tinyint(1);default:0" json:"deleted"` EmailVerified bool `gorm:"type:tinyint(1);default:0" json:"email_verified"` Locked bool `gorm:"type:tinyint(1);default:0" json:"locked"` }
type Reply ¶
type Reply struct { ID uuid.UUID `gorm:"type:binary(16);primaryKey" json:"id"` Person Person `gorm:"foreignkey:PersonID" json:"-"` PersonID uint `json:"person_id"` ParentTicket Ticket `gorm:"foreignkey:TicketID" json:"-"` TicketID uint `json:"ticket_id"` Body string `gorm:"type:text;not null" json:"body"` Created time.Time `json:"created"` Deleted bool `gorm:"type:tinyint(1);default:0" json:"deleted"` Internal bool `gorm:"type:tinyint(1);default:0" json:"internal"` }
type Ticket ¶
type Ticket struct { ID uint `gorm:"primary_key" json:"id"` OwnerID uint `json:"owner_id"` Owner Person `json:"-"` AffectedPersonID uint `json:"affected_person_id"` AffectedPerson Person `json:"-"` QueueID uint `json:"queue_id"` Queue Queue `json:"-"` SlaID uint `json:"sla_id"` Sla SLA `json:"-"'` StatusID uint `json:"status_id"` Status Status `json:"-"` CategoryID uint `json:"category_id"` Category Category `json:"-"` Subject string `gorm:"type:varchar(78)" json:"subject"` Body string `gorm:"type:text" json:"body"` Locked bool `gorm:"type:tinyint(1);default:0" json:"locked"` }
Click to show internal directories.
Click to hide internal directories.