separated model into separate file

This commit is contained in:
2023-01-21 18:02:18 +09:00
parent d94fecc496
commit a5dfd5bf88
2 changed files with 25 additions and 41 deletions

22
src-tauri/src/model.rs Normal file
View File

@@ -0,0 +1,22 @@
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,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Autosearch {
pub id: i64,
pub name: String,
}