Add model for UserGroup

This commit is contained in:
Lance Edgar 2022-01-17 18:59:19 -06:00
parent a6306a4882
commit b46282264c

View file

@ -108,6 +108,24 @@ class TableSyncRule(Base):
return "{}: {}".format(self.table_name, self.rule) return "{}: {}".format(self.table_name, self.rule)
class UserGroup(Base):
"""
Represents a user/group assignment.
"""
__tablename__ = 'userGroups'
group_id = sa.Column('gid', sa.Integer(), nullable=False,
primary_key=True, autoincrement=False)
name = sa.Column(sa.String(length=50), nullable=True)
username = sa.Column(sa.String(length=50), nullable=False,
primary_key=True)
def __str__(self):
return self.name or ""
class User(Base): class User(Base):
""" """
Represents a user within CORE Office. Represents a user within CORE Office.