models

package
v0.0.0-...-fe78ce7 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int32Array

func Int32Array(s []int32) pq.Int64Array

Int32Array converts a slice of int32 values to a `pq.Int64Array`.

Returns nil if the given slice is nil.

func TruncateUint

func TruncateUint(i uint64) uint64

TruncateUint truncates an uint64 to the maximum positive int64 value.

Returns zero if it overflows, otherwise returns the unmodified value.

func Uint32Array

func Uint32Array(s []uint32) pq.Int64Array

Uint32Array converts a slice of uint32 values to a `pq.Int64Array`.

Returns nil if the given slice is nil.

Types

type FollowedPlayer

type FollowedPlayer struct {
	ID        FollowedPlayerID `gorm:"column:id;primary_key"`
	AccountID nspb.AccountID   `gorm:"column:account_id;unique_index;not null"`
	Label     string           `gorm:"column:label;size:255;not null"`
	Slug      string           `gorm:"column:slug;size:255;not null"`
	Timestamps
}

FollowedPlayer ...

func (*FollowedPlayer) BeforeCreate

func (p *FollowedPlayer) BeforeCreate() error

func (*FollowedPlayer) TableName

func (*FollowedPlayer) TableName() string

type FollowedPlayerID

type FollowedPlayerID uint64

type Hero

type Hero struct {
	ID                 nspb.HeroID        `gorm:"column:id;primary_key"`
	Name               string             `gorm:"column:name;size:255;unique_index;not null"`
	Slug               string             `gorm:"column:slug;size:255;unique_index;not null"`
	LocalizedName      string             `gorm:"column:localized_name;size:255;not null"`
	Aliases            pq.StringArray     `gorm:"column:aliases"`
	Roles              nssql.HeroRoles    `gorm:"column:roles"`
	RoleLevels         pq.Int64Array      `gorm:"column:role_levels"`
	Complexity         int                `gorm:"column:complexity"`
	Legs               int                `gorm:"column:legs"`
	AttributePrimary   nspb.DotaAttribute `gorm:"column:attribute_primary"`
	AttackCapabilities nspb.DotaUnitCap   `gorm:"column:attack_capabilities"`
	Timestamps
}

func (*Hero) BeforeCreate

func (h *Hero) BeforeCreate() error

func (*Hero) TableName

func (*Hero) TableName() string

type League

type League struct {
	ID             nspb.LeagueID     `gorm:"column:id;primary_key"`
	Name           string            `gorm:"column:name;size:255;not null"`
	Tier           nspb.LeagueTier   `gorm:"column:tier;not null"`
	Region         nspb.LeagueRegion `gorm:"column:region;not null"`
	Status         nspb.LeagueStatus `gorm:"column:status;not null"`
	TotalPrizePool uint32            `gorm:"column:total_prize_pool"`
	LastActivityAt sql.NullTime      `gorm:"column:last_activity_at"`
	StartAt        sql.NullTime      `gorm:"column:start_at"`
	FinishAt       sql.NullTime      `gorm:"column:finish_at"`
	Timestamps
}

func (*League) TableName

func (*League) TableName() string

type LiveMatch

type LiveMatch struct {
	ID                         LiveMatchID        `gorm:"column:id;primary_key"`
	MatchID                    nspb.MatchID       `gorm:"column:match_id;unique_index;not null"`
	ServerID                   nspb.SteamID       `gorm:"column:server_id;not null"`
	LobbyID                    nspb.LobbyID       `gorm:"column:lobby_id;not null"`
	LobbyType                  nspb.LobbyType     `gorm:"column:lobby_type"`
	LeagueID                   nspb.LeagueID      `gorm:"column:league_id"`
	SeriesID                   nspb.SeriesID      `gorm:"column:series_id"`
	GameMode                   nspb.GameMode      `gorm:"column:game_mode"`
	AverageMMR                 uint32             `gorm:"column:average_mmr"`
	RadiantLead                int32              `gorm:"column:radiant_lead"`
	RadiantTeamID              nspb.TeamID        `gorm:"column:radiant_team_id"`
	RadiantTeamName            string             `gorm:"column:radiant_team_name;size:255"`
	RadiantScore               uint32             `gorm:"column:radiant_score"`
	DireTeamID                 nspb.TeamID        `gorm:"column:dire_team_id"`
	DireTeamName               string             `gorm:"column:dire_team_name;size:255"`
	DireScore                  uint32             `gorm:"column:dire_score"`
	Delay                      uint32             `gorm:"column:delay"`
	ActivateTime               sql.NullTime       `gorm:"column:activate_time"`
	DeactivateTime             sql.NullTime       `gorm:"column:deactivate_time"`
	LastUpdateTime             sql.NullTime       `gorm:"column:last_update_time"`
	GameTime                   int32              `gorm:"column:game_time"`
	Spectators                 uint32             `gorm:"column:spectators"`
	SortScore                  float64            `gorm:"column:sort_score"`
	BuildingState              nspb.BuildingState `gorm:"column:building_state"`
	WeekendTourneyTournamentID uint32             `gorm:"column:weekend_tourney_tournament_id"`
	WeekendTourneyDivision     uint32             `gorm:"column:weekend_tourney_division"`
	WeekendTourneySkillLevel   uint32             `gorm:"column:weekend_tourney_skill_level"`
	WeekendTourneyBracketRound uint32             `gorm:"column:weekend_tourney_bracket_round"`
	Timestamps

	Players []*LiveMatchPlayer
	Stats   []*LiveMatchStats
	Match   *Match
}

