1 use lemmy_db::views::{comment_report_view::CommentReportView, 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_view: 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 community_name: Option<String>,
72 pub auth: Option<String>,
76 pub struct GetCommentsResponse {
77 pub comments: Vec<CommentView>,
80 #[derive(Serialize, Deserialize)]
81 pub struct CreateCommentReport {
87 #[derive(Serialize, Deserialize, Clone)]
88 pub struct CreateCommentReportResponse {
92 #[derive(Serialize, Deserialize, Debug)]
93 pub struct ResolveCommentReport {
99 #[derive(Serialize, Deserialize, Clone, Debug)]
100 pub struct ResolveCommentReportResponse {
105 #[derive(Serialize, Deserialize, Debug)]
106 pub struct ListCommentReports {
107 pub page: Option<i64>,
108 pub limit: Option<i64>,
109 /// if no community is given, it returns reports for all communities moderated by the auth user
110 pub community: Option<i32>,
114 #[derive(Serialize, Clone, Debug)]
115 pub struct ListCommentReportsResponse {
116 pub comments: Vec<CommentReportView>,