1 use lemmy_db::comment_view::CommentView;
2 use serde::{Deserialize, Serialize};
5 pub struct CreateComment {
7 pub parent_id: Option<i32>,
9 pub form_id: Option<String>,
13 #[derive(Deserialize)]
14 pub struct EditComment {
17 pub form_id: Option<String>,
21 #[derive(Deserialize)]
22 pub struct DeleteComment {
28 #[derive(Deserialize)]
29 pub struct RemoveComment {
32 pub reason: Option<String>,
36 #[derive(Deserialize)]
37 pub struct MarkCommentAsRead {
43 #[derive(Deserialize)]
44 pub struct SaveComment {
50 #[derive(Serialize, Clone)]
51 pub struct CommentResponse {
52 pub comment: CommentView,
53 pub recipient_ids: Vec<i32>,
54 pub form_id: Option<String>,
57 #[derive(Deserialize)]
58 pub struct CreateCommentLike {
64 #[derive(Deserialize)]
65 pub struct GetComments {
68 pub page: Option<i64>,
69 pub limit: Option<i64>,
70 pub community_id: Option<i32>,
71 pub auth: Option<String>,
75 pub struct GetCommentsResponse {
76 pub comments: Vec<CommentView>,