diff options
Diffstat (limited to 'src/models.rs')
-rw-r--r-- | src/models.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/models.rs b/src/models.rs index 3b35693..fd946b9 100644 --- a/src/models.rs +++ b/src/models.rs @@ -1,6 +1,8 @@ -use crate::error::Error; use crate::schema::config; use crate::schema::users; +use crate::schema::strava_tokens; +use chrono::Utc; +use chrono::DateTime; #[derive(Insertable, Queryable)] #[table_name = "config"] @@ -23,3 +25,12 @@ 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<Utc>, +} |