12 lines
308 B
Rust
12 lines
308 B
Rust
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,
|
|
}
|