forked from jmug/stoatchat
refactor(core/models): swap dependency order with db
feat(core/models): implement webhook model
This commit is contained in:
@@ -6,6 +6,13 @@ extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate schemars;
|
||||
|
||||
#[cfg(feature = "partials")]
|
||||
#[macro_use]
|
||||
extern crate revolt_optional_struct;
|
||||
|
||||
#[cfg(feature = "validator")]
|
||||
pub use validator;
|
||||
|
||||
macro_rules! auto_derived {
|
||||
( $( $item:item )+ ) => {
|
||||
$(
|
||||
@@ -17,6 +24,28 @@ macro_rules! auto_derived {
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(feature = "partials")]
|
||||
macro_rules! auto_derived_partial {
|
||||
( $item:item, $name:expr ) => {
|
||||
#[derive(
|
||||
OptionalStruct, Debug, Clone, Eq, PartialEq, Serialize, Deserialize, JsonSchema,
|
||||
)]
|
||||
#[optional_derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize, JsonSchema)]
|
||||
#[optional_name = $name]
|
||||
#[opt_skip_serializing_none]
|
||||
#[opt_some_priority]
|
||||
$item
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "partials"))]
|
||||
macro_rules! auto_derived_partial {
|
||||
( $item:item, $name:expr ) => {
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize, JsonSchema)]
|
||||
$item
|
||||
};
|
||||
}
|
||||
|
||||
pub mod v0;
|
||||
|
||||
/// Utility function to check if a boolean value is false
|
||||
|
||||
Reference in New Issue
Block a user