munch-ease-backend/households/models.py
2025-11-05 20:24:47 +11:00

40 lines
719 B
Python

from __future__ import annotations
from typing import ClassVar
from common import ApiModel
class Household(ApiModel):
KEYS: ClassVar[list[str]] = ["id", "name", "slug"]
id: int
name: str
slug: str
class HouseholdMember(ApiModel):
KEYS: ClassVar[list[str]] = ["user_id", "household_id", "role"]
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",
]
id: int
household_id: int
email: str
invited_by_user_id: int
token: str
expires_at: str
status: str