File size: 518 Bytes
9d4bd7c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from pydantic import BaseModel
from typing import Optional
from datetime import date
class BondCreate(BaseModel):
instrument_type: str
auction_number: int
auction_date: date
maturity_years: Optional[str]
maturity_date: date
effective_date: date
dtm: int
bond_auction_number: int
holding_number: int
face_value: int
price_per_100: float
coupon_rate: Optional[float]
isin:str
class BondResponse(BondCreate):
id: int
class Config:
orm_mode = True |