from typing import Any, Dict, List, Optional
from pydantic import BaseModel, ConfigDict

class ItemPresetBase(BaseModel):
    name: str
    description: Optional[str] = None
    items: List[Dict[str, Any]]

class ItemPresetCreate(ItemPresetBase):
    """Schema for creating a new item preset"""
    pass

class ItemPresetUpdate(BaseModel):
    """Schema for updating an existing item preset"""
    name: Optional[str] = None
    description: Optional[str] = None
    items: Optional[List[Dict[str, Any]]] = None

class ItemPresetResponse(ItemPresetBase):
    """Schema for returning an item preset"""
    id: int
    tenant_id: int
    company_id: int

    model_config = ConfigDict(from_attributes=True)
