ifixkart-backend/app/schemas/ServiceQuoteSchema.py

30 lines
749 B
Python

from pydantic import BaseModel
from typing import Optional
from datetime import datetime
class ServiceJobQuoteCreate(BaseModel):
subtotal: float
tax: float = 0.0
additional_damage_amount: float = 0.0
total: float
reason: Optional[str] = None
expires_at: Optional[datetime] = None
class ServiceJobQuoteResponse(BaseModel):
quote_id: str
service_job_id: str
version: int
subtotal: float
tax: float
additional_damage_amount: float
total: float
status: str
reason: Optional[str]
expires_at: Optional[datetime]
accepted_at: Optional[datetime]
rejected_at: Optional[datetime]
created_by: Optional[str]
created_at: datetime
class Config:
from_attributes = True