flask-webhook/flask_demo_api/protocols/models.py

20 lines
282 B
Python
Raw Permalink Normal View History

2024-04-22 04:00:23 +03:00
from dataclasses import dataclass
from enum import Enum
class Gender(Enum):
MALE = "Male"
FEMALE = "Female"
@dataclass(frozen=True)
class PeopleRequest:
id: int | str
name: str
@dataclass(frozen=True)
class GenderResponse:
id: int | str
gender: Gender