2 comment_view::CommentView,
3 post_report_view::PostReportView,
6 use lemmy_db_views_actor::{
7 community_moderator_view::CommunityModeratorView,
8 community_view::CommunityView,
10 use serde::{Deserialize, Serialize};
12 #[derive(Deserialize, Debug)]
13 pub struct CreatePost {
15 pub url: Option<String>,
16 pub body: Option<String>,
18 pub community_id: i32,
22 #[derive(Serialize, Clone)]
23 pub struct PostResponse {
24 pub post_view: PostView,
27 #[derive(Deserialize)]
30 pub auth: Option<String>,
34 pub struct GetPostResponse {
35 pub post_view: PostView,
36 pub community_view: CommunityView,
37 pub comments: Vec<CommentView>,
38 pub moderators: Vec<CommunityModeratorView>,
42 #[derive(Deserialize, Debug)]
46 pub page: Option<i64>,
47 pub limit: Option<i64>,
48 pub community_id: Option<i32>,
49 pub community_name: Option<String>,
50 pub auth: Option<String>,
53 #[derive(Serialize, Debug)]
54 pub struct GetPostsResponse {
55 pub posts: Vec<PostView>,
58 #[derive(Deserialize)]
59 pub struct CreatePostLike {
65 #[derive(Deserialize)]
69 pub url: Option<String>,
70 pub body: Option<String>,
75 #[derive(Deserialize)]
76 pub struct DeletePost {
82 #[derive(Deserialize)]
83 pub struct RemovePost {
86 pub reason: Option<String>,
90 #[derive(Deserialize)]
97 #[derive(Deserialize)]
98 pub struct StickyPost {
104 #[derive(Deserialize)]
105 pub struct SavePost {
111 #[derive(Serialize, Deserialize)]
112 pub struct CreatePostReport {
118 #[derive(Serialize, Deserialize, Clone)]
119 pub struct CreatePostReportResponse {
123 #[derive(Serialize, Deserialize, Debug)]
124 pub struct ResolvePostReport {
130 #[derive(Serialize, Deserialize, Clone, Debug)]
131 pub struct ResolvePostReportResponse {
136 #[derive(Serialize, Deserialize, Debug)]
137 pub struct ListPostReports {
138 pub page: Option<i64>,
139 pub limit: Option<i64>,
140 pub community: Option<i32>,
144 #[derive(Serialize, Clone, Debug)]
145 pub struct ListPostReportsResponse {
146 pub posts: Vec<PostReportView>,