38 lines
708 B
Python
38 lines
708 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
class CountrySchema(BaseModel):
|
|
country_id: int
|
|
country_name: str
|
|
country_code: str
|
|
currency: str
|
|
currency_symbol: str
|
|
phone_code: str
|
|
timezone: str
|
|
iso2: str
|
|
iso3: str
|
|
continent: str
|
|
is_active: bool
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
class StateSchema(BaseModel):
|
|
state_id: int
|
|
country_id: int
|
|
state_name: str
|
|
state_code: str
|
|
is_active: bool
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
class CitySchema(BaseModel):
|
|
city_id: int
|
|
state_id: int
|
|
city_name: str
|
|
postal_code: str
|
|
is_active: bool
|
|
|
|
class Config:
|
|
from_attributes = True
|