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