Archived
1

Profiles parsing and saving

This commit is contained in:
Vladimir Hodakov
2017-10-11 06:53:50 +04:00
parent 736d6b9658
commit 92fa488828
20 changed files with 748 additions and 8 deletions

View File

@@ -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
View 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"`
}

View File

@@ -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"`

View 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
View 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"`
}