Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chat ¶
type Chat struct { ID int64 `gorm:"primary_key;auto_increment:false"` Title sql.NullString Username sql.NullString }
type ChatRepository ¶
type Game ¶
type Game struct { ID uuid.UUID `gorm:"primary_key;size:36;<-:create"` ChatID int64 Chat Chat OwnerID int64 Owner User Gunslingers []*Gunslinger CreatedAt time.Time PlayedAt sql.NullTime }
func (*Game) MarkAsPlayed ¶
func (g *Game) MarkAsPlayed()
type GameRepository ¶
type Gunslinger ¶
type Gunslinger struct { ID uuid.UUID `gorm:"primary_key;size:36;<-:create"` GameID uuid.UUID Game *Game PlayerID int64 Player User JoinedAt time.Time ShotHimself bool }
func NewGunslinger ¶
func NewGunslinger(gameID uuid.UUID, playerID int64) *Gunslinger
func (*Gunslinger) MarkAsShotHimself ¶
func (g *Gunslinger) MarkAsShotHimself()
type GunslingerRepository ¶
type GunslingerRepository interface { Store(*Gunslinger) error Update(*Gunslinger) error IsPlayerExistsInGame(userID int64, gameID uuid.UUID) bool GetTopShotPlayersInChat(int64) ([]GunslingerTopShotPlayer, error) GetTopShopPlayersByYearInChat(chatID int64, year int) ([]GunslingerTopShotPlayer, error) CountNumberOfPlayerGamesInChat(userID int64, chatID int64) int64 CountNumberOfSelfShotsInChat(userID int64, chatID int64) int64 }
type GunslingerTopShotPlayer ¶
Click to show internal directories.
Click to hide internal directories.