data

package
v0.0.0-...-1f77cd8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	Id        int       `json:"id"`
	FirstName string    `json:"first_name"`
	LastName  string    `json:"last_name"`
	SteamID   string    `json:"steam_id"`
	DiscordID string    `json:"discord_id"`
	CreatedAt time.Time `json:"-"`
	UpdatedAt time.Time `json:"-"`
}

type DriverModel

type DriverModel struct {
	// contains filtered or unexported fields
}

func (DriverModel) Get

func (model DriverModel) Get(ctx context.Context, id int) (Driver, error)

func (DriverModel) Insert

func (model DriverModel) Insert(ctx context.Context, request Driver) error

type Incident

type Incident struct {
	ID                int       `json:"id"`
	DriverID          int       `json:"driver_id"`
	ReportingDriverID int       `json:"reporting_driver_id"`
	RaceID            int       `json:"race_id"`
	Description       string    `json:"description"`
	LapNumber         int       `json:"lap_number"`
	CreatedAt         time.Time `json:"-"`
	UpdatedAt         time.Time `json:"-"`
}

type IncidentModel

type IncidentModel struct {
	// contains filtered or unexported fields
}

type League

type League struct {
	ID          int       `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"-"`
	UpdatedAt   time.Time `json:"-"`
}

type LeagueModel

type LeagueModel struct {
	// contains filtered or unexported fields
}

func (LeagueModel) Get

func (model LeagueModel) Get(ctx context.Context, id int) (League, error)

func (LeagueModel) Insert

func (model LeagueModel) Insert(ctx context.Context, request League) error

type Models

type Models struct {
	Drivers       DriverModel
	Incidents     IncidentModel
	Leagues       LeagueModel
	Penalties     PenaltyModel
	Platforms     PlatformModel
	Races         RaceModel
	Registrations RegistrationModel
	Rulings       RulingModel
	Seasons       SeasonModel
}

func NewModels

func NewModels(db *sqlx.DB) Models

type Penalty

type Penalty struct {
	ID          int       `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"-"`
	UpdatedAt   time.Time `json:"-"`
}

type PenaltyModel

type PenaltyModel struct {
	// contains filtered or unexported fields
}

func (PenaltyModel) Get

func (model PenaltyModel) Get(ctx context.Context, id int) (Penalty, error)

func (PenaltyModel) Insert

func (model PenaltyModel) Insert(ctx context.Context, request Penalty) error

type Platform

type Platform struct {
	ID        int       `json:"id"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"-"`
	UpdatedAt time.Time `json:"-"`
}

type PlatformModel

type PlatformModel struct {
	// contains filtered or unexported fields
}

func (PlatformModel) Get

func (model PlatformModel) Get(ctx context.Context, platformID int) (Platform, error)

func (PlatformModel) Insert

func (model PlatformModel) Insert(ctx context.Context, request Platform) error

type Race

type Race struct {
	ID        int       `json:"id"`
	LeagueID  int       `json:"league_id"`
	SeasonID  int       `json:"season_id"`
	Name      string    `json:"name"`
	StartTime time.Time `json:"start_time"`
	Week      int       `json:"week"`
	CreatedAt time.Time `json:"-"`
	UpdatedAt time.Time `json:"-"`
}

type RaceModel

type RaceModel struct {
	// contains filtered or unexported fields
}

type Registration

type Registration struct {
	ID        int       `json:"id"`
	DriverID  int       `json:"driver_id"`
	SeasonID  int       `json:"season_id"`
	CreatedAt time.Time `json:"-"`
	UpdatedAt time.Time `json:"-"`
}

type RegistrationModel

type RegistrationModel struct {
	// contains filtered or unexported fields
}

type Ruling

type Ruling struct {
	ID         int       `json:"id"`
	IncidentID int       `json:"incident_id"`
	PenaltyID  int       `json:"penalty_id"`
	CreatedAt  time.Time `json:"-"`
	UpdatedAt  time.Time `json:"-"`
}

type RulingModel

type RulingModel struct {
	// contains filtered or unexported fields
}

type Season

type Season struct {
	ID          int       `json:"id"`
	LeagueID    int       `json:"league_id"`
	PlatformID  int       `json:"platform_id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	StartDate   time.Time `json:"start_date"`
	EndDate     time.Time `json:"end_date"`
	CreatedAt   time.Time `json:"-"`
	UpdatedAt   time.Time `json:"-"`
}

type SeasonModel

type SeasonModel struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL