mirror of
https://github.com/kristoferssolo/echoes-of-ascension.git
synced 2026-03-22 00:26:26 +00:00
feat(user): add user models
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
pub mod models;
|
||||||
pub mod telemetry;
|
pub mod telemetry;
|
||||||
|
|
||||||
use leptos::prelude::*;
|
use leptos::prelude::*;
|
||||||
|
|||||||
2
app/src/models/mod.rs
Normal file
2
app/src/models/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
pub mod user;
|
||||||
|
|
||||||
20
app/src/models/user.rs
Normal file
20
app/src/models/user.rs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
use chrono::{DateTime, Utc};
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
|
pub struct User {
|
||||||
|
pub id: i64,
|
||||||
|
pub username: String,
|
||||||
|
pub code: String,
|
||||||
|
pub created_at: DateTime<Utc>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
|
pub struct UserRegistration {
|
||||||
|
pub username: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
|
pub struct UserLogin {
|
||||||
|
pub code: String,
|
||||||
|
}
|
||||||
1
server/src/db/mod.rs
Normal file
1
server/src/db/mod.rs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
mod scores;
|
||||||
0
server/src/db/scores.rs
Normal file
0
server/src/db/scores.rs
Normal file
1
server/src/lib.rs
Normal file
1
server/src/lib.rs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
pub mod db;
|
||||||
Reference in New Issue
Block a user