distribusi-verse/verse/usermodel.py

18 lines
564 B
Python
Raw Normal View History

2022-01-05 13:42:24 +01:00
from app import db
from flask_login import UserMixin
class User(UserMixin, db.Model):
"""User model class for a user in distribusi-verse"""
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True)
distribusiname = db.Column(db.String(300), unique=True, nullable=True)
2022-01-05 13:42:24 +01:00
email = db.Column(db.String(150), unique=True, nullable=False)
password = db.Column(db.String(300), nullable=False, unique=False)
visible = db.Column(db.Boolean, server_default=u'false')
2022-01-05 13:42:24 +01:00
def __repr__(self):
return "<User %r>" % self.email