Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Address ¶
type Address struct { // gorm.Model ID uint `gorm:"primary_key"` Street string StreetNumber string PostalCode string City string Country string PlusCode string Coordinate string RidersID uint EventsID uint }
Address data model
type Event ¶
type Event struct { ID uint `gorm:"primary_key"` Name string `gorm:"not null"` Date string `gorm:"not null"` TotalStages int `gorm:"not null"` AddressesID uint Addresses Address `gorm:"foreignkey:EventsID;association_foreignkey:AddressesID"` TypeOfRacesID uint TypeOfRaces TypeOfRace `gorm:"foreignkey:EventsID;association_foreignkey:TypeOfRacesID"` // One-To-One relationship (has one) SeasonsID uint Seasons Season `gorm:"foreignkey:EventsID;association_foreignkey:SeasonsID"` //;association_foreignkey:ID" StagesID uint Stages []Stage `gorm:"foreignkey:EventsID;association_foreignkey:StagesID"` // ;association_foreignkey:ID }
Event data model
type Post ¶
type Post struct { gorm.Model Text string `sql:"type:text;"` User User `gorm:"foreignkey:UserID"` UserID uint }
Post data model
type Registered ¶
type Registered struct { ID uint `gorm:"primary_key"` Date time.Time StartNumber string RidersID uint Riders Rider `gorm:"ForeignKey:ID;association_foreignkey:RidersID"` EventsID uint Events Event `gorm:"ForeignKey:ID;association_foreignkey:EventsID"` ClassID uint Class Class `gorm:"foreignkey:ID;association_foreignkey:ClassID"` }
Registered data model
func (Registered) Serialize ¶
func (p Registered) Serialize() common.JSON
Serialize serializes post data
type Result ¶
type Result struct { ID uint `gorm:"primary_key"` TotalTime time.Time Place uint RidersID uint EventsID uint Events Event `gorm:"ForeignKey:ID;association_foreignkey:EventsID"` }
Result data model
type Rider ¶
type Rider struct { // gorm.Model ID uint `gorm:"primary_key"` Firstname string `gorm:"not null"` Lastname string `gorm:"not null"` Gender int `gorm:"not null"` Mail string `gorm:"not null"` Birthday time.Time `gorm:"not null"` AddressesID uint Addresses Address `gorm:"ForeignKey:ID;association_foreignkey:AddressesID"` RunsID uint Runs []Run `gorm:"ForeignKey:RidersID;association_foreignkey:RunsID"` ResultsID uint Results Result `gorm:"ForeignKey:RidersID;association_foreignkey:ResultsID"` StagesID uint Stages []Stage `gorm:"ForeignKey:ID;association_foreignkey:StagesID"` }
Rider data model
type Run ¶
type Run struct { ID uint `gorm:"primary_key"` StartTime time.Time EndTime time.Time DNF bool RidersID uint EventsID uint StagesID uint }
Run data model
type Season ¶
type Season struct { ID uint `gorm:"primary_key"` // gorm.Model Name string `gorm:"not null"` Year uint `gorm:"not null"` EventsID uint }
Season data model
type Stage ¶
type Stage struct { ID uint `gorm:"primary_key"` Name string `gorm:"not null"` Location string `gorm:"not null"` Order uint `gorm:"not null"` EventsID uint }
Stage data model
type TypeOfRace ¶
type TypeOfRace struct { ID uint `gorm:"primary_key"` // gorm.Model Name string `gorm:"not null"` EventsID uint }
TypeOfRace data model
func (TypeOfRace) Serialize ¶
func (p TypeOfRace) Serialize() common.JSON
Serialize serializes post data
Click to show internal directories.
Click to hide internal directories.