mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-12 16:12:44 +00:00
19 lines
292 B
Go
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"
|
|
}
|