Discover Packages
github.com/herdgolf/api
models
package
Version:
v0.0.0-...-c021965
Opens a new window with list of versions in this module.
Published: Jan 15, 2024
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Hole struct {
gorm .Model
Number int `json:"number"`
Par int `json:"par"`
StrokeIndex int `json:"stroke_index"`
CourseID uint
}
type HoleScore struct {
HoleID int `json:"hole_id"`
Strokes int `json:"strokes"`
ScoreCardID uint `json:"score_card_id"`
}
type Player struct {
gorm .Model
Name string `json:"name"`
ProfileID int
Profile Profile
Rounds []Round `gorm:"many2many:rounds_players;" json:"rounds"`
}
type Profile struct {
Link string `json:"link"`
ID int
}
type Round struct {
gorm .Model
Name string `json:"name"`
Players []Player `gorm:"many2many:rounds_players;" json:"players"`
Course Course
CourseID uint `json:"course_id"`
Finished bool `gorm:"default:false"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.