blob: 67038f1539ca3058d2e408421f8e9de855fe1792 (
plain) (
tree)
|
|
use super::schema::posts;
#[derive(Serialize, Queryable)]
pub struct Post {
pub id: i32,
pub title: String,
pub body: String,
pub published: bool,
}
#[derive(Default, FromForm, Insertable)]
#[table_name="posts"]
pub struct NewPost {
pub title: String,
pub body: String,
pub published: bool,
}
|