parent
bf1d322fe2
commit
b4cac39157
2 changed files with 3 additions and 9 deletions
|
@ -33,15 +33,7 @@ mod user;
|
||||||
|
|
||||||
pub use user::*;
|
pub use user::*;
|
||||||
|
|
||||||
/// Json message schema, used for returning messages to the client, the message
|
/// Message schema, used for returning messages.
|
||||||
/// must be human readable.
|
|
||||||
///
|
|
||||||
/// # Example
|
|
||||||
/// ```json
|
|
||||||
/// {
|
|
||||||
/// "message": "Message"
|
|
||||||
/// }
|
|
||||||
/// ```
|
|
||||||
#[derive(Serialize, Deserialize, Clone, Debug, ToSchema, derive_new::new)]
|
#[derive(Serialize, Deserialize, Clone, Debug, ToSchema, derive_new::new)]
|
||||||
#[salvo(schema(name = MessageSchema, example = json!(MessageSchema::new("Message".to_owned()))))]
|
#[salvo(schema(name = MessageSchema, example = json!(MessageSchema::new("Message".to_owned()))))]
|
||||||
pub struct MessageSchema {
|
pub struct MessageSchema {
|
||||||
|
|
|
@ -24,6 +24,7 @@ use oxidetalis_entities::prelude::*;
|
||||||
use salvo::oapi::ToSchema;
|
use salvo::oapi::ToSchema;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
/// WhiteListed user schema, represents a whitelisted user.
|
||||||
#[derive(Serialize, Deserialize, Clone, Debug, ToSchema, derive_new::new)]
|
#[derive(Serialize, Deserialize, Clone, Debug, ToSchema, derive_new::new)]
|
||||||
#[salvo(schema(name = WhiteListedUser, example = json!(WhiteListedUser::default())))]
|
#[salvo(schema(name = WhiteListedUser, example = json!(WhiteListedUser::default())))]
|
||||||
pub struct WhiteListedUser {
|
pub struct WhiteListedUser {
|
||||||
|
@ -33,6 +34,7 @@ pub struct WhiteListedUser {
|
||||||
pub whitelisted_at: DateTime<Utc>,
|
pub whitelisted_at: DateTime<Utc>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Blacklisted user schema, represents a blacklisted user.
|
||||||
#[derive(Serialize, Deserialize, Clone, Debug, ToSchema, derive_new::new)]
|
#[derive(Serialize, Deserialize, Clone, Debug, ToSchema, derive_new::new)]
|
||||||
#[salvo(schema(name = BlackListedUser, example = json!(BlackListedUser::default())))]
|
#[salvo(schema(name = BlackListedUser, example = json!(BlackListedUser::default())))]
|
||||||
pub struct BlackListedUser {
|
pub struct BlackListedUser {
|
||||||
|
|
Loading…
Reference in a new issue