package models import "time" type Role struct { ID uint32 `gorm:"primaryKey;autoIncrement"` Name string `gorm:"not null;size:100;index"` Description string `gorm:"not null;default:'';size:255"` BuiltIn bool `gorm:"not null;default:false"` Locked bool `gorm:"not null;default:false"` Version uint32 `gorm:"not null;default:1"` EditedAt *time.Time `gorm:"column:updated_at"` EditedBy *uint32 `gorm:"column:updated_by"` } type RolePermission struct { ID uint32 `gorm:"primaryKey;autoIncrement"` RoleID uint32 `gorm:"not null;uniqueIndex:idx_role_permission_key"` Key string `gorm:"column:permission_key;not null;size:100;uniqueIndex:idx_role_permission_key"` Scope string `gorm:"not null;size:8"` }