# Path: core/classes/model/base.py



from sqlalchemy                 import Column
from sqlalchemy                 import Integer
from sqlalchemy                 import String
from sqlalchemy                 import Float
from core.classes.model.base    import MapifBase
from core.classes.model.session import session
from core.modules               import logger
    osm_id = Column(String, unique=True, nullable=False)
    city = Column(String)
    country = Column(String)
    lat = Column(Float)
    lon = Column(Float)
    #---------------------------------------------------------------------------
    # as_dict
    #---------------------------------------------------------------------------
    def as_dict(self):
        return {
            'osm_id': self.osm_id,
            'city': self.city,
            'country': self.country,
            'lat': self.lat,
            'lon': self.lon
        }
    #---------------------------------------------------------------------------
    # __repr__
    #---------------------------------------------------------------------------
    def __repr__(self):
        return """<Location(id='{0}',
    osm_id='{1}',
    city='{2}',
    country='{3}',
    lat='{4}', lon='{5}'
)>""".format(self.id, self.osm_id, self.city, self.country, self.lat, self.lon)
#-------------------------------------------------------------------------------
# LocationCRUD
#-------------------------------------------------------------------------------
class LocationCRUD:

# Path: core/classes/model/base.py



# Path: core/classes/model/location.py
from sqlalchemy                 import Column
from sqlalchemy                 import Integer
from sqlalchemy                 import String
from sqlalchemy                 import Float
from core.classes.model.base    import MapifBase
from core.classes.model.session import session
from core.modules               import logger

    osm_id = Column(String, unique=True, nullable=False)
    city = Column(String)
    country = Column(String)
    lat = Column(Float)
    lon = Column(Float)
    #---------------------------------------------------------------------------
    # as_dict
    #---------------------------------------------------------------------------
    def as_dict(self):
        return {
            'osm_id': self.osm_id,
            'city': self.city,
            'country': self.country,
            'lat': self.lat,
            'lon': self.lon
        }
    #---------------------------------------------------------------------------
    # __repr__
    #---------------------------------------------------------------------------
    def __repr__(self):
        return """<Location(id='{0}',
    osm_id='{1}',
    city='{2}',
    country='{3}',
    lat='{4}', lon='{5}'
)>""".format(self.id, self.osm_id, self.city, self.country, self.lat, self.lon)
#-------------------------------------------------------------------------------
# LocationCRUD
#-------------------------------------------------------------------------------
class LocationCRUD:

    ATTRIBUTES = [