now rooms, recorders and recorder models get initialized in DB

This commit is contained in:
Tobias Kurze
2019-11-20 16:19:59 +01:00
parent 60ff5bdeaf
commit 7700b4381f
6 changed files with 191 additions and 70 deletions

View File

@@ -44,6 +44,15 @@ class Room(db.Model):
"""
return Room.query.filter(Room.name == name).first()
@staticmethod
def get_by_building_number(building_number):
"""
Find group by name
:param name:
:return:
"""
return Room.query.filter(Room.building_number == building_number)
@staticmethod
def get_all():
"""