use serde::{Serialize, Deserialize}; use diesel::Queryable; use crate::schema::posts; #[derive(Queryable, Insertable, Serialize, Deserialize)] #[table_name="posts"] pub struct Post { pub id: i32, pub title: String, pub body: String, pub published: bool } #[derive(Serialize)] pub struct PostResponse<'a> { pub msg: &'a str }