use crate::{
schema::{post, post_like, post_read, post_saved},
- Url,
+ DbUrl,
};
use serde::Serialize;
pub struct Post {
pub id: i32,
pub name: String,
- pub url: Option<String>,
+ pub url: Option<DbUrl>,
pub body: Option<String>,
pub creator_id: i32,
pub community_id: i32,
pub embed_title: Option<String>,
pub embed_description: Option<String>,
pub embed_html: Option<String>,
- pub thumbnail_url: Option<String>,
- pub ap_id: Url,
+ pub thumbnail_url: Option<DbUrl>,
+ pub ap_id: DbUrl,
pub local: bool,
}
#[table_name = "post"]
pub struct PostForm {
pub name: String,
- pub url: Option<String>,
+ pub url: Option<DbUrl>,
pub body: Option<String>,
pub creator_id: i32,
pub community_id: i32,
pub embed_title: Option<String>,
pub embed_description: Option<String>,
pub embed_html: Option<String>,
- pub thumbnail_url: Option<String>,
- pub ap_id: Option<Url>,
+ pub thumbnail_url: Option<DbUrl>,
+ pub ap_id: Option<DbUrl>,
pub local: bool,
}