summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2023-02-27 18:39:20 +0000
committerEllie Huxtable <ellie@elliehuxtable.com>2023-03-10 18:45:56 +0000
commit1841b46158c2cc43176cac396d9b4236310e17e6 (patch)
tree8b6d4f880fef46619307a0a98f835e49c5065eca
parent9c2c5446e462e69a35c6a6b24073b6adb18a21dc (diff)
Add NewEvent model
-rw-r--r--atuin-server/src/models.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/atuin-server/src/models.rs b/atuin-server/src/models.rs
index ee84f58a..90319fb2 100644
--- a/atuin-server/src/models.rs
+++ b/atuin-server/src/models.rs
@@ -1,5 +1,7 @@
use chrono::prelude::*;
+use atuin_common::api::EventType;
+
#[derive(sqlx::FromRow)]
pub struct History {
pub id: i64,
@@ -22,6 +24,16 @@ pub struct NewHistory {
pub data: String,
}
+pub struct NewEvent {
+ pub client_id: String,
+ pub user_id: i64,
+ pub hostname: String,
+ pub timestamp: chrono::NaiveDateTime,
+ pub event_type: EventType,
+
+ pub data: String,
+}
+
#[derive(sqlx::FromRow)]
pub struct User {
pub id: i64,