diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2023-11-15 20:34:41 -0700 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2023-11-15 20:34:41 -0700 |
commit | 3743f7056dcdbe1a16a00418ea10ebef2669cf61 (patch) | |
tree | 298657931ead09efbcf53ccb08bfc3ee501623c1 /app/models | |
parent | 81834656747ead193334a36d8f49045cc214b53e (diff) |
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.py | 13 |
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}>' |