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)