Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Permission ¶
type Permission struct { Id int `gorm:"type:int unsigned auto_increment;primary_key"` Title string `gorm:"type:varchar(50);default:'';not null;comment:'权限'"` Description string `gorm:"type:varchar(50);default:'';not null;comment:'描述'"` Seq int `gorm:"type:int;default:0;not null;comment:'排序'"` Status int `gorm:"type:tinyint;default:0;not null;comment:'状态'"` CreateTime time.Time `gorm:"type:timestamp;default:current_timestamp;not null"` UpdateTime time.Time `gorm:"type:timestamp;default:current_timestamp on update current_timestamp;not null"` }
func (Permission) TableName ¶
func (Permission) TableName() string
type Role ¶
type Role struct { Id int `gorm:"type:int unsigned auto_increment;primary_key"` Title string `gorm:"type:varchar(50);default:'';not null;comment:'角色'"` Description string `gorm:"type:varchar(50);default:'';not null;comment:'描述'"` Seq int `gorm:"type:int;default:0;not null;comment:'排序'"` Status int `gorm:"type:tinyint;default:0;not null;comment:'状态'"` CreateTime time.Time `gorm:"type:timestamp;default:current_timestamp;not null"` UpdateTime time.Time `gorm:"type:timestamp;default:current_timestamp on update current_timestamp;not null"` }
type RolePermission ¶
type RolePermission struct { RoleId int `gorm:"type:int unsigned;primary_key;auto_increment:false"` PermissionId int `gorm:"type:int unsigned;primary_key;auto_increment:false"` Status int `gorm:"type:tinyint;default:0;not null;comment:'状态'"` CreateTime time.Time `gorm:"type:timestamp;default:current_timestamp;not null"` UpdateTime time.Time `gorm:"type:timestamp;default:current_timestamp on update current_timestamp;not null"` }
func (RolePermission) TableName ¶
func (RolePermission) TableName() string
type User ¶
type User struct { Id int `gorm:"type:int unsigned auto_increment;primary_key"` Account string `gorm:"type:varchar(50);default:'';not null;comment:'账号'"` Name string `gorm:"type:varchar(50);default:'';not null;comment:'姓名'"` Status int `gorm:"type:tinyint;default:0;not null;comment:'状态'"` AccessToken string `gorm:"type:varchar(1000);default:'';not null;comment:'token'"` TokenExpireAt int64 `gorm:"type:int;default:'';not null;comment:'token过期时间'"` CreateTime time.Time `gorm:"type:timestamp;default:current_timestamp;not null"` UpdateTime time.Time `gorm:"type:timestamp;default:current_timestamp on update current_timestamp;not null"` }
type UserRole ¶
type UserRole struct { UserId int `gorm:"type:int unsigned;primary_key;auto_increment:false"` RoleId int `gorm:"type:int unsigned;primary_key;auto_increment:false"` Status int `gorm:"type:tinyint;default:0;not null;comment:'状态'"` CreateTime time.Time `gorm:"type:timestamp;default:current_timestamp;not null"` UpdateTime time.Time `gorm:"type:timestamp;default:current_timestamp on update current_timestamp;not null"` }
Click to show internal directories.
Click to hide internal directories.