fixing DQ issues

This commit is contained in:
2025-09-14 15:47:38 +02:00
parent 3eb18ef91e
commit 0ce708cf09
27 changed files with 430 additions and 214 deletions

View File

@@ -1,6 +1,15 @@
# app/services/shop_service.py
"""Summary description ....
This module provides classes and functions for:
- ....
- ....
- ....
"""
import logging
from datetime import datetime
from typing import Any, Dict, List, Optional, Tuple
from typing import List, Optional, Tuple
from fastapi import HTTPException
from sqlalchemy import func
@@ -13,7 +22,7 @@ logger = logging.getLogger(__name__)
class ShopService:
"""Service class for shop operations following the application's service pattern"""
"""Service class for shop operations following the application's service pattern."""
def create_shop(
self, db: Session, shop_data: ShopCreate, current_user: User
@@ -75,7 +84,7 @@ class ShopService:
verified_only: bool = False,
) -> Tuple[List[Shop], int]:
"""
Get shops with filtering
Get shops with filtering.
Args:
db: Database session
@@ -110,7 +119,7 @@ class ShopService:
def get_shop_by_code(self, db: Session, shop_code: str, current_user: User) -> Shop:
"""
Get shop by shop code with access control
Get shop by shop code with access control.
Args:
db: Database session
@@ -145,7 +154,7 @@ class ShopService:
self, db: Session, shop: Shop, shop_product: ShopProductCreate
) -> ShopProduct:
"""
Add existing product to shop catalog with shop-specific settings
Add existing product to shop catalog with shop-specific settings.
Args:
db: Database session
@@ -211,7 +220,7 @@ class ShopService:
featured_only: bool = False,
) -> Tuple[List[ShopProduct], int]:
"""
Get products in shop catalog with filtering
Get products in shop catalog with filtering.
Args:
db: Database session