Profiles parsing and saving
This commit is contained in:
@@ -11,6 +11,6 @@ import (
|
||||
type Leagues struct {
|
||||
Id int `db:"id"`
|
||||
Symbol string `db:"symbol"`
|
||||
Name string `db:"league_id"`
|
||||
Name string `db:"name"`
|
||||
Created_at *time.Time `db:"created_at"`
|
||||
}
|
||||
|
16
lib/dbmappings/levels.go
Normal file
16
lib/dbmappings/levels.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmappings
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
type Levels struct {
|
||||
Id int `db:"id"`
|
||||
Max_exp int `db:"max_exp"`
|
||||
Max_egg int `db:"max_egg"`
|
||||
Created_at time.Time `db:"created_at"`
|
||||
}
|
@@ -14,6 +14,8 @@ type Profiles struct {
|
||||
Nickname string `db:"nickname"`
|
||||
TelegramNickname string `db:"telegram_nickname"`
|
||||
Level_id int `db:"level_id"`
|
||||
Pokeballs int `db:"pokeballs"`
|
||||
Wealth int `db:"wealth"`
|
||||
Exp int `db:"exp"`
|
||||
Egg_exp int `db:"egg_exp"`
|
||||
Power int `db:"power"`
|
||||
|
18
lib/dbmappings/profiles_pokememes.go
Normal file
18
lib/dbmappings/profiles_pokememes.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmappings
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
type ProfilesPokememes struct {
|
||||
Id int `db:"id"`
|
||||
Profile_id int `db:"profile_id"`
|
||||
Pokememe_id int `db:"pokememe_id"`
|
||||
Pokememe_lvl int `db:"pokememe_lvl"`
|
||||
Pokememe_rarity string `db:"pokememe_rarity"`
|
||||
Created_at time.Time `db:"created_at"`
|
||||
}
|
17
lib/dbmappings/weapons.go
Normal file
17
lib/dbmappings/weapons.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmappings
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"time"
|
||||
)
|
||||
|
||||
type Weapons struct {
|
||||
Id int `db:"id"`
|
||||
Name string `db:"name"`
|
||||
Power int `db:"power"`
|
||||
Price int `db:"price"`
|
||||
Created_at time.Time `db:"created_at"`
|
||||
}
|
Reference in New Issue
Block a user