| 1 |
|
| 2 |
|
| 3 |
use chrono::{DateTime, Utc}; |
| 4 |
use serde::Serialize; |
| 5 |
use sqlx::FromRow; |
| 6 |
|
| 7 |
use super::super::id_types::*; |
| 8 |
use super::super::validated_types::*; |
| 9 |
|
| 10 |
|
| 11 |
#[derive(Debug, Clone, FromRow, Serialize)] |
| 12 |
pub struct DbBlogPost { |
| 13 |
|
| 14 |
pub id: BlogPostId, |
| 15 |
|
| 16 |
pub project_id: ProjectId, |
| 17 |
|
| 18 |
pub author_id: UserId, |
| 19 |
|
| 20 |
pub title: String, |
| 21 |
|
| 22 |
pub slug: Slug, |
| 23 |
|
| 24 |
pub body_markdown: String, |
| 25 |
|
| 26 |
pub body_html: String, |
| 27 |
|
| 28 |
pub published_at: Option<DateTime<Utc>>, |
| 29 |
|
| 30 |
pub created_at: DateTime<Utc>, |
| 31 |
|
| 32 |
pub updated_at: DateTime<Utc>, |
| 33 |
|
| 34 |
pub publish_at: Option<DateTime<Utc>>, |
| 35 |
|
| 36 |
pub mt_thread_id: Option<MtThreadId>, |
| 37 |
|
| 38 |
pub web_only: bool, |
| 39 |
|
| 40 |
|
| 41 |
pub show_on_landing: bool, |
| 42 |
|
| 43 |
pub release_announced_at: Option<DateTime<Utc>>, |
| 44 |
} |
| 45 |
|