city_retrofit/persistence/repositories/BuildingRepo.py

26 lines
620 B
Python
Raw Normal View History

"""
Building repository with database CRUD operations
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Peter Yefi peteryefi@gmail.com
"""
import json
from city_model_structure.building import Building
from persistence.models import City
from persistence import BaseRepo
class BuildingRepo(BaseRepo):
def __init__(self):
super().__init__()
def insert_building(self, building: [Building], city: City):
pass
@staticmethod
def _extract_building_data(building: Building):
json_building = json.dumps(building.__dict__)
print(json_building)