Add /family/{id}/users route

This commit is contained in:
2023-06-21 17:01:52 +02:00
parent 381a4797e4
commit ad54f83c2c
5 changed files with 48 additions and 8 deletions

View File

@ -7,7 +7,7 @@ pub struct UserID(pub i32);
#[derive(Queryable, Debug, serde::Serialize)]
pub struct User {
pub id: i32,
id: i32,
pub name: String,
pub email: String,
#[serde(skip_serializing)]
@ -58,7 +58,7 @@ pub struct FamilyID(pub i32);
#[derive(Queryable, Debug, serde::Serialize)]
pub struct Family {
pub id: i32,
id: i32,
pub time_create: i64,
pub name: String,
pub invitation_code: String,
@ -80,8 +80,8 @@ pub struct NewFamily<'a> {
#[derive(Queryable, Debug, serde::Serialize)]
pub struct Membership {
pub user_id: i32,
pub family_id: i32,
user_id: i32,
family_id: i32,
pub time_create: i64,
pub is_admin: bool,
}