]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/aggregates/structs.rs
Add support for Featured Posts (#2585)
[lemmy.git] / crates / db_schema / src / aggregates / structs.rs
index 0cc4dd05ec388ca60d3560221bc7b5ca3344b540..d52b5bb419213e10288e80e000c44e17362d691f 100644 (file)
@@ -1,4 +1,4 @@
-use crate::newtypes::{CommentId, CommunityId, PersonId, PostId};
+use crate::newtypes::{CommentId, CommunityId, PersonId, PostId, SiteId};
 #[cfg(feature = "full")]
 use crate::schema::{
   comment_aggregates,
@@ -68,10 +68,11 @@ pub struct PostAggregates {
   pub score: i64,
   pub upvotes: i64,
   pub downvotes: i64,
-  pub stickied: bool,
   pub published: chrono::NaiveDateTime,
   pub newest_comment_time_necro: chrono::NaiveDateTime, // A newest comment time, limited to 2 days, to prevent necrobumping
   pub newest_comment_time: chrono::NaiveDateTime,
+  pub featured_community: bool,
+  pub featured_local: bool,
 }
 
 #[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)]
@@ -102,7 +103,7 @@ pub struct PersonPostAggregatesForm {
 #[cfg_attr(feature = "full", diesel(belongs_to(crate::source::site::Site)))]
 pub struct SiteAggregates {
   pub id: i32,
-  pub site_id: i32,
+  pub site_id: SiteId,
   pub users: i64,
   pub posts: i64,
   pub comments: i64,