diff options
| author | Conrad Ludgate <conrad.ludgate@truelayer.com> | 2022-04-12 23:06:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-12 23:06:19 +0100 |
| commit | a95018cc9039851e707973bc19faf907132ae4f3 (patch) | |
| tree | e135f1da64c5d020f336d437f83a333298861ca0 /atuin-server/src/models.rs | |
| parent | fix env config parsing (#295) (diff) | |
| download | atuin-a95018cc9039851e707973bc19faf907132ae4f3.zip | |
goodbye warp, hello axum (#296)
Diffstat (limited to 'atuin-server/src/models.rs')
| -rw-r--r-- | atuin-server/src/models.rs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/atuin-server/src/models.rs b/atuin-server/src/models.rs index d493153a..ee84f58a 100644 --- a/atuin-server/src/models.rs +++ b/atuin-server/src/models.rs @@ -1,5 +1,3 @@ -use std::borrow::Cow; - use chrono::prelude::*; #[derive(sqlx::FromRow)] @@ -15,13 +13,13 @@ pub struct History { pub created_at: NaiveDateTime, } -pub struct NewHistory<'a> { - pub client_id: Cow<'a, str>, +pub struct NewHistory { + pub client_id: String, pub user_id: i64, - pub hostname: Cow<'a, str>, + pub hostname: String, pub timestamp: chrono::NaiveDateTime, - pub data: Cow<'a, str>, + pub data: String, } #[derive(sqlx::FromRow)] @@ -39,13 +37,13 @@ pub struct Session { pub token: String, } -pub struct NewUser<'a> { - pub username: Cow<'a, str>, - pub email: Cow<'a, str>, - pub password: Cow<'a, str>, +pub struct NewUser { + pub username: String, + pub email: String, + pub password: String, } -pub struct NewSession<'a> { +pub struct NewSession { pub user_id: i64, - pub token: Cow<'a, str>, + pub token: String, } |
