2 newtypes::{CommunityId, PersonId},
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<Person>,
33 pub community: Community,
34 pub modded_person: Person,
37 #[derive(Debug, Serialize, Deserialize, Clone)]
38 pub struct ModAddView {
40 pub moderator: Option<Person>,
41 pub modded_person: Person,
44 #[derive(Debug, Serialize, Deserialize, Clone)]
45 pub struct ModBanFromCommunityView {
46 pub mod_ban_from_community: ModBanFromCommunity,
47 pub moderator: Option<Person>,
48 pub community: Community,
49 pub banned_person: Person,
52 #[derive(Debug, Serialize, Deserialize, Clone)]
53 pub struct ModBanView {
55 pub moderator: Option<Person>,
56 pub banned_person: Person,
59 #[derive(Debug, Serialize, Deserialize, Clone)]
60 pub struct ModHideCommunityView {
61 pub mod_hide_community: ModHideCommunity,
62 pub admin: Option<Person>,
63 pub community: Community,
66 #[derive(Debug, Serialize, Deserialize, Clone)]
67 pub struct ModLockPostView {
68 pub mod_lock_post: ModLockPost,
69 pub moderator: Option<Person>,
71 pub community: Community,
74 #[derive(Debug, Serialize, Deserialize, Clone)]
75 pub struct ModRemoveCommentView {
76 pub mod_remove_comment: ModRemoveComment,
77 pub moderator: Option<Person>,
79 pub commenter: Person,
81 pub community: Community,
84 #[derive(Debug, Serialize, Deserialize, Clone)]
85 pub struct ModRemoveCommunityView {
86 pub mod_remove_community: ModRemoveCommunity,
87 pub moderator: Option<Person>,
88 pub community: Community,
91 #[derive(Debug, Serialize, Deserialize, Clone)]
92 pub struct ModRemovePostView {
93 pub mod_remove_post: ModRemovePost,
94 pub moderator: Option<Person>,
96 pub community: Community,
99 #[derive(Debug, Serialize, Deserialize, Clone)]
100 pub struct ModFeaturePostView {
101 pub mod_feature_post: ModFeaturePost,
102 pub moderator: Option<Person>,
104 pub community: Community,
107 #[derive(Debug, Serialize, Deserialize, Clone)]
108 pub struct ModTransferCommunityView {
109 pub mod_transfer_community: ModTransferCommunity,
110 pub moderator: Option<Person>,
111 pub community: Community,
112 pub modded_person: Person,
115 #[derive(Debug, Serialize, Deserialize, Clone)]
116 pub struct AdminPurgeCommentView {
117 pub admin_purge_comment: AdminPurgeComment,
118 pub admin: Option<Person>,
122 #[derive(Debug, Serialize, Deserialize, Clone)]
123 pub struct AdminPurgeCommunityView {
124 pub admin_purge_community: AdminPurgeCommunity,
125 pub admin: Option<Person>,
128 #[derive(Debug, Serialize, Deserialize, Clone)]
129 pub struct AdminPurgePersonView {
130 pub admin_purge_person: AdminPurgePerson,
131 pub admin: Option<Person>,
134 #[derive(Debug, Serialize, Deserialize, Clone)]
135 pub struct AdminPurgePostView {
136 pub admin_purge_post: AdminPurgePost,
137 pub admin: Option<Person>,
138 pub community: Community,
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,