6 mod_ban_from_community,
12 mod_transfer_community,
19 use serde::{Deserialize, Serialize};
21 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)]
22 #[table_name = "mod_remove_post"]
23 pub struct ModRemovePost {
25 pub mod_person_id: PersonId,
27 pub reason: Option<String>,
28 pub removed: Option<bool>,
29 pub when_: chrono::NaiveDateTime,
32 #[derive(Insertable, AsChangeset)]
33 #[table_name = "mod_remove_post"]
34 pub struct ModRemovePostForm {
35 pub mod_person_id: PersonId,
37 pub reason: Option<String>,
38 pub removed: Option<bool>,
41 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)]
42 #[table_name = "mod_lock_post"]
43 pub struct ModLockPost {
45 pub mod_person_id: PersonId,
47 pub locked: Option<bool>,
48 pub when_: chrono::NaiveDateTime,
51 #[derive(Insertable, AsChangeset)]
52 #[table_name = "mod_lock_post"]
53 pub struct ModLockPostForm {
54 pub mod_person_id: PersonId,
56 pub locked: Option<bool>,
59 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)]
60 #[table_name = "mod_sticky_post"]
61 pub struct ModStickyPost {
63 pub mod_person_id: PersonId,
65 pub stickied: Option<bool>,
66 pub when_: chrono::NaiveDateTime,
69 #[derive(Insertable, AsChangeset)]
70 #[table_name = "mod_sticky_post"]
71 pub struct ModStickyPostForm {
72 pub mod_person_id: PersonId,
74 pub stickied: Option<bool>,
77 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)]
78 #[table_name = "mod_remove_comment"]
79 pub struct ModRemoveComment {
81 pub mod_person_id: PersonId,
82 pub comment_id: CommentId,
83 pub reason: Option<String>,
84 pub removed: Option<bool>,
85 pub when_: chrono::NaiveDateTime,
88 #[derive(Insertable, AsChangeset)]
89 #[table_name = "mod_remove_comment"]
90 pub struct ModRemoveCommentForm {
91 pub mod_person_id: PersonId,
92 pub comment_id: CommentId,
93 pub reason: Option<String>,
94 pub removed: Option<bool>,
97 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)]
98 #[table_name = "mod_remove_community"]
99 pub struct ModRemoveCommunity {
101 pub mod_person_id: PersonId,
102 pub community_id: CommunityId,
103 pub reason: Option<String>,
104 pub removed: Option<bool>,
105 pub expires: Option<chrono::NaiveDateTime>,
106 pub when_: chrono::NaiveDateTime,
109 #[derive(Insertable, AsChangeset)]
110 #[table_name = "mod_remove_community"]
111 pub struct ModRemoveCommunityForm {
112 pub mod_person_id: PersonId,
113 pub community_id: CommunityId,
114 pub reason: Option<String>,
115 pub removed: Option<bool>,
116 pub expires: Option<chrono::NaiveDateTime>,
119 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)]
120 #[table_name = "mod_ban_from_community"]
121 pub struct ModBanFromCommunity {
123 pub mod_person_id: PersonId,
124 pub other_person_id: PersonId,
125 pub community_id: CommunityId,
126 pub reason: Option<String>,
127 pub banned: Option<bool>,
128 pub expires: Option<chrono::NaiveDateTime>,
129 pub when_: chrono::NaiveDateTime,
132 #[derive(Insertable, AsChangeset)]
133 #[table_name = "mod_ban_from_community"]
134 pub struct ModBanFromCommunityForm {
135 pub mod_person_id: PersonId,
136 pub other_person_id: PersonId,
137 pub community_id: CommunityId,
138 pub reason: Option<String>,
139 pub banned: Option<bool>,
140 pub expires: Option<chrono::NaiveDateTime>,
143 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)]
144 #[table_name = "mod_ban"]
147 pub mod_person_id: PersonId,
148 pub other_person_id: PersonId,
149 pub reason: Option<String>,
150 pub banned: Option<bool>,
151 pub expires: Option<chrono::NaiveDateTime>,
152 pub when_: chrono::NaiveDateTime,
155 #[derive(Insertable, AsChangeset)]
156 #[table_name = "mod_ban"]
157 pub struct ModBanForm {
158 pub mod_person_id: PersonId,
159 pub other_person_id: PersonId,
160 pub reason: Option<String>,
161 pub banned: Option<bool>,
162 pub expires: Option<chrono::NaiveDateTime>,
165 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)]
166 #[table_name = "mod_add_community"]
167 pub struct ModAddCommunity {
169 pub mod_person_id: PersonId,
170 pub other_person_id: PersonId,
171 pub community_id: CommunityId,
172 pub removed: Option<bool>,
173 pub when_: chrono::NaiveDateTime,
176 #[derive(Insertable, AsChangeset)]
177 #[table_name = "mod_add_community"]
178 pub struct ModAddCommunityForm {
179 pub mod_person_id: PersonId,
180 pub other_person_id: PersonId,
181 pub community_id: CommunityId,
182 pub removed: Option<bool>,
185 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)]
186 #[table_name = "mod_transfer_community"]
187 pub struct ModTransferCommunity {
189 pub mod_person_id: PersonId,
190 pub other_person_id: PersonId,
191 pub community_id: CommunityId,
192 pub removed: Option<bool>,
193 pub when_: chrono::NaiveDateTime,
196 #[derive(Insertable, AsChangeset)]
197 #[table_name = "mod_transfer_community"]
198 pub struct ModTransferCommunityForm {
199 pub mod_person_id: PersonId,
200 pub other_person_id: PersonId,
201 pub community_id: CommunityId,
202 pub removed: Option<bool>,
205 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)]
206 #[table_name = "mod_add"]
209 pub mod_person_id: PersonId,
210 pub other_person_id: PersonId,
211 pub removed: Option<bool>,
212 pub when_: chrono::NaiveDateTime,
215 #[derive(Insertable, AsChangeset)]
216 #[table_name = "mod_add"]
217 pub struct ModAddForm {
218 pub mod_person_id: PersonId,
219 pub other_person_id: PersonId,
220 pub removed: Option<bool>,