| use serde::{Deserialize, Serialize}; |
|
|
| #[derive(Debug, Clone, Serialize, Deserialize)] |
| pub struct User { |
| pub user_id: i64, |
| pub username: Option<String>, |
| pub first_name: Option<String>, |
| pub last_name: Option<String>, |
| pub role: String, |
| pub daily_limit: i64, |
| pub format_preference: String, |
| pub created_at: String, |
| pub last_active_at: String, |
| } |
|
|
| #[derive(Debug, Clone, Serialize, Deserialize)] |
| pub struct DailyStats { |
| pub user_id: i64, |
| pub date: String, |
| pub count: i64, |
| } |
|
|
| #[derive(Debug, Clone, Serialize, Deserialize)] |
| pub struct DownloadRecord { |
| pub id: i64, |
| pub user_id: i64, |
| pub book_id: String, |
| pub book_name: Option<String>, |
| pub format: Option<String>, |
| pub status: String, |
| pub file_size: Option<i64>, |
| pub started_at: String, |
| pub finished_at: Option<String>, |
| } |
|
|
| #[derive(Debug, Clone, Serialize, Deserialize)] |
| pub struct ForceChannel { |
| pub id: i64, |
| pub channel_id: String, |
| pub channel_name: Option<String>, |
| pub channel_type: String, |
| pub invite_link: Option<String>, |
| pub added_at: String, |
| pub added_by: i64, |
| } |
|
|