13 lines
No EOL
306 B
Rust
13 lines
No EOL
306 B
Rust
use diesel::prelude::*;
|
|
use chrono;
|
|
|
|
#[derive(Queryable, Selectable)]
|
|
#[diesel(table_name = crate::schema::posts)]
|
|
#[diesel(check_for_backend(diesel::pg::Pg))]
|
|
pub struct Post {
|
|
pub id: i32,
|
|
pub title: String,
|
|
pub body: String,
|
|
pub published: bool,
|
|
pub publish_date: chrono::Timestamp
|
|
} |