use std::collections::HashMap; use serde::Serialize; use serde_json::{Map, Value}; #[derive(Debug, Serialize)] pub struct PatchUser { pub data: PatchUserData, } #[derive(Debug, Serialize)] pub struct PatchUserData { #[serde(skip_serializing_if = "Option::is_none")] pub password: Option, #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(skip_serializing_if = "Option::is_none")] pub info: Option>, } #[derive(Debug, Serialize)] pub struct PostAdminUser { pub data: PostAdminUserData, #[serde(rename = "expiredAt", skip_serializing_if = "Option::is_none")] pub expired_at: Option, } #[derive(Debug, Serialize)] pub struct PostAdminUserData { pub account: String, pub password: String, #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(skip_serializing_if = "Option::is_none")] pub info: Option>, } #[derive(Debug, Default, Serialize)] pub struct GetAdminUserCount { #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, #[serde(skip_serializing_if = "Option::is_none")] pub contains: Option, } #[derive(Debug, Default, Serialize)] pub struct GetAdminUserList { #[serde(skip_serializing_if = "Option::is_none")] pub account: Option, #[serde(skip_serializing_if = "Option::is_none")] pub contains: Option, #[serde(skip_serializing_if = "Option::is_none")] pub offset: Option, #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub fields: Option, // this will be fill from fields_vec automatically. #[serde(skip_serializing_if = "Option::is_none")] pub sort: Option, // this will be fill from sort_vec automatically. #[serde(skip_serializing)] pub fields_vec: Option>, #[serde(skip_serializing)] pub sort_vec: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub format: Option, } #[derive(Debug, Default, Serialize)] pub struct PatchAdminUser { #[serde(skip_serializing_if = "Option::is_none")] pub data: Option, #[serde(skip_serializing_if = "Option::is_none")] pub disable: Option, } #[derive(Debug, Default, Serialize)] pub struct PatchAdminUserData { #[serde(rename = "verifiedAt", skip_serializing_if = "Option::is_none")] pub verified_at: Option, #[serde(skip_serializing_if = "Option::is_none")] pub roles: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub password: Option, #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(skip_serializing_if = "Option::is_none")] pub info: Option>, }