Database connections, refactoring, pokememe parsing in progress
This commit is contained in:
17
lib/dbmappings/elements.go
Normal file
17
lib/dbmappings/elements.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmappings
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
type Elements struct {
|
||||
Id int `db:"id"`
|
||||
Symbol string `db:"symbol"`
|
||||
Name string `db:"name"`
|
||||
League_id int `db:"league_id"`
|
||||
Created_at *time.Time `db:"created_at"`
|
||||
}
|
16
lib/dbmappings/leagues.go
Normal file
16
lib/dbmappings/leagues.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmappings
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
type Leagues struct {
|
||||
Id int `db:"id"`
|
||||
Symbol string `db:"symbol"`
|
||||
Name string `db:"league_id"`
|
||||
Created_at *time.Time `db:"created_at"`
|
||||
}
|
16
lib/dbmappings/locations.go
Normal file
16
lib/dbmappings/locations.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmappings
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
type Locations struct {
|
||||
Id int `db:"id"`
|
||||
Symbol string `db:"symbol"`
|
||||
Name string `db:"league_id"`
|
||||
Created_at *time.Time `db:"created_at"`
|
||||
}
|
19
lib/dbmappings/players.go
Normal file
19
lib/dbmappings/players.go
Normal file
@@ -0,0 +1,19 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmappings
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
type Players struct {
|
||||
Id int `db:"id"`
|
||||
Telegram_id int `db:"telegram_id"`
|
||||
League_id int `db:"league_id"`
|
||||
Squad_id int `db:"squad_id"`
|
||||
Status string `db:"status"`
|
||||
Created_at *time.Time `db:"created_at"`
|
||||
Updated_at *time.Time `db:"updated_at"`
|
||||
}
|
25
lib/dbmappings/pokememes.go
Normal file
25
lib/dbmappings/pokememes.go
Normal file
@@ -0,0 +1,25 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmappings
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
type Pokememes struct {
|
||||
Id int `db:"id"`
|
||||
Grade int `db:"grade"`
|
||||
Name string `db:"league_id"`
|
||||
Description string `db:"description"`
|
||||
Attack int `db:"attack"`
|
||||
HP int `db:"int"`
|
||||
MP int `db:"mp"`
|
||||
Defence int `db:"defence"`
|
||||
Price int `db:"price"`
|
||||
Purchaseable bool `db:"purchaseable"`
|
||||
Image_url string `db:"image_url"`
|
||||
Player_id int `db:"player_id"`
|
||||
Created_at *time.Time `db:"created_at"`
|
||||
}
|
16
lib/dbmappings/pokememes_elements.go
Normal file
16
lib/dbmappings/pokememes_elements.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmappings
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
type PokememesElements struct {
|
||||
Id int `db:"id"`
|
||||
Pokememe_id int `db:"pokememe_id"`
|
||||
Element_id int `db:"element_id"`
|
||||
Created_at *time.Time `db:"created_at"`
|
||||
}
|
16
lib/dbmappings/pokememes_locations.go
Normal file
16
lib/dbmappings/pokememes_locations.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmappings
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
type PokememesLocations struct {
|
||||
Id int `db:"id"`
|
||||
Pokememe_id int `db:"pokememe_id"`
|
||||
Location_id int `db:"location_id"`
|
||||
Created_at *time.Time `db:"created_at"`
|
||||
}
|
23
lib/dbmappings/profiles.go
Normal file
23
lib/dbmappings/profiles.go
Normal file
@@ -0,0 +1,23 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmappings
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
type Profiles struct {
|
||||
Id int `db:"id"`
|
||||
Player_id int `db:"player_id"`
|
||||
Nickname string `db:"nickname"`
|
||||
TelegramNickname string `db:"telegram_nickname"`
|
||||
Level_id int `db:"level_id"`
|
||||
Exp int `db:"exp"`
|
||||
Egg_exp int `db:"egg_exp"`
|
||||
Power int `db:"power"`
|
||||
Weapon_id int `db:"weapon_id"`
|
||||
Crystalls int `db:"crystalls"`
|
||||
Created_at *time.Time `db:"created_at"`
|
||||
}
|
Reference in New Issue
Block a user