2 comment_view::CommentView,
3 community::community_moderator_view::CommunityModeratorView,
4 post_report_view::PostReportView,
7 use serde::{Deserialize, Serialize};
9 #[derive(Deserialize, Debug)]
10 pub struct CreatePost {
12 pub url: Option<String>,
13 pub body: Option<String>,
15 pub community_id: i32,
19 #[derive(Serialize, Clone)]
20 pub struct PostResponse {
21 pub post_view: PostView,
24 #[derive(Deserialize)]
27 pub auth: Option<String>,
31 pub struct GetPostResponse {
32 pub post_view: PostView,
33 pub comments: Vec<CommentView>,
34 pub moderators: Vec<CommunityModeratorView>,
38 #[derive(Deserialize, Debug)]
42 pub page: Option<i64>,
43 pub limit: Option<i64>,
44 pub community_id: Option<i32>,
45 pub community_name: Option<String>,
46 pub auth: Option<String>,
49 #[derive(Serialize, Debug)]
50 pub struct GetPostsResponse {
51 pub posts: Vec<PostView>,
54 #[derive(Deserialize)]
55 pub struct CreatePostLike {
61 #[derive(Deserialize)]
65 pub url: Option<String>,
66 pub body: Option<String>,
71 #[derive(Deserialize)]
72 pub struct DeletePost {
78 #[derive(Deserialize)]
79 pub struct RemovePost {
82 pub reason: Option<String>,
86 #[derive(Deserialize)]
93 #[derive(Deserialize)]
94 pub struct StickyPost {
100 #[derive(Deserialize)]
101 pub struct SavePost {
107 #[derive(Deserialize, Debug)]
108 pub struct PostJoin {
112 #[derive(Serialize, Clone)]
113 pub struct PostJoinResponse {
117 #[derive(Serialize, Deserialize)]
118 pub struct CreatePostReport {
124 #[derive(Serialize, Deserialize, Clone)]
125 pub struct CreatePostReportResponse {
129 #[derive(Serialize, Deserialize, Debug)]
130 pub struct ResolvePostReport {
136 #[derive(Serialize, Deserialize, Clone, Debug)]
137 pub struct ResolvePostReportResponse {
142 #[derive(Serialize, Deserialize, Debug)]
143 pub struct ListPostReports {
144 pub page: Option<i64>,
145 pub limit: Option<i64>,
146 pub community: Option<i32>,
150 #[derive(Serialize, Clone, Debug)]
151 pub struct ListPostReportsResponse {
152 pub posts: Vec<PostReportView>,