from marshmallow_sqlalchemy.fields import Nested
from utils_flask_sqla.schema import SmartRelationshipsMixin
from utils_flask_sqla_geo.schema import GeoAlchemyAutoSchema
from ref_geo.env import db, ma
from ref_geo.models import BibAreasTypes, LAreas, LiMunicipalities
[docs]
class AreaTypeSchema(SmartRelationshipsMixin, ma.SQLAlchemyAutoSchema):
[docs]
class AreaSchema(SmartRelationshipsMixin, GeoAlchemyAutoSchema):
[docs]
area_type = Nested(AreaTypeSchema)
[docs]
class MunicipalitySchema(SmartRelationshipsMixin, GeoAlchemyAutoSchema):