LiveMatch ...

func LiveMatchDotaProto

func LiveMatchDotaProto(pb *d2pb.CSourceTVGameSmall) *LiveMatch

func (*LiveMatch) Equal

func (m *LiveMatch) Equal(other *LiveMatch) bool

func (*LiveMatch) TableName

func (*LiveMatch) TableName() string

type LiveMatchID

type LiveMatchID uint64

type LiveMatchPlayer

type LiveMatchPlayer struct {
	ID          LiveMatchPlayerID `gorm:"column:id;primary_key"`
	LiveMatchID LiveMatchID       `gorm:"column:live_match_id;unique_index:uix_live_match_players_live_match_id_account_id;not null"` //nolint: lll
	MatchID     nspb.MatchID      `gorm:"column:match_id;unique_index:uix_live_match_players_match_id_account_id;not null"`           //nolint: lll
	AccountID   nspb.AccountID    `gorm:"column:account_id;unique_index:uix_live_match_players_live_match_id_account_id;not null"`    //nolint: lll
	HeroID      nspb.HeroID       `gorm:"column:hero_id"`
	Timestamps

	LiveMatch *LiveMatch
	Match     *Match
	Hero      *Hero
}

LiveMatchPlayer ...

func LiveMatchPlayerDotaProto

func LiveMatchPlayerDotaProto(pb *d2pb.CSourceTVGameSmall_Player) *LiveMatchPlayer

func NewLiveMatchPlayer

func NewLiveMatchPlayer(liveMatch *LiveMatch, pb *d2pb.CSourceTVGameSmall_Player) *LiveMatchPlayer

func (*LiveMatchPlayer) TableName

func (*LiveMatchPlayer) TableName() string

type LiveMatchPlayerID

type LiveMatchPlayerID uint64

type LiveMatchStats

type LiveMatchStats struct {
	ID                         LiveMatchStatsID  `gorm:"column:id;primary_key"`
	LiveMatchID                LiveMatchID       `gorm:"column:live_match_id;index;not null"`
	MatchID                    nspb.MatchID      `gorm:"column:match_id;index;not null"`
	ServerID                   nspb.SteamID      `gorm:"column:server_id;index;not null"`
	LeagueID                   nspb.LeagueID     `gorm:"column:league_id"`
	LeagueNodeID               nspb.LeagueNodeID `gorm:"column:league_node_id"`
	GameTimestamp              uint32            `gorm:"column:game_timestamp"`
	GameTime                   int32             `gorm:"column:game_time"`
	GameMode                   nspb.GameMode     `gorm:"column:game_mode"`
	GameState                  nspb.GameState    `gorm:"column:game_state"`
	DeltaFrame                 bool              `gorm:"column:delta_frame"`
	GraphGold                  pq.Int64Array     `gorm:"column:graph_gold"`
	GraphXP                    pq.Int64Array     `gorm:"column:graph_xp"`
	GraphKill                  pq.Int64Array     `gorm:"column:graph_kill"`
	GraphTower                 pq.Int64Array     `gorm:"column:graph_tower"`
	GraphRax                   pq.Int64Array     `gorm:"column:graph_rax"`
	SteamBroadcasterAccountIDs nssql.AccountIDs  `gorm:"column:steam_broadcaster_account_ids"`
	Timestamps

	LiveMatch *LiveMatch
	Match     *Match
	Teams     []*LiveMatchStatsTeam
	Players   []*LiveMatchStatsPlayer
	Draft     []*LiveMatchStatsPickBan
	Buildings []*LiveMatchStatsBuilding
}

