23 lines
531 B
Rust
23 lines
531 B
Rust
use crate::schema::characters;
|
|
use rocket::http::RawStr;
|
|
use rocket::request::{self, FromParam, FromRequest, Request};
|
|
use serde_derive::Serialize;
|
|
|
|
#[derive(Serialize, Debug, Queryable)]
|
|
pub struct CharacterEntry {
|
|
pub id: i32,
|
|
pub user_id: i32,
|
|
pub viewable: bool,
|
|
pub name: String,
|
|
pub data: Option<Vec<u8>>,
|
|
}
|
|
|
|
#[derive(Insertable)]
|
|
#[table_name = "characters"]
|
|
pub struct NewCharacter<'a> {
|
|
pub user_id: i32,
|
|
pub viewable: bool,
|
|
pub character_name: &'a str,
|
|
pub character_data: &'a [u8],
|
|
}
|