]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/lib.rs
Add support for Featured Posts (#2585)
[lemmy.git] / crates / db_schema / src / lib.rs
index a859b2aabbed01055c835a18407d1333155180ad..b0e56393fc671354fd5d4d7dd1caef770b4f2bde 100644 (file)
@@ -8,10 +8,13 @@ extern crate diesel;
 extern crate diesel_derive_newtype;
 // this is used in tests
 #[cfg(feature = "full")]
-#[allow(unused_imports)]
 #[macro_use]
 extern crate diesel_migrations;
 
+#[cfg(feature = "full")]
+#[macro_use]
+extern crate async_trait;
+
 pub mod aggregates;
 #[cfg(feature = "full")]
 pub mod impls;
@@ -79,7 +82,7 @@ pub enum ModlogActionType {
   All,
   ModRemovePost,
   ModLockPost,
-  ModStickyPost,
+  ModFeaturePost,
   ModRemoveComment,
   ModRemoveCommunity,
   ModBanFromCommunity,
@@ -93,3 +96,12 @@ pub enum ModlogActionType {
   AdminPurgePost,
   AdminPurgeComment,
 }
+
+#[derive(
+  EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq, Eq,
+)]
+pub enum PostFeatureType {
+  #[default]
+  Local,
+  Community,
+}