Move database into the main app
I was having issues including the lib as a crate, its fine just being a module for now.
This commit is contained in:
1 parent
1c1c8531aa
commit
2aa1b61429
13 files changed
+139
-221
No files matched your search
@@ -0,0 +1,17 @@
|
||||
use crate::database::schema::users;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Insertable)]
|
||||
#[table_name = "users"]
|
||||
pub struct InsertUser<'a> {
|
||||
pub username: &'a str,
|
||||
pub password: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Queryable, Clone, Debug)]
|
||||
pub struct User {
|
||||
pub id: i32,
|
||||
pub username: String,
|
||||
#[serde(skip_serializing)]
|
||||
pub password: String,
|
||||
}
|
||||
Reference in new issue
Block a user