Documentation ¶
Index ¶
Constants ¶
View Source
const ( USERS_ROLE_SUPER_ADMIN = "super_admin" USERS_ROLE_ADMIN = "admin" USERS_ROLE_USER = "user" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Organization ¶
type Ticket ¶
type Ticket struct { gorm.Model UserID uint `gorm:"not null" json:"user_id"` OrganizationID uint `gorm:"not null" json:"org_id"` Title string `gorm:"not null" json:"title"` Body string `gorm:"not null" json:"body"` WebsiteURL string `json:"website_url"` AttachmentUrl string `json:"attachment_url"` Seen bool `gorm:"default:false" json:"seen"` User *User Organization *Organization }
type User ¶
type User struct { gorm.Model Username string `gorm:"not null; unique" json:"username"` Email string `gorm:"not null; unique" json:"email"` Password string `gorm:"not null" json:"password,omitempty"` Role string `gorm:"default:user" json:"role"` Blocked bool `gorm:"default:false" json:"blocked"` Verified bool `gorm:"default:true" json:"verified"` Organizations []Organization `gorm:"many2many:org_admins"` }
Click to show internal directories.
Click to hide internal directories.