Skip to content

Instantly share code, notes, and snippets.

@kevinjqiu
Created February 19, 2014 19:07
Show Gist options
  • Save kevinjqiu/9099251 to your computer and use it in GitHub Desktop.
Save kevinjqiu/9099251 to your computer and use it in GitHub Desktop.
class Transaction(AppendOnlyModel):
__tablename__ = 'transaction'
__history_class__ = make_history_class(
'transaction',
status=HistoryStateColumn(
sa.Enum(*constants.TRANSACTION_STATUSES),
nullable=False)
)
source_id = ...
destination_id = ...
amount = ...
currency = ...
status = append_only_attr('status', default_value='opened')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment