PyMenuSite/group.py
2023-02-12 21:55:04 +01:00

24 lines
761 B
Python

class Group():
def __init__(self, id: str, members: list, lists: list) -> Group:
"""
this class aims to store group with an id, a list of members, a lists of greceries lists
:param id: the uuid of the groups
:type id: int
:param members: the lists of members (User)
:type members: list[User]
:param lists: the lists of groceries lists
:type lists: list[GroceriesList]
:return: the group
:rtype: Group
"""
self.id = id;
self.members = members
self.lists: lists
return (self)
def __str__(self):
return (f"Group(id={self.id},members={self.members},lists={self.lists})")
def __repr__(self):
return (self.__str__())