2 comment_view::CommentView,
3 community::{community_moderator_view::CommunityModeratorView, community_view::CommunityView},
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 community: CommunityView,
35 pub moderators: Vec<CommunityModeratorView>,
39 #[derive(Deserialize, Debug)]
43 pub page: Option<i64>,
44 pub limit: Option<i64>,
45 pub community_id: Option<i32>,
46 pub community_name: Option<String>,
47 pub auth: Option<String>,
50 #[derive(Serialize, Debug)]
51 pub struct GetPostsResponse {
52 pub posts: Vec<PostView>,
55 #[derive(Deserialize)]
56 pub struct CreatePostLike {
62 #[derive(Deserialize)]
66 pub url: Option<String>,
67 pub body: Option<String>,
72 #[derive(Deserialize)]
73 pub struct DeletePost {
79 #[derive(Deserialize)]
80 pub struct RemovePost {
83 pub reason: Option<String>,
87 #[derive(Deserialize)]
94 #[derive(Deserialize)]
95 pub struct StickyPost {
101 #[derive(Deserialize)]
102 pub struct SavePost {
108 #[derive(Deserialize, Debug)]
109 pub struct PostJoin {
113 #[derive(Serialize, Clone)]
114 pub struct PostJoinResponse {
118 #[derive(Serialize, Deserialize)]
119 pub struct CreatePostReport {
125 #[derive(Serialize, Deserialize, Clone)]
126 pub struct CreatePostReportResponse {
130 #[derive(Serialize, Deserialize, Debug)]
131 pub struct ResolvePostReport {
137 #[derive(Serialize, Deserialize, Clone, Debug)]
138 pub struct ResolvePostReportResponse {
143 #[derive(Serialize, Deserialize, Debug)]
144 pub struct ListPostReports {
145 pub page: Option<i64>,
146 pub limit: Option<i64>,
147 pub community: Option<i32>,
151 #[derive(Serialize, Clone, Debug)]
152 pub struct ListPostReportsResponse {
153 pub posts: Vec<PostReportView>,