switch to mongodb, add drag&drop
This commit is contained in:
1
backend/src/models/mod.rs
Normal file
1
backend/src/models/mod.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod user_model;
|
||||
11
backend/src/models/user_model.rs
Normal file
11
backend/src/models/user_model.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use mongodb::bson::oid::ObjectId;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct User {
|
||||
#[serde(rename = "_id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<ObjectId>,
|
||||
pub username: String,
|
||||
pub email: String,
|
||||
pub password: String,
|
||||
}
|
||||
Reference in New Issue
Block a user