Skip to content

Commit

Permalink
Create models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Sep 22, 2024
1 parent c6dbf1d commit e4e0729
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bank_integration/banks/banking_app/app/banking/models.py
Original file line number Diff line number Diff line change
@@ -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})"

0 comments on commit e4e0729

Please sign in to comment.