29 lines
714 B
Rust
29 lines
714 B
Rust
use serde::{Deserialize, Serialize};
|
|
use sqlx::prelude::FromRow;
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, FromRow)]
|
|
pub struct OriginOrLocation {
|
|
pub name: String,
|
|
pub url: String,
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, FromRow)]
|
|
pub struct Character {
|
|
pub id: i64,
|
|
pub rmid: i32, // Rick&Morty ID, don't confuse with _id
|
|
pub name: String,
|
|
pub status: String,
|
|
pub species: String,
|
|
pub r#type: String,
|
|
pub gender: String,
|
|
pub origin_name: String,
|
|
pub origin_url: String,
|
|
pub location_name: String,
|
|
pub location_url: String,
|
|
pub image: String,
|
|
pub episode: String,
|
|
pub url: String,
|
|
pub created: String,
|
|
pub elo_rating: f64,
|
|
}
|