22 lines
710 B
Python
22 lines
710 B
Python
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
|