// src/auth/structs.rs use serde::{Deserialize, Serialize}; use sqlx::FromRow; use sqlx::PgPool; #[derive(Debug, Serialize, Deserialize, FromRow)] pub struct User { pub id: i32, pub username: String, pub password: String, pub created: String, pub email: Option, pub last_login: Option, pub owner: Option, } #[derive(Debug, Clone)] pub struct AppState { pub db: PgPool, pub jwt_secret: String, } #[derive(Debug, Serialize, Deserialize)] pub struct RegisterRequest { pub username: String, pub password: String, } #[derive(Debug, Serialize, Deserialize)] pub struct LoginRequest { pub username: String, pub password: String, } #[derive(Debug, Serialize, Deserialize)] pub struct Claims { pub sub: String, pub exp: usize, }