Add model for UserGroup
				
					
				
			This commit is contained in:
		
							parent
							
								
									a6306a4882
								
							
						
					
					
						commit
						b46282264c
					
				
					 1 changed files with 18 additions and 0 deletions
				
			
		| 
						 | 
					@ -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.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue