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

@ -16,4 +16,10 @@ class Brand(db.Model):
inventory: Mapped[List['Inventory']] = relationship('Inventory', back_populates='brand')
def __repr__(self):
return f"<Brand(id={self.id}, name={repr(self.name)})>"
return f"<Brand(id={self.id}, name={repr(self.name)})>"
def serialize(self):
return {
'id': self.id,
'name': self.name
}