2 newtypes::{CommunityId, PersonId},
5 community::CommunitySafe,
27 use serde::{Deserialize, Serialize};
29 #[derive(Debug, Serialize, Deserialize, Clone)]
30 pub struct ModAddCommunityView {
31 pub mod_add_community: ModAddCommunity,
32 pub moderator: Option<PersonSafe>,
33 pub community: CommunitySafe,
34 pub modded_person: PersonSafe,
37 #[derive(Debug, Serialize, Deserialize, Clone)]
38 pub struct ModAddView {
40 pub moderator: Option<PersonSafe>,
41 pub modded_person: PersonSafe,
44 #[derive(Debug, Serialize, Deserialize, Clone)]
45 pub struct ModBanFromCommunityView {
46 pub mod_ban_from_community: ModBanFromCommunity,
47 pub moderator: Option<PersonSafe>,
48 pub community: CommunitySafe,
49 pub banned_person: PersonSafe,
52 #[derive(Debug, Serialize, Deserialize, Clone)]
53 pub struct ModBanView {
55 pub moderator: Option<PersonSafe>,
56 pub banned_person: PersonSafe,
59 #[derive(Debug, Serialize, Deserialize, Clone)]
60 pub struct ModHideCommunityView {
61 pub mod_hide_community: ModHideCommunity,
62 pub admin: Option<PersonSafe>,
63 pub community: CommunitySafe,
66 #[derive(Debug, Serialize, Deserialize, Clone)]
67 pub struct ModLockPostView {
68 pub mod_lock_post: ModLockPost,
69 pub moderator: Option<PersonSafe>,
71 pub community: CommunitySafe,
74 #[derive(Debug, Serialize, Deserialize, Clone)]
75 pub struct ModRemoveCommentView {
76 pub mod_remove_comment: ModRemoveComment,
77 pub moderator: Option<PersonSafe>,
79 pub commenter: PersonSafe,
81 pub community: CommunitySafe,
84 #[derive(Debug, Serialize, Deserialize, Clone)]
85 pub struct ModRemoveCommunityView {
86 pub mod_remove_community: ModRemoveCommunity,
87 pub moderator: Option<PersonSafe>,
88 pub community: CommunitySafe,
91 #[derive(Debug, Serialize, Deserialize, Clone)]
92 pub struct ModRemovePostView {
93 pub mod_remove_post: ModRemovePost,
94 pub moderator: Option<PersonSafe>,
96 pub community: CommunitySafe,
99 #[derive(Debug, Serialize, Deserialize, Clone)]
100 pub struct ModStickyPostView {
101 pub mod_sticky_post: ModStickyPost,
102 pub moderator: Option<PersonSafe>,
104 pub community: CommunitySafe,
107 #[derive(Debug, Serialize, Deserialize, Clone)]
108 pub struct ModTransferCommunityView {
109 pub mod_transfer_community: ModTransferCommunity,
110 pub moderator: Option<PersonSafe>,
111 pub community: CommunitySafe,
112 pub modded_person: PersonSafe,
115 #[derive(Debug, Serialize, Deserialize, Clone)]
116 pub struct AdminPurgeCommentView {
117 pub admin_purge_comment: AdminPurgeComment,
118 pub admin: Option<PersonSafe>,
122 #[derive(Debug, Serialize, Deserialize, Clone)]
123 pub struct AdminPurgeCommunityView {
124 pub admin_purge_community: AdminPurgeCommunity,
125 pub admin: Option<PersonSafe>,
128 #[derive(Debug, Serialize, Deserialize, Clone)]
129 pub struct AdminPurgePersonView {
130 pub admin_purge_person: AdminPurgePerson,
131 pub admin: Option<PersonSafe>,
134 #[derive(Debug, Serialize, Deserialize, Clone)]
135 pub struct AdminPurgePostView {
136 pub admin_purge_post: AdminPurgePost,
137 pub admin: Option<PersonSafe>,
138 pub community: CommunitySafe,
141 #[derive(Debug, Serialize, Deserialize, Clone, Copy)]
142 pub struct ModlogListParams {
143 pub community_id: Option<CommunityId>,
144 pub mod_person_id: Option<PersonId>,
145 pub other_person_id: Option<PersonId>,
146 pub page: Option<i64>,
147 pub limit: Option<i64>,
148 pub hide_modlog_names: bool,