diff --git a/app/schemas.py b/app/schemas.py new file mode 100644 index 0000000..ab00851 --- /dev/null +++ b/app/schemas.py @@ -0,0 +1,26 @@ +from pydantic import BaseModel +from datetime import date + +class CustomerBase(BaseModel): + full_name: str + email: str + phone: str + home_branch_id: int + customer_since: date + +class Customer(CustomerBase): + customer_id: int + class Config: + orm_mode = True + +class AccountBase(BaseModel): + customer_id: int + account_type: str + open_date: date + balance: float + +class Account(AccountBase): + account_id: int + account_number: str + class Config: + orm_mode = True