22 lines
450 B
Go
22 lines
450 B
Go
package model
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// Role 角色模型
|
|
type Role struct {
|
|
gorm.Model
|
|
BaseModel
|
|
|
|
RoleName string `gorm:"not null;size:50" json:"role_name"`
|
|
RoleDesc string `gorm:"size:255" json:"role_desc"`
|
|
RoleType int `gorm:"not null;index" json:"role_type"` // 1=超级, 2=代理, 3=企业
|
|
Status int `gorm:"not null;default:1" json:"status"`
|
|
}
|
|
|
|
// TableName 指定表名
|
|
func (Role) TableName() string {
|
|
return "tb_role"
|
|
}
|