2 comment_view::CommentView,
3 community_view::{CommunityModeratorView, CommunityView},
6 use serde::{Deserialize, Serialize};
8 #[derive(Deserialize, Debug)]
9 pub struct CreatePost {
11 pub url: Option<String>,
12 pub body: Option<String>,
14 pub community_id: i32,
18 #[derive(Serialize, Clone)]
19 pub struct PostResponse {
23 #[derive(Deserialize)]
26 pub auth: Option<String>,
30 pub struct GetPostResponse {
32 pub comments: Vec<CommentView>,
33 pub community: CommunityView,
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 {