24 lines
504 B
Rust
24 lines
504 B
Rust
|
use time::Date;
|
||
|
|
||
|
#[derive(Queryable, Selectable)]
|
||
|
#[diesel(table_name = crate::schema::users)]
|
||
|
#[diesel(check_for_backend(diesel::mysql::Mysql))]
|
||
|
pub struct User {
|
||
|
pub id: i64,
|
||
|
pub username: String,
|
||
|
pub email: String,
|
||
|
pub salt: String,
|
||
|
pub pass: String,
|
||
|
pub joined: Date,
|
||
|
}
|
||
|
|
||
|
#[derive(Insertable)]
|
||
|
#[diesel(table_name = crate::schema::users)]
|
||
|
pub struct NewUser {
|
||
|
pub username: String,
|
||
|
pub email: String,
|
||
|
pub salt: String,
|
||
|
pub pass: String,
|
||
|
pub joined: Date,
|
||
|
}
|