from typing import Optional, List, Dict
import csv
import io
import os
import json
from datetime import datetime
from sqlalchemy.orm import Session
from app.db.database import transaction
from app.services.inventory_service import InventoryService

class FileProcessingService:
    def __init__(self, cache_dir: str = "app/data/cache/tcgplayer"):
        self.cache_dir = cache_dir
        self.inventory_service = InventoryService()
        os.makedirs(cache_dir, exist_ok=True)

    def _get_cache_path(self, filename: str) -> str:
        return os.path.join(self.cache_dir, filename)
    
