wallabag_api/types/
user.rs1use chrono::{DateTime, Utc};
5use serde::{Deserialize, Serialize};
6
7use crate::types::ID;
8
9#[derive(Deserialize, Serialize, Debug)]
11pub struct User {
12 pub id: ID,
13 pub username: String,
14 pub email: String,
15 pub created_at: Option<DateTime<Utc>>,
16 pub updated_at: Option<DateTime<Utc>>,
17}
18
19#[derive(Deserialize, Serialize, Debug)]
22pub struct RegisterInfo {
23 pub username: String,
24 pub password: String,
25 pub email: String,
26 pub client_name: String,
27}
28
29#[derive(Deserialize, Serialize, Debug)]
31pub struct NewlyRegisteredInfo {
32 pub id: ID,
33 pub username: String,
34 pub email: String,
35 pub created_at: Option<DateTime<Utc>>,
36 pub updated_at: Option<DateTime<Utc>>,
37 pub default_client: ClientInfo,
38}
39
40#[derive(Deserialize, Serialize, Debug)]
42pub struct ClientInfo {
43 client_id: String,
44 client_secret: String,
45 name: String,
46}