From dc38f256aad31e24b796e4258de65664821f779d Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 10 Dec 2025 02:41:37 +0000 Subject: [PATCH] Add app/models.py --- app/models.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 app/models.py diff --git a/app/models.py b/app/models.py new file mode 100644 index 0000000..b046ff0 --- /dev/null +++ b/app/models.py @@ -0,0 +1,20 @@ +from sqlalchemy import Column, Integer, String, Float, Date +from app.database import Base + +class Customer(Base): + __tablename__ = "customers" + customer_id = Column(Integer, primary_key=True, index=True) + full_name = Column(String, index=True) + email = Column(String, unique=True) + phone = Column(String) + home_branch_id = Column(Integer) + customer_since = Column(Date) + +class Account(Base): + __tablename__ = "accounts" + account_id = Column(Integer, primary_key=True, index=True) + account_number = Column(String, unique=True, index=True) + customer_id = Column(Integer) + account_type = Column(String) + open_date = Column(Date) + balance = Column(Float)