LiveMatchStats ...

func NewLiveMatchStats

func NewLiveMatchStats(liveMatch *LiveMatch, pb *d2pb.CMsgDOTARealtimeGameStatsTerse) *LiveMatchStats

func (*LiveMatchStats) TableName

func (*LiveMatchStats) TableName() string

type LiveMatchStatsBuilding

type LiveMatchStatsBuilding struct {
	ID               LiveMatchStatsBuildingID `gorm:"column:id;primary_key"`
	LiveMatchStatsID LiveMatchStatsID         `gorm:"column:live_match_stats_id"`
	GameTeam         nspb.GameTeam            `gorm:"column:game_team"`
	Heading          float32                  `gorm:"column:heading"`
	Type             nspb.BuildingType        `gorm:"column:type"`
	Lane             nspb.LaneType            `gorm:"column:lane"`
	Tier             uint32                   `gorm:"column:tier"`
	PosX             float32                  `gorm:"column:pos_x"`
	PosY             float32                  `gorm:"column:pos_y"`
	Destroyed        bool                     `gorm:"column:destroyed"`
	Timestamps

	LiveMatchStats *LiveMatchStats
}

LiveMatchStatsBuilding ...

func (*LiveMatchStatsBuilding) TableName

func (*LiveMatchStatsBuilding) TableName() string

type LiveMatchStatsBuildingID

type LiveMatchStatsBuildingID uint64

type LiveMatchStatsID

type LiveMatchStatsID uint64

type LiveMatchStatsPickBan

type LiveMatchStatsPickBan struct {
	ID               LiveMatchStatsPickBanID `gorm:"column:id;primary_key"`
	LiveMatchStatsID LiveMatchStatsID        `gorm:"column:live_match_stats_id"`
	HeroID           nspb.HeroID             `gorm:"column:hero_id"`
	GameTeam         nspb.GameTeam           `gorm:"column:game_team"`
	IsBan            bool                    `gorm:"column:is_ban"`
	Timestamps

	LiveMatchStats *LiveMatchStats
	Hero           *Hero
}

LiveMatchStatsPickBan ...

func (LiveMatchStatsPickBan) TableName

func (LiveMatchStatsPickBan) TableName() string

type LiveMatchStatsPickBanID

type LiveMatchStatsPickBanID uint64

type LiveMatchStatsPlayer

type LiveMatchStatsPlayer struct {
	ID               LiveMatchStatsPlayerID `gorm:"column:id;primary_key"`
	LiveMatchStatsID LiveMatchStatsID       `gorm:"column:live_match_stats_id;unique_index:uix_live_match_stats_players_live_match_stats_id_account_id;not null"` //nolint: lll
	MatchID          nspb.MatchID           `gorm:"column:match_id;index;not null"`                                                                               //nolint: lll
	AccountID        nspb.AccountID         `gorm:"column:account_id;unique_index:uix_live_match_stats_players_live_match_stats_id_account_id;not null"`          //nolint: lll
	PlayerSlot       nspb.GamePlayerSlot    `gorm:"column:player_slot"`
	Name             string                 `gorm:"column:name;size:255"`
	GameTeam         nspb.GameTeam          `gorm:"column:game_team"`
	HeroID           nspb.HeroID            `gorm:"column:hero_id"`
	Level            uint32                 `gorm:"column:level"`
	Kills            uint32                 `gorm:"column:kills"`
	Deaths           uint32                 `gorm:"column:deaths"`
	Assists          uint32                 `gorm:"column:assists"`
	Denies           uint32                 `gorm:"column:denies"`
	LastHits         uint32                 `gorm:"column:last_hits"`
	Gold             uint32                 `gorm:"column:gold"`
	NetWorth         uint32                 `gorm:"column:net_worth"`
	PosX             float32                `gorm:"column:pos_x"`
	PosY             float32                `gorm:"column:pos_y"`
	Abilities        nssql.AbilityIDs       `gorm:"column:abilities"`
	Items            nssql.ItemIDs          `gorm:"column:items"`
	Timestamps

	LiveMatchStats *LiveMatchStats
	Match          *Match
	Hero           *Hero
}

