models

package
v0.0.0-...-a1e6c29 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Zlib Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAOTCycleCtrlByGuild

func DeleteAOTCycleCtrlByGuild(ctx context.Context, db *pgxpool.Conn, gid int64) (err error)

func DeleteAOTGuardsByGuild

func DeleteAOTGuardsByGuild(ctx context.Context, db *pgxpool.Conn, gid int64) (err error)

func DeleteAOTRaidsByGuild

func DeleteAOTRaidsByGuild(ctx context.Context, db *pgxpool.Conn, gid int64) (err error)

Types

type AOTAnkhtion

type AOTAnkhtion struct {
	GuildID       int64
	StartTime     time.Time
	PriceSchedule []int
}

func AOTAnkhtionByGuild

func AOTAnkhtionByGuild(ctx context.Context, db *pgxpool.Conn, gid int64) (ankhtion AOTAnkhtion, err error)

func (*AOTAnkhtion) Insert

func (ankhtion *AOTAnkhtion) Insert(ctx context.Context, db *pgxpool.Conn) (err error)

func (*AOTAnkhtion) Update

func (ankhtion *AOTAnkhtion) Update(ctx context.Context, db *pgxpool.Conn, startTime time.Time, priceSchedule []int) (err error)

type AOTCycleCtrl

type AOTCycleCtrl struct {
	GuildID     int64
	TimeArmed   time.Time
	ArmedUserID int64
}

func AOTCycleCtrlByGuild

func AOTCycleCtrlByGuild(ctx context.Context, db *pgxpool.Conn, gid int64) (ctrl AOTCycleCtrl, err error)

func (*AOTCycleCtrl) Insert

func (ctrl *AOTCycleCtrl) Insert(ctx context.Context, db *pgxpool.Conn) (err error)

func (*AOTCycleCtrl) Update

func (ctrl *AOTCycleCtrl) Update(ctx context.Context, db *pgxpool.Conn, timeArmed time.Time, armedUID int64) (err error)

type AOTGuard

type AOTGuard struct {
	GuildID  int64
	UserID   int64
	Reactor  int16
	Spearmen int
	Archers  int
}

func AOTGuardsByGuild

func AOTGuardsByGuild(ctx context.Context, db *pgxpool.Conn, gid int64) (gs []AOTGuard, err error)

func AOTGuardsByGuildUser

func AOTGuardsByGuildUser(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (gs []AOTGuard, err error)

func (*AOTGuard) Insert

func (g *AOTGuard) Insert(ctx context.Context, db *pgxpool.Conn) (err error)

func (*AOTGuard) Update

func (g *AOTGuard) Update(ctx context.Context, db *pgxpool.Conn, spearmen int, archers int) (err error)

type AOTPlayer

type AOTPlayer struct {
	GuildID   int64
	UserID    int64
	Amethysts int
	Ankhs     int
	Spearmen  int
	Archers   int
}

func AOTPlayerByGuildUser

func AOTPlayerByGuildUser(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (p AOTPlayer, err error)

func AOTPlayersByGuild

func AOTPlayersByGuild(ctx context.Context, db *pgxpool.Conn, gid int64) (ps []AOTPlayer, err error)

func (*AOTPlayer) Insert

func (p *AOTPlayer) Insert(ctx context.Context, db *pgxpool.Conn) (err error)

func (*AOTPlayer) UpdateAmethysts

func (p *AOTPlayer) UpdateAmethysts(ctx context.Context, db *pgxpool.Conn, amethysts int) (err error)

func (*AOTPlayer) UpdateAnkhs

func (p *AOTPlayer) UpdateAnkhs(ctx context.Context, db *pgxpool.Conn, ankhs int) (err error)

func (*AOTPlayer) UpdateAnkhsBandits

func (p *AOTPlayer) UpdateAnkhsBandits(ctx context.Context, db *pgxpool.Conn, ankhs int, spearmen int, archers int) (err error)

func (*AOTPlayer) UpdateBandits

func (p *AOTPlayer) UpdateBandits(ctx context.Context, db *pgxpool.Conn, spearmen int, archers int) (err error)

type AOTRaid

type AOTRaid struct {
	GuildID        int64
	AttackerUserID int64
	DefenderUserID int64
	Reactor        int16
	Spearmen       int
	Archers        int
}

func AOTRaidByGuildAttacker

func AOTRaidByGuildAttacker(ctx context.Context, db *pgxpool.Conn, gid int64, uidAtk int64) (r AOTRaid, err error)

func AOTRaidsByGuild

func AOTRaidsByGuild(ctx context.Context, db *pgxpool.Conn, gid int64) (rs []AOTRaid, err error)

func (*AOTRaid) Insert

func (r *AOTRaid) Insert(ctx context.Context, db *pgxpool.Conn) (err error)

func (*AOTRaid) Update

func (r *AOTRaid) Update(ctx context.Context, db *pgxpool.Conn, uidDef int64, reactor int16, spearmen int, archers int) (err error)

type Wallet

type Wallet struct {
	GuildID       int64
	UserID        int64
	Tukens        int64
	TimeLastMined time.Time
}

func WalletByGuildUser

func WalletByGuildUser(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (w Wallet, err error)

func WalletsByGuild

func WalletsByGuild(ctx context.Context, db *pgxpool.Conn, gid int64) (ws []Wallet, err error)

func (*Wallet) Insert

func (w *Wallet) Insert(ctx context.Context, db *pgxpool.Conn) (err error)

func (*Wallet) UpdateTukens

func (w *Wallet) UpdateTukens(ctx context.Context, db *pgxpool.Conn, tukens int64) (err error)

func (*Wallet) UpdateTukensMine

func (w *Wallet) UpdateTukensMine(ctx context.Context, db *pgxpool.Conn, tukens int64, timeLastMined time.Time) (err error)

Jump to

Keyboard shortcuts

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