2022-05-03 17:44:13 +00:00
|
|
|
#[cfg(feature = "full")]
|
|
|
|
#[macro_use]
|
2020-12-18 16:17:21 +00:00
|
|
|
extern crate diesel;
|
2022-05-03 17:44:13 +00:00
|
|
|
#[cfg(feature = "full")]
|
2021-03-18 20:25:21 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate diesel_derive_newtype;
|
2021-10-16 13:33:38 +00:00
|
|
|
// this is used in tests
|
2022-05-03 17:44:13 +00:00
|
|
|
#[cfg(feature = "full")]
|
2021-10-16 13:33:38 +00:00
|
|
|
#[allow(unused_imports)]
|
|
|
|
#[macro_use]
|
|
|
|
extern crate diesel_migrations;
|
2021-03-18 20:25:21 +00:00
|
|
|
|
2021-10-16 13:33:38 +00:00
|
|
|
pub mod aggregates;
|
2022-05-03 17:44:13 +00:00
|
|
|
#[cfg(feature = "full")]
|
2021-10-16 13:33:38 +00:00
|
|
|
pub mod impls;
|
|
|
|
pub mod newtypes;
|
2022-05-03 17:44:13 +00:00
|
|
|
#[cfg(feature = "full")]
|
2021-10-16 13:33:38 +00:00
|
|
|
pub mod schema;
|
|
|
|
pub mod source;
|
2022-05-03 17:44:13 +00:00
|
|
|
#[cfg(feature = "full")]
|
2021-10-16 13:33:38 +00:00
|
|
|
pub mod traits;
|
2022-05-03 17:44:13 +00:00
|
|
|
#[cfg(feature = "full")]
|
|
|
|
pub mod utils;
|
2022-05-06 20:55:07 +00:00
|
|
|
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use strum_macros::{Display, EnumString};
|
|
|
|
|
|
|
|
#[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy)]
|
|
|
|
pub enum SortType {
|
|
|
|
Active,
|
|
|
|
Hot,
|
|
|
|
New,
|
|
|
|
TopDay,
|
|
|
|
TopWeek,
|
|
|
|
TopMonth,
|
|
|
|
TopYear,
|
|
|
|
TopAll,
|
|
|
|
MostComments,
|
|
|
|
NewComments,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq)]
|
|
|
|
pub enum ListingType {
|
|
|
|
All,
|
|
|
|
Local,
|
|
|
|
Subscribed,
|
|
|
|
Community,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(EnumString, Display, Debug, Serialize, Deserialize, Clone, Copy)]
|
|
|
|
pub enum SearchType {
|
|
|
|
All,
|
|
|
|
Comments,
|
|
|
|
Posts,
|
|
|
|
Communities,
|
|
|
|
Users,
|
|
|
|
Url,
|
|
|
|
}
|