service_man/api/schemas/refers_schema.py

29 lines
485 B
Python
Raw Normal View History

2024-03-29 00:29:35 +03:00
from dataclasses import dataclass
from datetime import datetime
from uuid import UUID
@dataclass(frozen=True)
class LifetimeRequestDTO:
days: int = 0
hours: int = 0
minutes: int = 30
@dataclass(frozen=True)
class ReferRequestDTO:
lifetime: LifetimeRequestDTO
@dataclass(frozen=True)
class RefererResponseDTO:
name: str
email: str
@dataclass(frozen=True)
class ReferResponseDTO:
refer_id: UUID
expire_at: datetime
referer: RefererResponseDTO