2021-11-02 10:02:52 +08:00
|
|
|
package model
|
|
|
|
|
2021-11-03 18:04:12 +08:00
|
|
|
// SysRole 角色管理数据模型
|
2021-11-02 10:02:52 +08:00
|
|
|
type SysRole struct {
|
|
|
|
Model
|
|
|
|
ModelTenant
|
2021-11-03 18:04:12 +08:00
|
|
|
ParentID uint64 `gorm:"column:parent_id;type:int;default:0;comment:父级ID" json:"-"`
|
|
|
|
Name string `gorm:"column:name;type:varchar(30);default:null;comment:角色名" json:"name"`
|
|
|
|
Remark string `gorm:"column:remark;type:varchar(255);default:null;comment:角色备注" json:"remark"`
|
|
|
|
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序" json:"-"`
|
2021-11-02 10:02:52 +08:00
|
|
|
ModelDeleted
|
|
|
|
ModelAt
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SysRole) TableName() string {
|
|
|
|
return m.NewTableName("sys_role")
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewSysRole() *SysRole {
|
|
|
|
return &SysRole{}
|
|
|
|
}
|