Work on squads, alerts on new user with empty or spy profile
Closes #1 Closes #2
This commit is contained in:
@@ -13,7 +13,6 @@ type Player struct {
|
||||
ID int `db:"id"`
|
||||
TelegramID int `db:"telegram_id"`
|
||||
LeagueID int `db:"league_id"`
|
||||
SquadID int `db:"squad_id"`
|
||||
Status string `db:"status"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
|
24
lib/dbmapping/squads.go
Normal file
24
lib/dbmapping/squads.go
Normal file
@@ -0,0 +1,24 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmapping
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
// Squad is a struct, which represents `squads` table item in databse.
|
||||
type Squad struct {
|
||||
ID int `db:"id"`
|
||||
ChatID int `db:"chat_id"`
|
||||
AuthorID int `db:"author_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
}
|
||||
|
||||
// SquadChat is a stuct, which combines information about chats and squads
|
||||
type SquadChat struct {
|
||||
Squad Squad
|
||||
Chat Chat
|
||||
IsSquad bool
|
||||
}
|
18
lib/dbmapping/squads_players.go
Normal file
18
lib/dbmapping/squads_players.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmapping
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
// SquadPlayer is a struct, which represents `squads_players` table item in databse.
|
||||
type SquadPlayer struct {
|
||||
ID int `db:"id"`
|
||||
SquadID int `db:"squad_id"`
|
||||
PlayerID int `db:"player_id"`
|
||||
AuthorID int `db:"author_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
}
|
Reference in New Issue
Block a user