]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/source/moderator.rs
Adding ModTransferCommunity to modlog in API. Fixes #1437
[lemmy.git] / crates / db_schema / src / source / moderator.rs
index 19580fb928904dcaac5519ef5247b20fdf86eef7..66889ae507bec1c163774e62acf47b7ed96b59b8 100644 (file)
@@ -9,6 +9,7 @@ use crate::{
     mod_remove_community,
     mod_remove_post,
     mod_sticky_post,
+    mod_transfer_community,
   },
   CommentId,
   CommunityId,
@@ -181,6 +182,26 @@ pub struct ModAddCommunityForm {
   pub removed: Option<bool>,
 }
 
+#[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
+#[table_name = "mod_transfer_community"]
+pub struct ModTransferCommunity {
+  pub id: i32,
+  pub mod_person_id: PersonId,
+  pub other_person_id: PersonId,
+  pub community_id: CommunityId,
+  pub removed: Option<bool>,
+  pub when_: chrono::NaiveDateTime,
+}
+
+#[derive(Insertable, AsChangeset)]
+#[table_name = "mod_transfer_community"]
+pub struct ModTransferCommunityForm {
+  pub mod_person_id: PersonId,
+  pub other_person_id: PersonId,
+  pub community_id: CommunityId,
+  pub removed: Option<bool>,
+}
+
 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
 #[table_name = "mod_add"]
 pub struct ModAdd {