1 #![recursion_limit = "256"]
3 #[cfg(feature = "full")]
6 #[cfg(feature = "full")]
8 extern crate diesel_derive_newtype;
10 #[cfg(feature = "full")]
12 extern crate diesel_derive_enum;
14 // this is used in tests
15 #[cfg(feature = "full")]
17 extern crate diesel_migrations;
19 #[cfg(feature = "full")]
21 extern crate async_trait;
24 #[cfg(feature = "full")]
27 #[cfg(feature = "full")]
31 #[cfg(feature = "full")]
33 #[cfg(feature = "full")]
36 use serde::{Deserialize, Serialize};
37 use strum_macros::{Display, EnumString};
38 #[cfg(feature = "full")]
41 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
42 #[cfg_attr(feature = "full", derive(DbEnum, TS))]
45 ExistingTypePath = "crate::schema::sql_types::SortTypeEnum"
47 #[cfg_attr(feature = "full", DbValueStyle = "verbatim")]
48 #[cfg_attr(feature = "full", ts(export))]
63 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy)]
64 #[cfg_attr(feature = "full", derive(TS))]
65 #[cfg_attr(feature = "full", ts(export))]
66 pub enum CommentSortType {
73 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
74 #[cfg_attr(feature = "full", derive(DbEnum, TS))]
77 ExistingTypePath = "crate::schema::sql_types::ListingTypeEnum"
79 #[cfg_attr(feature = "full", DbValueStyle = "verbatim")]
80 #[cfg_attr(feature = "full", ts(export))]
81 pub enum ListingType {
87 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
88 #[cfg_attr(feature = "full", derive(DbEnum, TS))]
91 ExistingTypePath = "crate::schema::sql_types::RegistrationModeEnum"
93 #[cfg_attr(feature = "full", DbValueStyle = "verbatim")]
94 #[cfg_attr(feature = "full", ts(export))]
95 pub enum RegistrationMode {
101 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy)]
102 #[cfg_attr(feature = "full", derive(TS))]
103 #[cfg_attr(feature = "full", ts(export))]
104 pub enum SearchType {
113 #[derive(EnumString, Display, Debug, PartialEq, Eq, Serialize, Deserialize, Clone, Copy)]
114 #[cfg_attr(feature = "full", derive(TS))]
115 #[cfg_attr(feature = "full", ts(export))]
116 pub enum SubscribedType {
122 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
123 #[cfg_attr(feature = "full", derive(TS))]
124 #[cfg_attr(feature = "full", ts(export))]
125 pub enum ModlogActionType {
134 ModTransferCommunity,
145 EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq, Eq,
147 #[cfg_attr(feature = "full", derive(TS))]
148 #[cfg_attr(feature = "full", ts(export))]
149 pub enum PostFeatureType {