rust code to go along with lack of optional fields
This commit is contained in:
parent
50c2c1da0e
commit
d7c70afd68
@ -7,11 +7,11 @@ pub struct Invite {
|
|||||||
pub uses: Option<i32>,
|
pub uses: Option<i32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Queryable, Debug]
|
#[derive(Serialize, Deserialize, Queryable, Insertable, Debug)]
|
||||||
#[table_name = "users"]
|
#[table_name = "users"]
|
||||||
pub struct User {
|
pub struct User {
|
||||||
userid: u64,
|
userid: u64,
|
||||||
username: String,
|
username: String,
|
||||||
key_hash: Option<String>,
|
key: String,
|
||||||
date: u64,
|
date: u64,
|
||||||
}
|
}
|
@ -16,8 +16,8 @@ table! {
|
|||||||
table! {
|
table! {
|
||||||
users (userid) {
|
users (userid) {
|
||||||
userid -> Unsigned<Bigint>,
|
userid -> Unsigned<Bigint>,
|
||||||
username -> Nullable<Varchar>,
|
username -> Varchar,
|
||||||
key_hash -> Nullable<Varchar>,
|
key -> Varchar,
|
||||||
date -> Unsigned<Bigint>,
|
date -> Unsigned<Bigint>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user