separated clients handlers, cart->checkout ppline
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -17,3 +18,4 @@ class CartItemDTO:
|
||||
class CartDTO:
|
||||
items: list[CartItemDTO]
|
||||
total: int
|
||||
order_id: Optional[int] = None
|
||||
|
||||
18
dto/checkout.py
Normal file
18
dto/checkout.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
|
||||
from aiogram.types import Message
|
||||
|
||||
|
||||
@dataclass
|
||||
class CheckoutContext:
|
||||
orig_msg: Message
|
||||
order_id: int
|
||||
name: Optional[str] = None
|
||||
phone: Optional[str] = None
|
||||
address: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class PaymentContext:
|
||||
notification_msg: Message
|
||||
Reference in New Issue
Block a user