Skip to main content

atuin_server_database/
models.rs

1#[derive(sqlx::FromRow)]
2pub struct User {
3    pub id: i64,
4    pub username: String,
5    pub email: String,
6    pub password: String,
7}
8
9#[derive(sqlx::FromRow)]
10pub struct Session {
11    pub id: i64,
12    pub user_id: i64,
13    pub token: String,
14}
15
16pub struct NewUser {
17    pub username: String,
18    pub email: String,
19    pub password: String,
20}
21
22pub struct NewSession {
23    pub user_id: i64,
24    pub token: String,
25}