diff --git a/server/src/models.rs b/server/src/models.rs index fdb3f21..ccb65b4 100644 --- a/server/src/models.rs +++ b/server/src/models.rs @@ -7,12 +7,21 @@ pub struct Invite { pub uses: i32, } -#[derive(Serialize, Deserialize, Queryable, Insertable, Debug)] +#[derive(Serialize, Deserialize, Queryable, Debug)] #[table_name = "users"] pub struct User { pub userid: u64, pub username: String, - pub key: String, + pub secret: String, + pub date: u64, + pub status: i32, +} + +#[derive(Insertable) +#[table_name = "users"] +pub struct InsertableUser { + pub name: String, + pub secret: String, pub date: u64, pub status: i32, } @@ -43,4 +52,4 @@ pub struct InsertableChannel { pub permissions: i32, pub limit: i32, // <= 0 means there is no limit pub type_: i32, // 1 for voice 2 for text -} \ No newline at end of file +}