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};
39 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
40 #[cfg_attr(feature = "full", derive(DbEnum))]
43 ExistingTypePath = "crate::schema::sql_types::SortTypeEnum"
45 #[cfg_attr(feature = "full", DbValueStyle = "verbatim")]
60 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy)]
61 pub enum CommentSortType {
68 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
69 #[cfg_attr(feature = "full", derive(DbEnum))]
72 ExistingTypePath = "crate::schema::sql_types::ListingTypeEnum"
74 #[cfg_attr(feature = "full", DbValueStyle = "verbatim")]
75 pub enum ListingType {
81 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
82 #[cfg_attr(feature = "full", derive(DbEnum))]
85 ExistingTypePath = "crate::schema::sql_types::RegistrationModeEnum"
87 #[cfg_attr(feature = "full", DbValueStyle = "verbatim")]
88 pub enum RegistrationMode {
94 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy)]
104 #[derive(EnumString, Display, Debug, PartialEq, Eq, Serialize, Deserialize, Clone, Copy)]
105 pub enum SubscribedType {
111 #[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
112 pub enum ModlogActionType {
121 ModTransferCommunity,
132 EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq, Eq,
134 pub enum PostFeatureType {