Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Permission ¶
type Permission struct { ID uint `gorm:"primary_key" json:"id"` Name string `gorm:"size:255;not null" json:"name"` GuardName string `gorm:"size:255;not null;index" json:"guard_name"` Description string `gorm:"size:255" json:"description"` // Time CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Permission represents the database model of permissions
type Role ¶
type Role struct { ID uint `gorm:"primary_key" json:"id"` Name string `gorm:"size:255;not null" json:"name"` GuardName string `gorm:"size:255;not null;index" json:"guard_name"` Description string `gorm:"size:255;" json:"description"` // Many to Many Permissions []Permission `gorm:"many2many:role_permissions;constraint:OnUpdate:CASCADE,OnDelete:CASCADE" json:"permissions"` // Time CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Role represents the database model of roles
Click to show internal directories.
Click to hide internal directories.