26 lines
618 B
Go
26 lines
618 B
Go
package model
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
type Fixture struct {
|
|
Slug string `bun:"slug,pk" json:"slug"`
|
|
DisplayName string `bun:"display_name" json:"displayName"`
|
|
State string `bun:"state" json:"fixtureState"`
|
|
StartDate time.Time `bun:"start_date" json:"startDate"`
|
|
EndDate time.Time `bun:"end_date" json:"endDate"`
|
|
GameWeek int `bun:"game_week" json:"gameWeek"`
|
|
}
|
|
|
|
func (f *Fixture) String() string {
|
|
return fmt.Sprintf(
|
|
"%s | %7s | %s -> %s",
|
|
f.DisplayName,
|
|
f.State,
|
|
f.StartDate.Format("2006-01-02"),
|
|
f.EndDate.Format("2006-01-02"),
|
|
)
|
|
}
|