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};
13 #[derive(Deserialize, Debug)]
14 pub struct CreatePost {
17 pub body: Option<String>,
19 pub community_id: i32,
23 #[derive(Serialize, Clone)]
24 pub struct PostResponse {
25 pub post_view: PostView,
28 #[derive(Deserialize)]
31 pub auth: Option<String>,
35 pub struct GetPostResponse {
36 pub post_view: PostView,
37 pub community_view: CommunityView,
38 pub comments: Vec<CommentView>,
39 pub moderators: Vec<CommunityModeratorView>,
43 #[derive(Deserialize, Debug)]
47 pub page: Option<i64>,
48 pub limit: Option<i64>,
49 pub community_id: Option<i32>,
50 pub community_name: Option<String>,
51 pub auth: Option<String>,
54 #[derive(Serialize, Debug)]
55 pub struct GetPostsResponse {
56 pub posts: Vec<PostView>,
59 #[derive(Deserialize)]
60 pub struct CreatePostLike {
66 #[derive(Deserialize)]
71 pub body: Option<String>,
76 #[derive(Deserialize)]
77 pub struct DeletePost {
83 #[derive(Deserialize)]
84 pub struct RemovePost {
87 pub reason: Option<String>,
91 #[derive(Deserialize)]
98 #[derive(Deserialize)]
99 pub struct StickyPost {
105 #[derive(Deserialize)]
106 pub struct SavePost {
112 #[derive(Serialize, Deserialize)]
113 pub struct CreatePostReport {
119 #[derive(Serialize, Deserialize, Clone)]
120 pub struct CreatePostReportResponse {
124 #[derive(Serialize, Deserialize, Debug)]
125 pub struct ResolvePostReport {
131 #[derive(Serialize, Deserialize, Clone, Debug)]
132 pub struct ResolvePostReportResponse {
137 #[derive(Serialize, Deserialize, Debug)]
138 pub struct ListPostReports {
139 pub page: Option<i64>,
140 pub limit: Option<i64>,
141 pub community: Option<i32>,
145 #[derive(Serialize, Clone, Debug)]
146 pub struct ListPostReportsResponse {
147 pub posts: Vec<PostReportView>,