Add /family/{id}/info route

This commit is contained in:
2023-06-21 16:36:46 +02:00
parent 053f08f927
commit 381a4797e4
7 changed files with 111 additions and 6 deletions

View File

@ -80,10 +80,20 @@ pub struct NewFamily<'a> {
#[derive(Queryable, Debug, serde::Serialize)]
pub struct Membership {
user_id: i32,
family_id: i32,
time_create: i64,
is_admin: bool,
pub user_id: i32,
pub family_id: i32,
pub time_create: i64,
pub is_admin: bool,
}
impl Membership {
pub fn user_id(&self) -> UserID {
UserID(self.user_id)
}
pub fn family_id(&self) -> FamilyID {
FamilyID(self.family_id)
}
}
#[derive(Insertable)]