Add CustomerAccount.customer_type reference, to MemberType

not 100% sure about the best naming here, hopefully this is good
This commit is contained in:
Lance Edgar 2020-07-13 11:03:32 -05:00
parent 07291b3fa7
commit 68ab8ff55d

View file

@ -801,6 +801,13 @@ class CustomerAccount(Base):
customer_type_id = sa.Column('customerTypeID', sa.Integer(), nullable=True, customer_type_id = sa.Column('customerTypeID', sa.Integer(), nullable=True,
default=1) default=1)
customer_type = orm.relationship(
MemberType,
primaryjoin=MemberType.id == customer_type_id,
foreign_keys=[customer_type_id],
doc="""
Reference to the :class:`MemberType` with which this account is associated.
""")
charge_balance = sa.Column('chargeBalance', sa.Numeric(precision=10, scale=2), nullable=True, charge_balance = sa.Column('chargeBalance', sa.Numeric(precision=10, scale=2), nullable=True,
default=0) default=0)