users: migrations, queries, users crate: create user, get first admin user
This commit is contained in:
parent
8af226cd05
commit
3e168c19bc
13 changed files with 283 additions and 1 deletions
22
crates/users/src/lib.rs
Normal file
22
crates/users/src/lib.rs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
mod database;
|
||||
mod error;
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use id::UserID;
|
||||
|
||||
pub use crate::error::Error;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct User {
|
||||
id: UserID,
|
||||
created_at: DateTime<Utc>,
|
||||
updated_at: DateTime<Utc>,
|
||||
is_admin: bool,
|
||||
username: String,
|
||||
name: Option<String>,
|
||||
email: Option<String>,
|
||||
password: Option<String>,
|
||||
password_recover: Option<String>,
|
||||
paper_key: Option<String>,
|
||||
is_archived: bool,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue