From e4e0729bd8da5944e54df809038c6a7f2e1a62d1 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Sun, 22 Sep 2024 14:15:49 +0700 Subject: [PATCH] Create models.py --- .../banks/banking_app/app/banking/models.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bank_integration/banks/banking_app/app/banking/models.py diff --git a/bank_integration/banks/banking_app/app/banking/models.py b/bank_integration/banks/banking_app/app/banking/models.py new file mode 100644 index 000000000..59247b872 --- /dev/null +++ b/bank_integration/banks/banking_app/app/banking/models.py @@ -0,0 +1,11 @@ +from flask_sqlalchemy import SQLAlchemy + +db = SQLAlchemy() + +class Account(db.Model): + id = db.Column(db.Integer, primary_key=True) + account_number = db.Column(db.String(64), unique=True, nullable=False) + balance = db.Column(db.Float, default=0.0) + + def __repr__(self): + return f"Account(account_number={self.account_number}, balance={self.balance})"