Add MarketService write methods and clean up stubs
Add create_marketplace() and soft_delete_marketplace() to MarketService protocol, SQL implementation, and stubs — centralises market CRUD that was previously duplicated in blog and events app-level service files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -92,6 +92,18 @@ class StubMarketService:
|
||||
async def product_by_id(self, session: AsyncSession, product_id: int) -> ProductDTO | None:
|
||||
return None
|
||||
|
||||
async def create_marketplace(
|
||||
self, session: AsyncSession, container_type: str, container_id: int,
|
||||
name: str, slug: str,
|
||||
) -> MarketPlaceDTO:
|
||||
raise RuntimeError("MarketService not available")
|
||||
|
||||
async def soft_delete_marketplace(
|
||||
self, session: AsyncSession, container_type: str, container_id: int,
|
||||
slug: str,
|
||||
) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
class StubCartService:
|
||||
async def cart_summary(
|
||||
|
||||
Reference in New Issue
Block a user