surwiki/src/models.rs

35 lines
600 B
Rust
Raw Normal View History

2017-08-20 23:17:16 +03:00
use chrono;
2017-09-01 17:34:24 +03:00
#[derive(Debug, Queryable)]
2017-08-21 00:44:52 +03:00
pub struct ArticleRevision {
pub sequence_number: i32,
2017-08-21 00:44:52 +03:00
pub article_id: i32,
2017-08-20 23:17:16 +03:00
pub revision: i32,
pub created: chrono::NaiveDateTime,
pub slug: String,
2017-08-20 23:17:16 +03:00
pub title: String,
pub body: String,
pub latest: bool,
2017-10-18 17:33:21 +03:00
pub author: Option<String>,
2017-08-20 23:17:16 +03:00
}
2017-10-03 11:37:18 +03:00
#[derive(Debug, Queryable)]
pub struct ArticleRevisionStub {
pub sequence_number: i32,
pub article_id: i32,
pub revision: i32,
pub created: chrono::NaiveDateTime,
pub slug: String,
pub title: String,
pub latest: bool,
2017-10-18 17:33:21 +03:00
pub author: Option<String>,
2017-10-03 11:37:18 +03:00
}