forked from iceman2077/ttlock_admin_panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
27 lines (20 loc) · 676 Bytes
/
Copy pathmodels.py
File metadata and controls
27 lines (20 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from . import db
class User(db.Model):
id = db.Column(db.Integer, primary_key=True) # primary keys are required by SQLAlchemy
username = db.Column(db.String(100), unique=True)
access_token = db.Column(db.String(100))
password = db.Column(db.String(100))
uid = db.Column(db.Integer)
openid = db.Column(db.Integer)
refresh_token = db.Column(db.String(100))
scope = db.Column(db.String(100))
def is_authenticated(self):
return True
def is_active(self):
return True
def is_anonymous(self):
return False
def get_id(self):
return self.id
def __unicode__(self):
return self.username