Refactor code structure; improve organization and readability across multiple files

This commit is contained in:
Yaro Kasear 2025-06-23 14:51:21 -05:00
parent 774c28e761
commit acacf39f8e
14 changed files with 380 additions and 217 deletions

View file

@ -17,4 +17,11 @@ class Item(db.Model):
inventory: Mapped[List['Inventory']] = relationship('Inventory', back_populates='item')
def __repr__(self):
return f"<Item(id={self.id}, description={repr(self.description)}, category={repr(self.category)})>"
return f"<Item(id={self.id}, description={repr(self.description)}, category={repr(self.category)})>"
def serialize(self):
return {
'id': self.id,
'name': self.description,
'category': self.category
}