summaryrefslogtreecommitdiff
path: root/app/models/user.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.py')
-rw-r--r--app/models/user.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/models/user.py b/app/models/user.py
new file mode 100644
index 0000000..1156515
--- /dev/null
+++ b/app/models/user.py
@@ -0,0 +1,13 @@
+from flask_login import UserMixin
+from app.extensions import db
+
+class User(UserMixin, db.Model):
+ id = db.Column(db.Integer(), primary_key=True)
+ name = db.Column(db.String(), nullable=False)
+ email = db.Column(db.String(), nullable=False)
+ password = db.Column(db.String(), nullable=False)
+ admin = db.Column(db.Boolean(), nullable=False, default=False)
+ email_confirmed = db.Column(db.Boolean(), nullable=False, default=False)
+
+ def __repr__(self):
+ return f'<User {self.name}>'