func (*LiveMatchStatsPlayer) TableName

func (*LiveMatchStatsPlayer) TableName() string

type LiveMatchStatsPlayerID

type LiveMatchStatsPlayerID uint64

type LiveMatchStatsTeam

type LiveMatchStatsTeam struct {
	ID               LiveMatchStatsTeamID `gorm:"column:id;primary_key"`
	LiveMatchStatsID LiveMatchStatsID     `gorm:"column:live_match_stats_id"`
	TeamID           nspb.TeamID          `gorm:"column:team_id"`
	GameTeam         nspb.GameTeam        `gorm:"column:game_team"`
	Name             string               `gorm:"column:name;size:255"`
	Tag              string               `gorm:"column:tag;size:255"`
	LogoID           nspb.SteamID         `gorm:"column:logo_id"`
	LogoURL          string               `gorm:"column:logo_url"`
	Score            uint32               `gorm:"column:score"`
	NetWorth         uint32               `gorm:"column:net_worth"`
	Timestamps

	LiveMatchStats *LiveMatchStats
	Team           *Team
}

LiveMatchStatsTeam ...

func (*LiveMatchStatsTeam) TableName

func (*LiveMatchStatsTeam) TableName() string

type LiveMatchStatsTeamID

type LiveMatchStatsTeamID uint64

type Match

type Match struct {
	ID                           nspb.MatchID      `gorm:"column:id;primary_key"`
	LeagueID                     nspb.LeagueID     `gorm:"column:league_id"`
	SeriesType                   nspb.SeriesType   `gorm:"column:series_type"`
	SeriesGame                   uint32            `gorm:"column:series_game"`
	GameMode                     nspb.GameMode     `gorm:"column:game_mode"`
	StartTime                    sql.NullTime      `gorm:"column:start_time"`
	Duration                     uint32            `gorm:"column:duration"`
	Outcome                      nspb.MatchOutcome `gorm:"column:outcome"`
	RadiantTeamID                nspb.TeamID       `gorm:"column:radiant_team_id"`
	RadiantTeamName              string            `gorm:"column:radiant_team_name;size:255"`
	RadiantTeamLogoURL           string            `gorm:"column:radiant_team_logo_url"`
	RadiantScore                 uint32            `gorm:"column:radiant_score"`
	DireTeamID                   nspb.TeamID       `gorm:"column:dire_team_id"`
	DireTeamName                 string            `gorm:"column:dire_team_name;size:255"`
	DireTeamLogoURL              string            `gorm:"column:dire_team_logo_url"`
	DireScore                    uint32            `gorm:"column:dire_score"`
	WeekendTourneyTournamentID   uint32            `gorm:"column:weekend_tourney_tournament_id"`
	WeekendTourneySeasonTrophyID uint32            `gorm:"column:weekend_tourney_season_trophy_id"`
	WeekendTourneyDivision       uint32            `gorm:"column:weekend_tourney_division"`
	WeekendTourneySkillLevel     uint32            `gorm:"column:weekend_tourney_skill_level"`
	Timestamps

	Players   []*MatchPlayer
	LiveMatch *LiveMatch
}

Match ...

func MatchDotaProto

func MatchDotaProto(pb *d2pb.CMsgDOTAMatchMinimal) *Match

func (*Match) TableName

func (*Match) TableName() string

type MatchPlayer

type MatchPlayer struct {
	ID         MatchPlayerID       `gorm:"column:id;primary_key"`
	MatchID    nspb.MatchID        `gorm:"column:match_id;unique_index:uix_match_players_match_id_account_id;not null"`   //nolint: lll
	AccountID  nspb.AccountID      `gorm:"column:account_id;unique_index:uix_match_players_match_id_account_id;not null"` //nolint: lll
	HeroID     nspb.HeroID         `gorm:"column:hero_id"`
	PlayerSlot nspb.GamePlayerSlot `gorm:"column:player_slot"`
	ProName    string              `gorm:"column:pro_name"`
	Kills      uint32              `gorm:"column:kills"`
	Deaths     uint32              `gorm:"column:deaths"`
	Assists    uint32              `gorm:"column:assists"`
	Items      nssql.ItemIDs       `gorm:"column:items"`
	Timestamps

	Match *Match
	Hero  *Hero
}

MatchPlayer ...

func MatchPlayerDotaProto

