X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_schema%2Fsrc%2Flib.rs;h=e3232c402e3feb42ab4ddfbb87700eee47d9f822;hb=9a5a13c734a1792511e1bfef7b9ac4121e0e7371;hp=4ab26981bc18d3b8a72a8f85b222506641955698;hpb=4d160461ce0d0090e98bbb941bffdeafca600c5f;p=lemmy.git diff --git a/crates/db_schema/src/lib.rs b/crates/db_schema/src/lib.rs index 4ab26981..e3232c40 100644 --- a/crates/db_schema/src/lib.rs +++ b/crates/db_schema/src/lib.rs @@ -26,7 +26,13 @@ pub mod impls; pub mod newtypes; #[cfg(feature = "full")] #[rustfmt::skip] +#[allow(clippy::wildcard_imports)] pub mod schema; +#[cfg(feature = "full")] +pub mod aliases { + use crate::schema::person; + diesel::alias!(person as person1: Person1, person as person2: Person2); +} pub mod source; #[cfg(feature = "full")] pub mod traits; @@ -62,6 +68,10 @@ pub enum SortType { TopHour, TopSixHour, TopTwelveHour, + TopThreeMonths, + TopSixMonths, + TopNineMonths, + Controversial, } #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy)] @@ -73,6 +83,20 @@ pub enum CommentSortType { Top, New, Old, + Controversial, +} + +#[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy)] +#[cfg_attr(feature = "full", derive(TS))] +#[cfg_attr(feature = "full", ts(export))] +/// The person sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html +pub enum PersonSortType { + New, + Old, + MostComments, + CommentScore, + PostScore, + PostCount, } #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]