]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/traits.rs
Get rid of Safe Views, use serde_skip (#2767)
[lemmy.git] / crates / db_schema / src / traits.rs
index 75cfcd50693f35f164daf69903c5549c0a7bab3f..d4e0154714aba0920b5cc616ca5537ad0777722d 100644 (file)
@@ -44,7 +44,6 @@ pub trait Followable {
   async fn unfollow(pool: &DbPool, form: &Self::Form) -> Result<usize, Error>
   where
     Self: Sized;
-  async fn has_local_followers(pool: &DbPool, community_id: CommunityId) -> Result<bool, Error>;
 }
 
 #[async_trait]
@@ -141,24 +140,9 @@ pub trait Reportable {
     Self: Sized;
 }
 
-// TODO these should be removed, there should be another way to do this
-pub trait DeleteableOrRemoveable {
-  fn blank_out_deleted_or_removed_info(self) -> Self;
-}
-
-pub trait ToSafe {
-  type SafeColumns;
-  fn safe_columns_tuple() -> Self::SafeColumns;
-}
-
-pub trait ToSafeSettings {
-  type SafeSettingsColumns;
-  fn safe_settings_columns_tuple() -> Self::SafeSettingsColumns;
-}
-
-pub trait ViewToVec {
-  type DbTuple;
-  fn from_tuple_to_vec(tuple: Vec<Self::DbTuple>) -> Vec<Self>
+pub trait JoinView {
+  type JoinTuple;
+  fn from_tuple(tuple: Self::JoinTuple) -> Self
   where
     Self: Sized;
 }