42 lines
931 B
Rust
42 lines
931 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
|
pub struct SearchResult {
|
|
pub id: i64,
|
|
pub name: String,
|
|
pub types: String,
|
|
pub hp: i64,
|
|
pub attack: i64,
|
|
pub defense: i64,
|
|
pub special_attack: i64,
|
|
pub special_defense: i64,
|
|
pub speed: i64,
|
|
pub abilities: String,
|
|
pub thumbnail: String,
|
|
pub learnset: Vec<PokemonDataLearnset>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
|
pub struct PokemonDataLearnset {
|
|
pub id: i64,
|
|
pub learnset_id: i64,
|
|
pub name: String,
|
|
pub types: Vec<i64>,
|
|
pub power: i64,
|
|
pub category: i64,
|
|
}
|
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
|
pub struct MoveSearchResult {
|
|
pub id: i64,
|
|
pub name: String,
|
|
pub types: String,
|
|
pub power: i64,
|
|
pub category: i64,
|
|
pub priority: i64,
|
|
pub condition: Option<String>,
|
|
}
|
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
|
pub struct Autosearch {
|
|
pub id: i64,
|
|
pub name: String,
|
|
} |