aboutsummaryrefslogtreecommitdiff
path: root/app/models.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-06 15:49:56 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-06 15:49:56 +0530
commit812220acbfd41aea0382fcd9a37a989a4b091d66 (patch)
tree0f4277216efe81e6b8d21d9dfc39a3d343fac48e /app/models.py
parentad92a42e8439337cfde346fa84e75a5f91164eac (diff)
parent62a5ca363415b0f6f98785b6c3522a71fc895a72 (diff)
fixing pull
Diffstat (limited to 'app/models.py')
-rw-r--r--app/models.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/models.py b/app/models.py
index 644c96d..47f7c96 100644
--- a/app/models.py
+++ b/app/models.py
@@ -3,8 +3,9 @@ from flask_login import UserMixin
from app import bcrypt, db
+
class User(db.Model, UserMixin):
- __tablename__ = 'users'
+ __tablename__ = "users"
first_name = db.Column(db.String)
last_name = db.Column(db.String)
@@ -13,12 +14,12 @@ class User(db.Model, UserMixin):
paid = db.Column(db.Boolean)
role = db.Column(db.String)
team = db.Column(db.String)
- login_type = db.Column(db.String ,default="Normie")
+ login_type = db.Column(db.String, default="Normie")
_password = db.Column(db.String)
@property
def full_name(self):
- return '{} {}'.format(self.first_name, self.last_name)
+ return "{} {}".format(self.first_name, self.last_name)
@hybrid_property
def password(self):
@@ -35,10 +36,10 @@ class User(db.Model, UserMixin):
return self.email
def get_role(self):
- return self.role
+ return self.role
def get_team(self):
- return self.team
+ return self.team
def is_paid(self):
- return self.paid \ No newline at end of file
+ return self.paid