func MatchPlayerDotaProto(pb *d2pb.CMsgDOTAMatchMinimal_Player) *MatchPlayer

func (*MatchPlayer) TableName

func (*MatchPlayer) TableName() string

type MatchPlayerID

type MatchPlayerID uint64

type Model

type Model interface {
	TableName() string
}
var FollowedPlayerModel Model = (*FollowedPlayer)(nil)
var HeroModel Model = (*Hero)(nil)
var LeagueModel Model = (*League)(nil)
var LiveMatchModel Model = (*LiveMatch)(nil)
var LiveMatchPlayerModel Model = (*LiveMatchPlayer)(nil)
var LiveMatchStatsBuildingModel Model = (*LiveMatchStatsBuilding)(nil)
var LiveMatchStatsModel Model = (*LiveMatchStats)(nil)
var LiveMatchStatsPickBanModel Model = (*LiveMatchStatsPickBan)(nil)
var LiveMatchStatsPlayerModel Model = (*LiveMatchStatsPlayer)(nil)
var LiveMatchStatsTeamModel Model = (*LiveMatchStatsTeam)(nil)
var MatchModel Model = (*Match)(nil)
var MatchPlayerModel Model = (*MatchPlayer)(nil)
var PlayerModel Model = (*Player)(nil)
var PlayerProfileCardModel Model = (*PlayerProfileCard)(nil)
var ProPlayerModel Model = (*ProPlayer)(nil)
var SteamLoginModel Model = (*SteamLogin)(nil)
var SteamServerModel Model = (*SteamServer)(nil)
var TeamModel Model = (*Team)(nil)

type Player

type Player struct {
	ID              PlayerID       `gorm:"column:id;primary_key"`
	AccountID       nspb.AccountID `gorm:"column:account_id;unique_index;not null"`
	SteamID         nspb.SteamID   `gorm:"column:steam_id"`
	Name            string         `gorm:"column:name"`
	PersonaName     string         `gorm:"column:persona_name"`
	AvatarURL       string         `gorm:"column:avatar_url"`
	AvatarMediumURL string         `gorm:"column:avatar_medium_url"`
	AvatarFullURL   string         `gorm:"column:avatar_full_url"`
	ProfileURL      string         `gorm:"column:profile_url"`
	CountryCode     string         `gorm:"column:country_code"`
	Timestamps
}

Player ...

func (*Player) TableName

func (*Player) TableName() string

type PlayerID

type PlayerID uint64

type PlayerProfileCard

type PlayerProfileCard struct {
	ID               PlayerProfileCardID `gorm:"column:id;primary_key"`
	AccountID        nspb.AccountID      `gorm:"column:account_id;unique_index;not null"`
	BadgePoints      uint32              `gorm:"column:badge_points"`
	LeaderboardRank  uint32              `gorm:"column:leaderboard_rank"`
	RankTier         uint32              `gorm:"column:rank_tier"`
	RankTierScore    uint32              `gorm:"column:rank_tier_score"`
	RankTierMMRType  uint32              `gorm:"column:rank_tier_mmr_type"`
	PreviousRankTier uint32              `gorm:"column:previous_rank_tier"`
	IsPlusSubscriber bool                `gorm:"column:is_plus_subscriber"`
	PlusStartAt      sql.NullTime        `gorm:"column:plus_start_at"`
	EventID          uint32              `gorm:"column:event_id"`
	EventPoints      uint32              `gorm:"column:event_points"`
	Timestamps
}

func PlayerProfileCardProto

func PlayerProfileCardProto(pb *d2pb.CMsgDOTAProfileCard) *PlayerProfileCard

func (*PlayerProfileCard) TableName

func (*PlayerProfileCard) TableName() string

type PlayerProfileCardID

type PlayerProfileCardID uint64

type ProPlayer

type ProPlayer struct {
	ID          ProPlayerID      `gorm:"column:id;primary_key"`
	AccountID   nspb.AccountID   `gorm:"column:account_id;unique_index;not null"`
	TeamID      nspb.TeamID      `gorm:"column:team_id"`
	IsLocked    bool             `gorm:"column:is_locked"`
	LockedUntil sql.NullTime     `gorm:"column:locked_until"`
	FantasyRole nspb.FantasyRole `gorm:"column:fantasy_role"`
	Timestamps

	Team *Team
}

ProPlayer ...

func (*ProPlayer) TableName

func (*ProPlayer) TableName() string

