use crate::sensitive::Sensitive;
use lemmy_db_schema::{
- newtypes::{CommunityId, PostId, PostReportId},
+ newtypes::{CommentId, CommunityId, DbUrl, LanguageId, PostId, PostReportId},
ListingType,
+ PostFeatureType,
SortType,
};
-use lemmy_db_views::structs::{CommentView, PostReportView, PostView};
+use lemmy_db_views::structs::{PostReportView, PostView};
use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView};
use serde::{Deserialize, Serialize};
use url::Url;
pub body: Option<String>,
pub honeypot: Option<String>,
pub nsfw: Option<bool>,
+ pub language_id: Option<LanguageId>,
pub auth: Sensitive<String>,
}
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct GetPost {
- pub id: PostId,
+ pub id: Option<PostId>,
+ pub comment_id: Option<CommentId>,
pub auth: Option<Sensitive<String>>,
}
pub struct GetPostResponse {
pub post_view: PostView,
pub community_view: CommunityView,
- pub comments: Vec<CommentView>,
pub moderators: Vec<CommunityModeratorView>,
pub online: usize,
}
pub url: Option<Url>,
pub body: Option<String>,
pub nsfw: Option<bool>,
+ pub language_id: Option<LanguageId>,
pub auth: Sensitive<String>,
}
}
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
-pub struct StickyPost {
+pub struct FeaturePost {
pub post_id: PostId,
- pub stickied: bool,
+ pub featured: bool,
+ pub feature_type: PostFeatureType,
pub auth: Sensitive<String>,
}
pub metadata: SiteMetadata,
}
-#[derive(Debug, Deserialize, Serialize, PartialEq, Clone)]
+#[derive(Debug, Deserialize, Serialize, PartialEq, Eq, Clone)]
pub struct SiteMetadata {
pub title: Option<String>,
pub description: Option<String>,
- pub(crate) image: Option<Url>,
- pub html: Option<String>,
+ pub(crate) image: Option<DbUrl>,
+ pub embed_video_url: Option<DbUrl>,
}