"""
Routes for managing Sectors (GSectores) — a76 tenant-scoped catalog.
"""

from api.v1.common.tenant_crud_routes import TenantCRUDRoutes

from .dto import SectorCreateDTO, SectorResponseDTO, SectorUpdateDTO
from .service import SectorService

router = TenantCRUDRoutes(
    service=SectorService,
    create_schema=SectorCreateDTO,
    update_schema=SectorUpdateDTO,
    response_schema=SectorResponseDTO,
    prefix="/sectors",
    tags=["a76 / sectors"],
    resource_name="Sector",
    id_name="sector_id",
    enable_list=True,
    enable_filters=True,
    default_page_size=50,
    max_page_size=100,
    list_permissions=["ref_sectors.view"],
    get_permissions=["ref_sectors.view"],
    create_permissions=["cat_sectors.create"],
    update_permissions=["cat_sectors.edit"],
    delete_permissions=["cat_sectors.delete"],
).router
