aboutsummaryrefslogtreecommitdiff
path: root/app/models.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-06 15:44:45 +0530
committerGitHub <noreply@github.com>2021-06-06 15:44:45 +0530
commit62a5ca363415b0f6f98785b6c3522a71fc895a72 (patch)
tree6fb829110658369321bab897707132f76f9b1b2c /app/models.py
parent57207efe38174666d40964b74856537c6f5314ab (diff)
parent6595d53212eaa4b9319da7196f5e2286d30eb462 (diff)
Merge pull request #1 from navanchauhan/deepsource-transform-10f49d7d
Format code with black
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