16 lines
717 B
Go
16 lines
717 B
Go
package model
|
|
|
|
import (
|
|
"loveuer/utodo/internal/model/enum"
|
|
"loveuer/utodo/pkg/sqlType"
|
|
)
|
|
|
|
type Privilege struct {
|
|
Id int64 `json:"id" gorm:"column:id,primaryKey"`
|
|
CreatedAt int64 `json:"created_at" gorm:"column:created_at,autoCreateTime:milli"`
|
|
UpdatedAt int64 `json:"updated_at" gorm:"column:updated_at,autoUpdateTime:milli"`
|
|
DeletedAt int64 `json:"deleted_at" gorm:"column:deleted_at"`
|
|
Role enum.UserRole `json:"role" gorm:"column:role;type:varchar(32);not null;unique"`
|
|
Privileges sqlType.SliceStr[enum.Privilege] `json:"privileges" gorm:"column:privileges"`
|
|
}
|