def get(self, id): res = Area.query.get(id) if res: return row2dict(res) else: return None
def get_nearby(self, area_id): res = NearbyArea.query.filter( NearbyArea.area_id == area_id).one_or_none() return row2dict(res)
def get_obj(self, level): res = Area_rate.query.filter( Area_rate.rate_level == level).one_or_none() return row2dict(res)
def get(self, id): res = NearbyArea.query.filter(NearbyArea.id == id).one_or_none() return row2dict(res)
def get(self, id): res = Area_rate.query.filter(Area_rate.id == id).one_or_none() return row2dict(res)