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 {
|
2017-09-20 12:54:26 +03:00
|
|
|
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,
|
|
|
|
|
2017-09-20 12:54:26 +03:00
|
|
|
pub slug: String,
|
2017-08-20 23:17:16 +03:00
|
|
|
pub title: String,
|
|
|
|
pub body: String,
|
2017-09-20 12:54:26 +03:00
|
|
|
|
|
|
|
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
|
|
|
}
|
2017-10-24 17:48:16 +03:00
|
|
|
|
2017-10-25 12:39:19 +03:00
|
|
|
#[derive(Debug, Queryable, Serialize)]
|
2017-10-24 17:48:16 +03:00
|
|
|
pub struct SearchResult {
|
|
|
|
pub title: String,
|
|
|
|
pub snippet: String,
|
|
|
|
pub slug: String,
|
|
|
|
}
|