-#[repr(transparent)]
-#[derive(Clone, PartialEq, Serialize, Deserialize, Debug, AsExpression, FromSqlRow)]
-#[sql_type = "Text"]
-pub struct DbUrl(Url);
+#[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "full", derive(DbEnum, TS))]
+#[cfg_attr(
+ feature = "full",
+ ExistingTypePath = "crate::schema::sql_types::SortTypeEnum"
+)]
+#[cfg_attr(feature = "full", DbValueStyle = "verbatim")]
+#[cfg_attr(feature = "full", ts(export))]
+/// The post sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html
+pub enum SortType {
+ Active,
+ Hot,
+ New,
+ Old,
+ TopDay,
+ TopWeek,
+ TopMonth,
+ TopYear,
+ TopAll,
+ MostComments,
+ NewComments,
+ TopHour,
+ TopSixHour,
+ TopTwelveHour,
+ TopThreeMonths,
+ TopSixMonths,
+ TopNineMonths,
+ Controversial,
+}
+
+#[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy)]
+#[cfg_attr(feature = "full", derive(TS))]
+#[cfg_attr(feature = "full", ts(export))]
+/// The comment sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html
+pub enum CommentSortType {
+ Hot,
+ Top,
+ New,
+ Old,
+ Controversial,
+}