Add User
model for office_op
This commit is contained in:
parent
69c7be6356
commit
0d81a41b54
|
@ -108,6 +108,32 @@ class TableSyncRule(Base):
|
||||||
return "{}: {}".format(self.table_name, self.rule)
|
return "{}: {}".format(self.table_name, self.rule)
|
||||||
|
|
||||||
|
|
||||||
|
class User(Base):
|
||||||
|
"""
|
||||||
|
Represents a user within CORE Office.
|
||||||
|
"""
|
||||||
|
__tablename__ = 'Users'
|
||||||
|
|
||||||
|
name = sa.Column(sa.String(length=50), nullable=False, primary_key=True)
|
||||||
|
|
||||||
|
password = sa.Column(sa.String(length=255), nullable=True)
|
||||||
|
|
||||||
|
salt = sa.Column(sa.String(length=10), nullable=True)
|
||||||
|
|
||||||
|
uid = sa.Column(sa.String(length=4), nullable=True)
|
||||||
|
|
||||||
|
session_id = sa.Column(sa.String(length=50), nullable=True)
|
||||||
|
|
||||||
|
real_name = sa.Column(sa.String(length=75), nullable=True)
|
||||||
|
|
||||||
|
email = sa.Column(sa.String(length=75), nullable=True)
|
||||||
|
|
||||||
|
totp_url = sa.Column('totpURL', sa.String(length=255), nullable=True)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.name or ""
|
||||||
|
|
||||||
|
|
||||||
class Store(Base):
|
class Store(Base):
|
||||||
"""
|
"""
|
||||||
Represents a known store.
|
Represents a known store.
|
||||||
|
|
Loading…
Reference in a new issue