diff --git a/server/src/models.rs b/server/src/models.rs index ccb65b4..0f3e41f 100644 --- a/server/src/models.rs +++ b/server/src/models.rs @@ -7,19 +7,22 @@ pub struct Invite { pub uses: i32, } -#[derive(Serialize, Deserialize, Queryable, Debug)] + +#[derive(Insertable)] #[table_name = "users"] -pub struct User { - pub userid: u64, - pub username: String, +pub struct InsertableUser { + pub name: String, pub secret: String, pub date: u64, pub status: i32, } -#[derive(Insertable) +// NOTE: Insertable is the only rls stop complaining at us about `table_name` not being found in scope +// its dumb but its how we're going to compile this, with some dead code +#[derive(Insertable, Serialize, Deserialize, Queryable, Debug)] #[table_name = "users"] -pub struct InsertableUser { +pub struct User { + pub id: u64, pub name: String, pub secret: String, pub date: u64,