use serde::{Serialize, Deserialize}; use chrono::NaiveDateTime; use diesel::prelude::*; #[derive(Queryable, Serialize, Deserialize, Debug)] pub struct User { pub id: i32, pub username: String, pub password: String, pub power_level: i16, pub is_owner: bool, pub created_at: NaiveDateTime, pub updated_at: Option } #[derive(Insertable, Serialize, Deserialize)] #[diesel(table_name = crate::schema::users)] pub struct NewUser { pub username: String, pub password: String }