models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JokeTypeText string = "text"
	JokeTypeImg  string = "img"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Hero

type Hero struct {
	Name          string `json:"name"`
	ID            int    `json:"id"`
	LocalizedName string `json:"localized_name"`
	gorm.Model
}

type Joke

type Joke struct {
	Content       string `gorm:"type:longtext"`
	Type          string `gorm:"default:text;not null"`
	LimitedHeroId *int   `gorm:"index"`
	gorm.Model
}

type MatchPlayer

type MatchPlayer struct {
	MatchID      int64  `json:"match_id" gorm:"index"`
	PlayerID     string `gorm:"index"`
	PlayerSlot   int    `json:"player_slot" gorm:"not null"`
	RadiantWin   bool   `json:"radiant_win" gorm:"not null"`
	Duration     int    `json:"duration" gorm:"not null"`
	GameMode     int    `json:"game_mode" gorm:"not null"`
	LobbyType    int    `json:"lobby_type" gorm:"not null"`
	HeroID       int    `json:"hero_id" gorm:"not null"`
	StartTime    int    `json:"start_time" gorm:"not null"`
	Version      int    `json:"version" gorm:"not null"`
	Kills        int    `json:"kills" gorm:"not null"`
	Deaths       int    `json:"deaths" gorm:"not null"`
	Assists      int    `json:"assists" gorm:"not null"`
	Skill        *int   `json:"skill"`
	LeaverStatus int    `json:"leaver_status" gorm:"not null"`
	PartySize    int    `json:"party_size" gorm:"not null"`
	gorm.Model
}

func (MatchPlayer) IsWin

func (m MatchPlayer) IsWin() bool

func (MatchPlayer) SkillString

func (m MatchPlayer) SkillString() string

type SteamApiResult

type SteamApiResult struct {
	Result struct {
		Heroes []Hero `json:"heroes"`
		Status int    `json:"status"`
		Count  int    `json:"count"`
	} `json:"result"`
}

type SubscribePlayer

type SubscribePlayer struct {
	GroupID  int    `gorm:"index; not null"` // 群ID
	PlayerID string `gorm:"index; not null"` // 玩家ID
	Alias    string `gorm:"not null"`        // 别名
	gorm.Model
}

func (SubscribePlayer) Name

func (sp SubscribePlayer) Name() string

Jump to

Keyboard shortcuts

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