Refactor code structure; improve organization and readability across multiple files
This commit is contained in:
parent
774c28e761
commit
acacf39f8e
14 changed files with 380 additions and 217 deletions
|
@ -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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue