guard/internal/entity/user_role.go

21 lines
538 B
Go
Raw Permalink Normal View History

2024-08-19 01:39:05 +00:00
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"`
}