dbfantasyteam

package
v0.0.0-...-8bbd0fc Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(d *FantasyTeam) error

Delete deletes a record from the database

func Insert

func Insert(d *FantasyTeam) error

Insert will create a new record in the database

func Save

func Save(s *FantasyTeam) error

func Update

func Update(s *FantasyTeam) error

Update will update a record in the database

Types

type FantasyTeam

type FantasyTeam struct {
	FantasyTeamID      int64              `db:"fantasy_team_id"`
	FantasyLeagueID    int64              `db:"fantasy_league_id"`
	UserID             int64              `db:"user_id"`
	Name               string             `db:"name"`
	CreatedDate        time.Time          `db:"created_date"`
	Status             string             `db:"status"`
	ScheduleTeamNumber database.NullInt64 `db:"schedule_team_number"`
}

func ReadAll

func ReadAll() ([]FantasyTeam, error)

ReadAll reads all records in the database

func ReadAllByFantasyLeagueID

func ReadAllByFantasyLeagueID(fantasyLeagueID int64, orderBy string) ([]FantasyTeam, error)

ReadAllByFantasyLeagueID reads all fantasy_teams in the database for the given fantasyLeagueID

func ReadByID

func ReadByID(ID int64) (*FantasyTeam, error)

ReadByID reads by id column

type FantasyTeamFull

type FantasyTeamFull struct {
	SeasonName             string              `db:"season_name"`
	FantasyGameName        string              `db:"fantasy_game_name"`
	FantasyGameLandingPage database.NullString `db:"landing_page_url"`
	FantasyTeamID          int64               `db:"fantasy_team_id"`
	TeamName               string              `db:"fantasy_team_name"`
	DateCreated            time.Time           `db:"created_date"`
	Status                 string              `db:"status"`
	ScheduleTeamNumber     database.NullInt64  `db:"schedule_team_number"`
	FantasyLeagueID        int64               `db:"fantasy_league_id"`
	FantasyLeagueName      string              `db:"fantasy_league_name"`
	UserID                 int64               `db:"user_id"`
	UserFirstName          string              `db:"first_name"`
	UserLastName           string              `db:"last_name"`
}

func ReadAllByFantasyLeagueIDFull

func ReadAllByFantasyLeagueIDFull(fantasyLeagueID int64, orderBy string) ([]FantasyTeamFull, error)

ReadAllByFantasyLeagueIDFull reads all fantasy_teams in the database for the given fantasyLeagueID

func ReadByUserIDFull

func ReadByUserIDFull(userID int64, activeStatus, orderBy string) ([]FantasyTeamFull, error)

ReadByUserIDFull reads all fantasy_teams in the database for the given userID

Jump to

Keyboard shortcuts

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