aboutsummaryrefslogtreecommitdiffstats
path: root/crates/turtle/src/atuin_server/database/models.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-11 18:02:55 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-11 18:02:55 +0200
commit0b6ca5cb8ca4c46265e08e13053260d9b5cff568 (patch)
tree9dc656095f806e6dd1177e40b9a87cf6d6f10f1b /crates/turtle/src/atuin_server/database/models.rs
parentchore(server): Remove the last remnants of the "hub" sync-server thingy (diff)
downloadatuin-0b6ca5cb8ca4c46265e08e13053260d9b5cff568.zip
feat(server): Make user stuff stateless
Diffstat (limited to 'crates/turtle/src/atuin_server/database/models.rs')
-rw-r--r--crates/turtle/src/atuin_server/database/models.rs51
1 files changed, 2 insertions, 49 deletions
diff --git a/crates/turtle/src/atuin_server/database/models.rs b/crates/turtle/src/atuin_server/database/models.rs
index e47d614d..3fa6f471 100644
--- a/crates/turtle/src/atuin_server/database/models.rs
+++ b/crates/turtle/src/atuin_server/database/models.rs
@@ -1,52 +1,5 @@
-use time::OffsetDateTime;
-
-pub(crate) struct History {
- pub(crate) id: i64,
- pub(crate) client_id: String, // a client generated ID
- pub(crate) user_id: i64,
- pub(crate) hostname: String,
- pub(crate) timestamp: OffsetDateTime,
-
- /// All the data we have about this command, encrypted.
- ///
- /// Currently this is an encrypted msgpack object, but this may change in the future.
- pub(crate) data: String,
-
- pub(crate) created_at: OffsetDateTime,
-}
-
-pub(crate) struct NewHistory {
- pub(crate) client_id: String,
- pub(crate) user_id: i64,
- pub(crate) hostname: String,
- pub(crate) timestamp: OffsetDateTime,
-
- /// All the data we have about this command, encrypted.
- ///
- /// Currently this is an encrypted msgpack object, but this may change in the future.
- pub(crate) data: String,
-}
+use uuid::Uuid;
pub(crate) struct User {
- pub(crate) id: i64,
- pub(crate) username: String,
- pub(crate) email: String,
- pub(crate) password: String,
-}
-
-pub(crate) struct Session {
- pub(crate) id: i64,
- pub(crate) user_id: i64,
- pub(crate) token: String,
-}
-
-pub(crate) struct NewUser {
- pub(crate) username: String,
- pub(crate) email: String,
- pub(crate) password: String,
-}
-
-pub(crate) struct NewSession {
- pub(crate) user_id: i64,
- pub(crate) token: String,
+ pub(crate) id: Uuid,
}