Files
phishingclub/backend/database/role.go
2025-08-21 16:14:09 +02:00

19 lines
292 B
Go

package database
import (
"github.com/google/uuid"
)
// Role is a role
type Role struct {
ID *uuid.UUID `gorm:"primary_key;not null;unique;type:uuid"`
Name string `gorm:"not null;index;unique;"`
// one-to-many
Users []*User
}
func (Role) TableName() string {
return "roles"
}