license_api/auth/
models.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Serialize, Debug)]
4pub struct LoginRequest {
5    pub username: String,
6    pub password: String,
7}
8
9#[derive(Deserialize, Debug)]
10pub struct MeResponse {
11    pub telegram_id: String,
12    pub username: String,
13    pub is_banned: bool,
14    pub is_admin: bool,
15    pub hwid: String,
16}
17
18#[derive(Deserialize, Debug)]
19pub struct LoginResponse {
20    pub access_token: String,
21    pub token_type: String,
22}
23
24#[derive(Deserialize, Debug)]
25pub struct ErrorResponse {
26    pub detail: String,
27}