Add pokememes info, convert it to new format and drop unnecessary database tables
This commit introduces pokememes information storage in source code (because they're rarely changed and I always update them manually). All information about pokememes updated after nerf of 25 April. Also, added buttons to /pokedeks command for changing pages (there are 21 pages already!), and limited one page to 35 pokememes.
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmapping
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Level is a struct, which represents `levels` table item in databse.
|
||||
type Level struct {
|
||||
ID int `db:"id"`
|
||||
MaxExp int `db:"max_exp"`
|
||||
MaxEgg int `db:"max_egg"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
// i2_bot – Instinct PokememBro Bot
|
||||
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
||||
|
||||
package dbmapping
|
||||
|
||||
import (
|
||||
"source.wtfteam.pro/i2_bot/i2_bot/lib/datamapping"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Pokememe is a struct, which represents `pokememes` table item in databse.
|
||||
type Pokememe struct {
|
||||
ID int `db:"id"`
|
||||
Grade int `db:"grade"`
|
||||
Name string `db:"name"`
|
||||
Description string `db:"description"`
|
||||
Attack int `db:"attack"`
|
||||
HP int `db:"hp"`
|
||||
MP int `db:"mp"`
|
||||
Defence int `db:"defence"`
|
||||
Price int `db:"price"`
|
||||
Purchaseable bool `db:"purchaseable"`
|
||||
ImageURL string `db:"image_url"`
|
||||
PlayerID int `db:"player_id"`
|
||||
IsActive int `db:"is_active"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
}
|
||||
|
||||
// PokememeFull is a struct for handling pokememe with all informations about locations and elements
|
||||
type PokememeFull struct {
|
||||
Pokememe Pokememe
|
||||
Locations []datamapping.Location
|
||||
Elements []datamapping.Element
|
||||
}
|
Reference in New Issue
Block a user