Update users.rs

This commit is contained in:
Guilherme Werner
2024-01-12 15:55:49 -03:00
parent d29a5f6216
commit 0168cd14e7

View File

@ -15,7 +15,7 @@ pub enum UserType {
#[serde_as]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct User {
pub struct Profile {
#[serde_as(as = "DisplayFromStr")]
pub id: u64,
pub uuid: String,
@ -39,3 +39,17 @@ pub struct User {
pub created: NaiveDateTime,
pub updated: Option<NaiveDateTime>,
}
#[serde_as]
#[derive(Debug, Serialize, Deserialize)]
pub struct MiniProfile {
#[serde_as(as = "DisplayFromStr")]
pub id: u64,
pub uuid: String,
pub name: String,
pub display_name: String,
#[serde(rename = "type")]
pub kind: UserType,
pub verified: bool,
pub photo_url: String,
}