Skip to content

Instantly share code, notes, and snippets.

@okomarov
Last active November 13, 2019 12:30
Show Gist options
  • Save okomarov/c6bc358e36a5d5b81cdbe2c3bfde5205 to your computer and use it in GitHub Desktop.
Save okomarov/c6bc358e36a5d5b81cdbe2c3bfde5205 to your computer and use it in GitHub Desktop.
Viral queue user model
class User(BaseModel, db.Model):
__tablename__ = 'user'
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String(120), unique=True, nullable=False)
email_confirmed = db.Column(db.Boolean, default=False)
email_confirmed_on = db.Column(db.DateTime(timezone=True))
waitlist = db.relationship('Waitlist', uselist=False, back_populates='user')
def __init__(self, email):
self.email = email
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment