models

package
v0.0.0-...-d965eeb Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formation

type Formation struct {
	ID         int
	Goalkeeper int
	Attackers  int
	Defenders  int
}

Formation is the schema of game team

type Match

type Match struct {
	ID                    int
	HomeTeam              Team
	VisitorTeam           Team
	ScoreboardHomeTeam    int
	ScoreboardVisitorTeam int
	Date                  time.Time
}

Match represents a draw between two teams

type Player

type Player struct {
	ID         int
	Name       string
	Nickname   string
	Photo      string
	Price      decimal.Decimal
	Score      decimal.Decimal
	Median     decimal.Decimal
	NumMatches int
	ScoutStats []PlayerStats
	Team       Team
	Position   Position
	Status     Status
}

Player struct is the data of players of Team

type PlayerStats

type PlayerStats struct {
	ID           int
	CurrentRound Round
	Player       Player
	AmountScout  int
	Scout        Scout
}

PlayerStats represents stats of a Player

type Position

type Position struct {
	ID          int
	Description string
}

Position struct represents the position of the player in a team

type Round

type Round struct {
	ID              int
	Matches         []Match
	RoundBeginDate  time.Time
	RoundFinishDate time.Time
}

Round struct represents the matches of the week

type Scout

type Scout struct {
	ID          int
	Description string
	Points      int
}

Scout struct represents the stats of each player

type Shop

type Shop struct {
	ID           int
	CurrentRound Round
	Status       string
	Players      []Player
	Year         int
	Cup          string
}

Shop struct represent the stats of shop

type Status

type Status struct {
	ID          int
	Description string
}

Status struct represents Problably-Injured-Doubt-Suspended-Nothing

type Team

type Team struct {
	ID          int
	Name        string
	Nickname    string
	ImageShield string
	Players     []Player
	Stats       *TeamStats
}

Team is a team which is playing the cup

type TeamStats

type TeamStats struct {
	ID             int
	Team           Team
	Victory        int
	Lose           int
	Draw           int
	GoalAgainst    int
	GoalDifference int
	GoalPro        int
	YellowCards    int
	RedCards       int
}

TeamStats struct represents stats of the team

Jump to

Keyboard shortcuts

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