Spaces:
Sleeping
Sleeping
# generated by datamodel-codegen: | |
# filename: schema.json | |
# timestamp: 2023-07-28T11:36:16+00:00 | |
from __future__ import annotations | |
from datetime import datetime | |
from pydantic import BaseModel, Field, constr, validator, ValidationError | |
class BankDetails(BaseModel): | |
"""account holder name, bank name, account number, branch, ifs code, swift code""" | |
account_holder_name: str = Field(..., title="The name of the account holder") | |
bank_name: str = Field(..., title="The name of the bank") | |
account_number: str = Field(..., title="The account number") | |
branch: str = Field(..., title="The branch of the bank") | |
ifs_code: str = Field(..., title="The IFS code of the bank") | |
swift_code: str = Field(..., title="The SWIFT code of the bank") | |
class InformationExtractedFromABillReceipt(BaseModel): | |
""" | |
GSTIN, billing address, invoice number, invoice date, due date, total, balance due, | |
bank details: (account holder name, bank name, account number, branch, ifs code, swift | |
code), recipient, registration id, registration fee, registration date/time | |
""" | |
# gstin: constr(min_length=15) = Field( | |
# ..., title="The alphanumeric GSTIN/GST number code" | |
# ) | |
# billing_address: str = Field(..., title="The billing address") | |
# uids: str = Field(..., title="The invoice number") | |
# invoice_date: datetime = Field(..., title="The date-time the invoice was issued") | |
# due_date: datetime = Field(..., title="The date-time the invoice is due") | |
# total: float = Field(..., title="Total amount or price") | |
# balance_due: float = Field(..., title="The amount due") | |
# bank_details: BankDetails = Field(..., title="Bank details") | |
# recipient: str = Field( | |
# ..., | |
# title="Name of the person/entity that the invoice item was charged or delivered to", | |
# ) | |
# registration_id: str = Field(..., title="The registration ID") | |
# registration_fee: float = Field(..., title="The registration fee") | |
# registration_date_time: datetime = Field(..., title="The registration date-time") | |
uids: str = Field(..., title="The bill number/invoice number") | |
total: float = Field(..., title="cost of journey ticket converted from given currency to INR") | |
issue_date: date = Field(..., title="The date the invoice was issued") | |
summary: str = Field(..., title="5-6 words short summary of purchased good(s)") | |