munch-ease-backend/households/models.py

41 lines
719 B
Python
Raw 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]] = ["user_id", "household_id", "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",
"email",
"invited_by_user_id",
"token",
"expires_at",
"status",
]
2025-11-05 09:24:47 +00:00
id: int
household_id: int
email: str
invited_by_user_id: int
token: str
expires_at: str
status: str