admin-dashboard-backend/modules/structs/roles.go

27 lines
456 B
Go

package structs
import (
"time"
)
type Role struct {
Id string
Master bool `gorm:"type:bool"` // this reflects the role that has all rights
DisplayName string
Description string
SortingOrder int
UpdatedAt time.Time
CreatedAt time.Time
}
// Permissions assigned to the role
type RolePermission struct {
RoleId string
PermissionId string
}
type RolePermissions struct {
RoleId string
Permissions []string
}