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
|
@ -31,4 +31,12 @@ class Room(db.Model):
|
|||
name = self.name or ""
|
||||
func = self.room_function.description if self.room_function else ""
|
||||
return f"{name} - {func}".strip(" -")
|
||||
|
||||
def serialize(self):
|
||||
return {
|
||||
'id': self.id,
|
||||
'name': self.name,
|
||||
'area_id': self.area_id,
|
||||
'function_id': self.function_id
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue