Add status code for equity payments
may be useful if equity payments come from multiple places and must track whether each is "reconciled" across systems
This commit is contained in:
parent
d50d8266d6
commit
b6110f1ba5
|
@ -0,0 +1,33 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
"""add equity_payment.status_code
|
||||
|
||||
Revision ID: 17cd825534de
|
||||
Revises: 41a05b420280
|
||||
Create Date: 2023-11-05 16:33:27.646431
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '17cd825534de'
|
||||
down_revision = '41a05b420280'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import rattail.db.types
|
||||
|
||||
|
||||
|
||||
def upgrade():
|
||||
|
||||
# member_equity_payment
|
||||
op.add_column('member_equity_payment', sa.Column('status_code', sa.Integer(), nullable=True))
|
||||
op.add_column('member_equity_payment_version', sa.Column('status_code', sa.Integer(), autoincrement=False, nullable=True))
|
||||
|
||||
|
||||
def downgrade():
|
||||
|
||||
# member_equity_payment
|
||||
op.drop_column('member_equity_payment_version', 'status_code')
|
||||
op.drop_column('member_equity_payment', 'status_code')
|
|
@ -24,6 +24,8 @@
|
|||
Data Models for Members
|
||||
"""
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import orm
|
||||
from sqlalchemy.ext.orderinglist import ordering_list
|
||||
|
@ -272,6 +274,18 @@ class MemberEquityPayment(Base):
|
|||
__versioned__ = {}
|
||||
model_title = "Equity Payment"
|
||||
|
||||
STATUS_NORMAL = 1
|
||||
STATUS_UNRECONCILED = 2
|
||||
STATUS_RECONCILED = 3
|
||||
STATUS_IGNORED = 4
|
||||
|
||||
STATUS = OrderedDict([
|
||||
(STATUS_NORMAL, "normal"),
|
||||
(STATUS_UNRECONCILED, "unreconciled"),
|
||||
(STATUS_RECONCILED, "reconciled"),
|
||||
(STATUS_IGNORED, "ignored"),
|
||||
])
|
||||
|
||||
uuid = uuid_column()
|
||||
|
||||
member_uuid = sa.Column(sa.String(length=32), nullable=False)
|
||||
|
@ -310,6 +324,10 @@ class MemberEquityPayment(Base):
|
|||
conform to any particular format.
|
||||
""")
|
||||
|
||||
status_code = sa.Column(sa.Integer(), nullable=True, doc="""
|
||||
Numeric code indicating the status of the payment, if applicable.
|
||||
""")
|
||||
|
||||
# trainwreck_txn_uuid = sa.Column(sa.String(length=32), nullable=True, doc="""
|
||||
# UUID of Trainwreck transaction, if known.
|
||||
|
||||
|
|
Loading…
Reference in a new issue