Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNameIsRequired = errors.New("field Name is required")
Functions ¶
This section is empty.
Types ¶
type Team ¶
type Team struct {
// this id refers to ID of a team in web.
ID uuid.UUID `json:"id,omitempty" gorm:"type:uuid;primary_key;"`
// Name is team name
Name string `json:"name" gorm:"unique;not null"`
// Pause is responsible for pausing the scoring
Pause *bool `json:"pause,omitempty" gorm:"not null;default:false"`
// Hide is responsible for hiding the Team on scoring table
Hide *bool `json:"hide,omitempty" gorm:"not null;default:false"`
// Index is team's index, which is a unique value used for templating (10.X.1.1, where X is an index) and sorting
Index *uint64 `json:"index" gorm:"unique;"`
// Users array stores all of the users that are part of a given Team
Users []*user.User `gorm:"foreignkey:TeamID;association_foreignkey:ID;constraint:OnUpdate:RESTRICT,OnDelete:CASCADE" json:"-"`
// Hosts array stores all Hosts that are part of a given Team
Hosts []*host.Host `gorm:"foreignkey:TeamID;association_foreignkey:ID; constraint:OnUpdate:RESTRICT,OnDelete:RESTRICT" json:"hosts,omitempty"`
}
Team model represents internal team model of the scoring engine.
Click to show internal directories.
Click to hide internal directories.