-
-
Save kaniak274/f11146ed7731933c96593c400fa5ec69 to your computer and use it in GitHub Desktop.
base_model.py (Medium article about enum)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Status(Enum): | |
STARTED = 'STARTED' | |
ACCEPTED = 'ACCEPTED' | |
class Transaction(Base): | |
__tablename__ = 'transactions' | |
id = Column(Integer, primary_key=True) | |
status = Column(Enum(Status)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment