Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from decimal import Decimal
- from enum import Enum
- from typing import Optional
- from pydantic import BaseModel, Field
- class RecordType(str, Enum):
- credit = '借'
- debit = '贷'
- class AccountRecord(BaseModel):
- seq_id: str = Field(title="电子回单唯一标识")
- only_seq: Optional[str] = Field(title="银行交易流水号")
- acc_no: str = Field('己方银行账号')
- acc_name: str = Field('己方银行户名')
- receipt_acc_no: str = Field(title="对方银行账号")
- receipt_acc_name: str = Field(title="对方账户户名")
- receipt_acc_bank: str = Field(title="对方银行")
- record_type: RecordType = Field(title="流水类型(借/贷)")
- amount: Decimal = Field(title="原币金额")
- currency: str = Field(title="币种")
- summary: Optional[str] = Field(title="摘要")
- use_cn: Optional[str] = Field(title="用途")
- class Config:
- use_enum_values = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement