Made saved users be in the DB

This commit is contained in:
2021-06-26 16:48:05 +10:00
parent 848c2b61cd
commit 798d548ee9

21
user.py Normal file
View 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