flask-webhook/flask_demo_api/protocols/models.py

20 lines
282 B
Python

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