use crate::schema::config; use crate::schema::strava_tokens; use crate::schema::users; use chrono::DateTime; use chrono::Utc; #[derive(Insertable, Queryable)] #[table_name = "config"] pub struct Config { pub strava_client_secret: String, pub strava_client_id: String, pub rocket_secret_key: String, pub singleton: bool, } #[derive(Insertable)] #[table_name = "users"] pub struct NewUser<'a> { pub username: &'a str, pub password: &'a str, } #[derive(Queryable)] pub struct User { pub username: String, pub password: String, } #[derive(Insertable, Queryable)] #[table_name = "strava_tokens"] pub struct StravaToken { pub username: String, pub refresh_token: String, pub access_token: String, pub expires_at: DateTime, }