model

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregationStat

type AggregationStat struct {
	Count         int
	Stars         int
	Bloops        []string
	AvgDuration   time.Duration
	WorstDuration time.Duration
	BestDuration  time.Duration
	AvgPoints     int
	BestPoints    int
	WorstPoints   int
}

type RateStat

type RateStat struct {
	Stars  int
	Bloops int
}

type Stat

type Stat struct {
	ID     uuid.UUID `json:"-"`
	UserID int64     `json:"userID"`

	WorstDuration   time.Duration `json:"worstDuration"`
	AverageDuration time.Duration `json:"averageDuration"`
	BestDuration    time.Duration `json:"bestDuration"`
	SumDuration     time.Duration `json:"sumDuration"`

	AveragePoints int `json:"averagePoints"`
	SumPoints     int `json:"points"`
	WorstPoints   int `json:"worstPoints"`
	BestPoints    int `json:"bestPoints"`

	RoundsNum  int       `json:"roundsNum"`
	Conclusion Status    `json:"conclusion"`
	Categories []string  `json:"categories"`
	Bloops     []string  `json:"bloopsbot"`
	PlayersNum int       `json:"playersNum"`
	Vote       bool      `json:"vote"`
	CreatedAt  time.Time `json:"createdAt"`
}

func NewStat

func NewStat(userID int64) Stat

type Status

type Status string
const (
	StatusFavorite    Status = "favorite"
	StatusParticipant Status = "participant"
)

Jump to

Keyboard shortcuts

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