from __future__ import absolute_import, print_function
from ..database import db


class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(80), unique=True, nullable=False)
    email = db.Column(db.String(120), unique=True, nullable=False)

    def __repr__(self):
        return '<User %r>' % self.username

# TODO: consider using peewee instead?
# http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#sqlcipher-backend
# http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#flask-utils
