23 lines
610 B
Python
23 lines
610 B
Python
from typing import Any, Dict, Optional
|
|
from pydantic import BaseModel, ConfigDict
|
|
from enum import Enum
|
|
|
|
from .models import OperationType
|
|
|
|
class InvoiceSettingsBase(BaseModel):
|
|
invoice_type: str
|
|
operation_type: OperationType
|
|
settings: Dict[str, Any]
|
|
|
|
class InvoiceSettingsRequest(InvoiceSettingsBase):
|
|
"""Schema for creating or updating invoice settings"""
|
|
pass
|
|
|
|
class InvoiceSettingsResponse(InvoiceSettingsBase):
|
|
"""Schema for returning invoice settings"""
|
|
id: int
|
|
tenant_id: int
|
|
company_id: int
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|