Made saved users be in the DB
This commit is contained in:
21
user.py
Normal file
21
user.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
from main import db
|
||||||
|
from sqlalchemy import Sequence
|
||||||
|
from flask_login import UserMixin
|
||||||
|
from sqlalchemy.exc import SQLAlchemyError
|
||||||
|
from status import st, Status
|
||||||
|
|
||||||
|
# pylint: disable=no-member
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Class describing Person in the database, and via sqlalchemy, connected to the DB as well
|
||||||
|
################################################################################
|
||||||
|
class PAUser(UserMixin,db.Model):
|
||||||
|
__tablename__ = "pa_user"
|
||||||
|
id = db.Column(db.Integer, db.Sequence('pa_user_id_seq'), primary_key=True)
|
||||||
|
dn = db.Column(db.String)
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return self.dn
|
||||||
|
|
||||||
|
def get_id(self):
|
||||||
|
return self.dn
|
||||||
Reference in New Issue
Block a user