dbmapping

package
v0.0.0-...-3723a19 Latest Latest
Warning

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

Go to latest
Published: May 19, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alarm

type Alarm struct {
	ID           int       `db:"id"`
	PlayerID     int       `db:"player_id"`
	TurnirNumber int       `db:"turnir_number"` // From 1 to 12
	CreatedAt    time.Time `db:"created_at"`
}

Alarm is a struct, which represents `alarms` table item in database.

type Broadcast

type Broadcast struct {
	ID            int       `db:"id"`
	Text          string    `db:"text"`
	BroadcastType string    `db:"broadcast_type"`
	Status        string    `db:"status"`
	AuthorID      int       `db:"author_id"`
	CreatedAt     time.Time `db:"created_at"`
}

Broadcast is a struct, which represents `broadcast` table item in databse.

type Chat

type Chat struct {
	ID         int       `db:"id"`
	Name       string    `db:"name"`
	ChatType   string    `db:"chat_type"`
	TelegramID int64     `db:"telegram_id"`
	CreatedAt  time.Time `db:"created_at"`
}

Chat is a struct, which represents `chats` table item in databse.

type ChatSquad

type ChatSquad struct {
	Chat     Chat
	Squad    Squad
	ChatRole string
}

ChatSquad is a stuct, which combines information about chats and squads

type Order

type Order struct {
	ID           int            `db:"id"`
	Target       string         `db:"target"`
	TargetSquads string         `db:"target_squads"`
	Scheduled    bool           `db:"scheduled"`
	ScheduledAt  mysql.NullTime `db:"scheduled_at"`
	Status       string         `db:"status"`
	AuthorID     int            `db:"author_id"`
	CreatedAt    time.Time      `db:"created_at"`
}

Order is a struct, which represents `orders` table item in databse.

type OrderCompletion

type OrderCompletion struct {
	ID         int       `db:"id"`
	OrderID    int       `db:"order_id"`
	ExecutorID int       `db:"executor_id"`
	CreatedAt  time.Time `db:"created_at"`
}

OrderCompletion is a struct, which represents `orders_completions` table item in databse.

type Player

type Player struct {
	ID         int       `db:"id"`
	TelegramID int       `db:"telegram_id"`
	LeagueID   int       `db:"league_id"`
	Status     string    `db:"status"`
	Karma      int       `db:"karma"`
	CreatedAt  time.Time `db:"created_at"`
	UpdatedAt  time.Time `db:"updated_at"`
}

Player is a struct, which represents `players` table item in databse.

type PlayerProfile

type PlayerProfile struct {
	Player      Player
	Profile     Profile
	League      datamapping.League
	HaveProfile bool
}

PlayerProfile is a struch which handles all user information

type Profile

type Profile struct {
	ID               int       `db:"id"`
	PlayerID         int       `db:"player_id"`
	Nickname         string    `db:"nickname"`
	TelegramNickname string    `db:"telegram_nickname"`
	LevelID          int       `db:"level_id"`
	Pokeballs        int       `db:"pokeballs"`
	Wealth           int       `db:"wealth"`
	PokememesWealth  int       `db:"pokememes_wealth"`
	Exp              int       `db:"exp"`
	EggExp           int       `db:"egg_exp"`
	Power            int       `db:"power"`
	WeaponID         int       `db:"weapon_id"`
	Crystals         int       `db:"crystalls"`
	CreatedAt        time.Time `db:"created_at"`
}

Profile is a struct, which represents `profiles` table item in database.

type ProfilePokememe

type ProfilePokememe struct {
	ID             int       `db:"id"`
	ProfileID      int       `db:"profile_id"`
	PokememeID     int       `db:"pokememe_id"`
	PokememeAttack int       `db:"pokememe_attack"`
	PokememeRarity string    `db:"pokememe_rarity"`
	CreatedAt      time.Time `db:"created_at"`
}

ProfilePokememe is a struct, which represents `profiles_pokememes` table item in databse.

type ProfileWithPokememes

type ProfileWithPokememes struct {
	Profile   Profile
	Pokememes ProfilePokememe
}

ProfileWithPokememes is a struct, which represents full profile with current hand

type Squad

type Squad struct {
	ID         int       `db:"id"`
	ChatID     int       `db:"chat_id"`
	MinLevel   int       `db:"min_level"`
	MaxLevel   int       `db:"max_level"`
	InviteLink string    `db:"invite_link"`
	CreatedAt  time.Time `db:"created_at"`
}

Squad is a struct, which represents `squads` table item in databse.

type SquadChat

type SquadChat struct {
	Squad Squad
	Chat  Chat
}

SquadChat is a stuct, which combines information about chats and squads

type SquadPlayer

type SquadPlayer struct {
	ID        int       `db:"id"`
	SquadID   int       `db:"squad_id"`
	PlayerID  int       `db:"player_id"`
	UserType  string    `db:"user_type"`
	AuthorID  int       `db:"author_id"`
	CreatedAt time.Time `db:"created_at"`
}

SquadPlayer is a struct, which represents `squads_players` table item in databse.

type SquadPlayerFull

type SquadPlayerFull struct {
	Squad    SquadChat
	Player   Player
	Profile  Profile
	UserRole string
}

SquadPlayerFull is a struct, which handles all related information

type TournamentReport

type TournamentReport struct {
	ID               int       `db:"id"`
	PlayerID         int       `db:"player_id"`
	TournamentNumber int       `db:"tournament_number"`
	Target           string    `db:"target"`
	CreatedAt        time.Time `db:"created_at"`
}

TournamentReport is a struct, which represents `tournament_reports` table item in database.

Jump to

Keyboard shortcuts

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