feat: вфыв

This commit is contained in:
2024-07-21 10:56:59 +03:00
parent 6b09251141
commit 7c10d8777e
26 changed files with 497 additions and 43 deletions

14
services/marketplace.py Normal file
View File

@@ -0,0 +1,14 @@
from sqlalchemy import select
from models import BaseMarketplace
from schemas.marketplace import GetAllBaseMarketplacesResponse
from services.base import BaseService
class MarketplaceService(BaseService):
async def get_all_base_marketplaces(self) -> GetAllBaseMarketplacesResponse:
stmt = (select(BaseMarketplace).order_by(BaseMarketplace.key))
base_marketplaces = (await self.session.scalars(stmt)).all()
return GetAllBaseMarketplacesResponse(
base_marketplaces=base_marketplaces
)