Spaces:
Sleeping
Sleeping
from pydantic import BaseModel, Field | |
from typing import List, Optional | |
class AuditParaSchema(BaseModel): | |
audit_para_number: Optional[int] = Field(None, description="The number of the audit para.") | |
audit_para_heading: Optional[str] = Field(None, description="The original heading from the DAR.") | |
revenue_involved_lakhs_rs: Optional[float] = Field(None, description="Revenue involved in Lakhs Rs.") | |
revenue_recovered_lakhs_rs: Optional[float] = Field(None, description="Revenue recovered in Lakhs Rs.") | |
status_of_para: Optional[str] = Field(None, description="Status of the para, e.g., 'Agreed and Paid'.") | |
class DARHeaderSchema(BaseModel): | |
audit_group_number: Optional[int] = Field(None, description="Audit Group Number.") | |
gstin: Optional[str] = Field(None, description="GSTIN of the taxpayer.") | |
trade_name: Optional[str] = Field(None, description="Name of the taxpayer.") | |
category: Optional[str] = Field(None, description="Category of the taxpayer.") | |
total_amount_detected_overall_rs: Optional[float] = Field(None, description="Overall total amount detected in Rs.") | |
total_amount_recovered_overall_rs: Optional[float] = Field(None, description="Overall total amount recovered in Rs.") | |
class ParsedDARReport(BaseModel): | |
header: Optional[DARHeaderSchema] = None | |
audit_paras: List[AuditParaSchema] = [] | |
parsing_errors: Optional[str] = Field(None, description="Errors from the parsing process.") | |
class HarmonisedPara(BaseModel): | |
"""A model to hold the original and its corresponding harmonised heading.""" | |
original_heading: str | |
harmonised_heading: str |