[feat]: add models bind to eco database
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from sqlalchemy import Column, String, Date, Boolean, Integer
|
||||
from app.extensions import db
|
||||
|
||||
class Account(db.Model):
|
||||
__tablename__ = 'accounts'
|
||||
__bind_key__ = 'eco'
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
affiliate_code = Column(String(3), nullable=False)
|
||||
customer_id = Column(String(9), nullable=False)
|
||||
account_id = Column(String(10), unique=True, nullable=False)
|
||||
registration_date = Column(Date, nullable=False)
|
||||
account_currency_code = Column(String(3), nullable=False)
|
||||
plastic_card_attached = Column(Boolean, default=False)
|
||||
|
||||
def __repr__(self):
|
||||
return f"<Account(id={self.id}, account_id={self.account_id}, customer_id={self.customer_id})>"
|
||||
Reference in New Issue
Block a user