[Add] Structure
This commit is contained in:
parent
b2f3ed12f3
commit
ed1b21b3ff
44 changed files with 2210 additions and 2721 deletions
19
src/models/user.rs
Normal file
19
src/models/user.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
use super::{IotaId, UserId};
|
||||
use mtp::crypto::PublicKeyBundle;
|
||||
|
||||
#[derive(Clone, Debug, serde::Serialize)]
|
||||
pub struct User {
|
||||
pub id: UserId,
|
||||
pub iota_id: IotaId,
|
||||
pub username: String,
|
||||
pub display: Option<String>,
|
||||
pub status: Option<String>,
|
||||
pub about: Option<String>,
|
||||
pub avatar: Option<Vec<u8>>,
|
||||
pub sub_level: i32,
|
||||
pub sub_end: i64,
|
||||
#[serde(serialize_with = "crate::models::serialize_public_key")]
|
||||
pub public_key: PublicKeyBundle,
|
||||
#[serde(skip_serializing)]
|
||||
pub token: String,
|
||||
}
|
||||
Loading…
Reference in a new issue