type ProPlayerID

type ProPlayerID uint64

type SteamLogin

type SteamLogin struct {
	ID                        SteamLoginID           `gorm:"column:id;primary_key"`
	Username                  string                 `gorm:"column:username;size:255;unique_index;not null"`
	SteamID                   nspb.SteamID           `gorm:"column:steam_id;unique_index"`
	AccountFlags              nspb.SteamAccountFlags `gorm:"column:account_flags"`
	MachineHash               nssql.Base64Bytes      `gorm:"column:machine_hash;type:varchar(255)"`
	UniqueID                  uint32                 `gorm:"column:unique_id"`
	LoginKey                  string                 `gorm:"column:login_key;size:255"`
	WebAuthNonce              string                 `gorm:"column:web_auth_nonce;size:255"`
	WebSessionID              string                 `gorm:"column:web_session_id;size:255"`
	WebAuthToken              string                 `gorm:"column:web_auth_token;size:255"`
	WebAuthTokenSecure        string                 `gorm:"column:web_auth_token_secure;size:255"`
	SuspendedUntil            sql.NullTime           `gorm:"column:suspended_until"`
	GameVersion               uint32                 `gorm:"column:game_version"`
	LocationCountry           string                 `gorm:"column:location_country;size:255"`
	LocationLatitude          float32                `gorm:"column:location_latitude"`
	LocationLongitude         float32                `gorm:"column:location_longitude"`
	CellID                    uint32                 `gorm:"column:cell_id"`
	CellIDPingThreshold       uint32                 `gorm:"column:cell_id_ping_threshold"`
	EmailDomain               string                 `gorm:"column:email_domain;size:255"`
	VanityURL                 string                 `gorm:"column:vanity_url"`
	OutOfGameHeartbeatSeconds int32                  `gorm:"column:out_of_game_heartbeat_seconds"`
	InGameHeartbeatSeconds    int32                  `gorm:"column:in_game_heartbeat_seconds"`
	PublicIP                  uint32                 `gorm:"column:public_ip"`
	ServerTime                uint32                 `gorm:"column:server_time"`
	SteamTicket               []byte                 `gorm:"column:steam_ticket"`
	UsePics                   bool                   `gorm:"column:use_pics"`
	CountryCode               string                 `gorm:"column:country_code;size:255"`
	ParentalSettings          []byte                 `gorm:"column:parental_settings"`
	ParentalSettingSignature  []byte                 `gorm:"column:parental_setting_signature"`
	LoginFailuresToMigrate    int32                  `gorm:"column:login_failures_to_migrate"`
	DisconnectsToMigrate      int32                  `gorm:"column:disconnects_to_migrate"`
	OgsDataReportTimeWindow   int32                  `gorm:"column:ogs_data_report_time_window"`
	ClientInstanceID          uint64                 `gorm:"column:client_instance_id"`
	ForceClientUpdateCheck    bool                   `gorm:"column:force_client_update_check"`
	Timestamps
}

SteamLogin ...

func (*SteamLogin) TableName

func (*SteamLogin) TableName() string

type SteamLoginID

type SteamLoginID uint64

type SteamServer

type SteamServer struct {
	ID      SteamServerID `gorm:"column:id;primary_key"`
	Address string        `gorm:"column:address;size:255;unique_index;not null"`
	Timestamps
}

SteamServer ...

func (*SteamServer) TableName

func (*SteamServer) TableName() string

type SteamServerID

type SteamServerID uint64

type Team

type Team struct {
	ID            nspb.TeamID  `gorm:"column:id;primary_key"`
	Name          string       `gorm:"column:name;size:255;not null"`
	Tag           string       `gorm:"column:tag;size:255;not null"`
	Rating        float32      `gorm:"column:rating"`
	Wins          uint32       `gorm:"column:wins"`
	Losses        uint32       `gorm:"column:losses"`
	LogoURL       string       `gorm:"column:logo_url"`
	LastMatchTime sql.NullTime `gorm:"column:last_match_time"`
	Timestamps
}

Team ...

func (*Team) TableName

func (*Team) TableName() string

type Timestamps

type Timestamps struct {
	CreatedAt time.Time    `gorm:"column:created_at"`
	UpdatedAt time.Time    `gorm:"column:updated_at"`
	DeletedAt sql.NullTime `gorm:"column:deleted_at;index"`
}

Jump to

Keyboard shortcuts

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