2020-09-29 21:27:11 +00:00
|
|
|
use chrono::{DateTime, Utc};
|
2020-09-29 00:33:43 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use sqlx::{self, FromRow};
|
|
|
|
|
|
|
|
#[derive(Clone, Serialize, Deserialize, Debug, FromRow)]
|
|
|
|
pub struct RawPage {
|
2020-09-30 01:24:34 +00:00
|
|
|
pub id: i64,
|
|
|
|
pub slug: String,
|
|
|
|
pub title: String,
|
|
|
|
pub note_id: i64,
|
|
|
|
pub creation_date: DateTime<Utc>,
|
|
|
|
pub updated_date: DateTime<Utc>,
|
|
|
|
pub lastview_date: DateTime<Utc>,
|
|
|
|
pub deleted_date: Option<DateTime<Utc>>,
|
2020-09-29 00:33:43 +00:00
|
|
|
}
|
2020-09-29 14:44:43 +00:00
|
|
|
|
|
|
|
#[derive(Clone, Serialize, Deserialize, Debug, FromRow)]
|
|
|
|
pub struct RawNote {
|
2020-09-30 01:24:34 +00:00
|
|
|
pub id: i64,
|
|
|
|
pub uuid: String,
|
|
|
|
pub content: String,
|
|
|
|
pub notetype: String,
|
|
|
|
pub creation_date: DateTime<Utc>,
|
|
|
|
pub updated_date: DateTime<Utc>,
|
|
|
|
pub lastview_date: DateTime<Utc>,
|
|
|
|
pub deleted_date: Option<DateTime<Utc>>,
|
2020-09-29 14:44:43 +00:00
|
|
|
}
|