21 lines
538 B
Go
21 lines
538 B
Go
|
package entity
|
||
|
|
||
|
type UserRole struct {
|
||
|
ID int64 `gorm:"column:id"`
|
||
|
Brand string `gorm:"column:brand"`
|
||
|
UID string `gorm:"column:uid"`
|
||
|
RoleID string `gorm:"column:role_id"`
|
||
|
Status int `gorm:"column:status"`
|
||
|
CreateTime int64 `gorm:"column:create_time;autoCreateTime"`
|
||
|
UpdateTime int64 `gorm:"column:update_time;autoUpdateTime"`
|
||
|
}
|
||
|
|
||
|
func (c *UserRole) TableName() string {
|
||
|
return "user_role"
|
||
|
}
|
||
|
|
||
|
type RoleUserCount struct {
|
||
|
RoleID string `gorm:"column:role_id"`
|
||
|
Count int `gorm:"column:count"`
|
||
|
}
|