munch-ease-backend/households/models.py

36 lines
679 B
Python
Raw Permalink Normal View History

2025-11-05 09:24:47 +00:00
from __future__ import annotations
2025-11-01 04:33:36 +00:00
from typing import ClassVar
from common import ApiModel
class Household(ApiModel):
KEYS: ClassVar[list[str]] = ["id", "name", "slug"]
2025-11-05 09:24:47 +00:00
id: int
name: str
slug: str
class HouseholdMember(ApiModel):
KEYS: ClassVar[list[str]] = ["id", "display_name", "role"]
2025-11-05 09:24:47 +00:00
id: int
display_name: str
role: str
class HouseholdInvitation(ApiModel):
KEYS: ClassVar[list[str]] = [
"id",
"household_id",
"invited_by_user_id",
"token",
"expires_at",
"status",
]
2025-11-05 09:24:47 +00:00
id: int
household_id: int
invited_by_user_id: int
token: str
expires_at: str
status: str