30 lines
700 B
Python
30 lines
700 B
Python
from src.infrastructure.database.decorators import transactional
|
|
from src.presentation.schemas.order import CreateOrder
|
|
|
|
|
|
class UserLoginStartCommand:
|
|
def __init__(
|
|
self,
|
|
hash_service: IHashService,
|
|
cache: ICache,
|
|
unit_of_work: IUnitOfWork,
|
|
logger: ILogger,
|
|
messanger: IQueueMessanger,
|
|
):
|
|
self._hash_service = hash_service
|
|
self._unit_of_work = unit_of_work
|
|
self._cache = cache
|
|
self._logger = logger
|
|
self._messanger = messanger
|
|
|
|
|
|
@transactional
|
|
async def __call__(self, payment_data: CreateOrder) -> bool:
|
|
|
|
|
|
metadata: dict = {
|
|
'user_id': str(payment_data.user_id),
|
|
}
|
|
|
|
|