From b46282264c808792a2492807c8305e2943b9b566 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 17 Jan 2022 18:59:19 -0600 Subject: [PATCH] Add model for `UserGroup` --- corepos/db/office_op/model.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/corepos/db/office_op/model.py b/corepos/db/office_op/model.py index ce43a59..c913ae0 100644 --- a/corepos/db/office_op/model.py +++ b/corepos/db/office_op/model.py @@ -108,6 +108,24 @@ class TableSyncRule(Base): 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): """ Represents a user within CORE Office.