from api.v1.common.tenant_crud_routes import TenantCRUDRoutes
from .dto import UnitConversionCreate, UnitConversionResponse, UnitConversionUpdate
from .service import UnitConversionService

router = TenantCRUDRoutes(
    service=UnitConversionService,
    create_schema=UnitConversionCreate,
    update_schema=UnitConversionUpdate,
    response_schema=UnitConversionResponse,
    prefix="/unit-conversions",
    tags=["a76.general_catalogs.unit_conversions"],
    resource_name="UnitConversion",
    id_name="id",
    enable_list=True,
    enable_filters=True,
    list_permissions=["cat_unit_conversions.view"],
    get_permissions=["cat_unit_conversions.view"],
    create_permissions=["cat_unit_conversions.create"],
    update_permissions=["cat_unit_conversions.edit"],
    delete_permissions=["cat_unit_conversions.delete"],
).router
