from fastapi import APIRouter
from api.v1.common.tenant_crud_routes import TenantCRUDRoutes
from .models import MultiCurrencyType
from .dto import MultiCurrencyTypeCreate, MultiCurrencyTypeResponse, MultiCurrencyTypeUpdate
from .service import MultiCurrencyTypeService

router = APIRouter(prefix="/multi-currency-types",
                   tags=["a76.general_catalogs.multi_currency_types"])

multi_currency_type_crud = TenantCRUDRoutes(
    service=MultiCurrencyTypeService,
    create_schema=MultiCurrencyTypeCreate,
    update_schema=MultiCurrencyTypeUpdate,
    response_schema=MultiCurrencyTypeResponse,
    prefix="",
    tags=["Multi Currency Types"],
    resource_name="MultiCurrencyType",
    enable_list=True,
    list_permissions=["cat_multi_currency_types.view"],
    get_permissions=["cat_multi_currency_types.view"],
    create_permissions=["cat_multi_currency_types.create"],
    update_permissions=["cat_multi_currency_types.edit"],
    delete_permissions=["cat_multi_currency_types.delete"],
)

router.include_router(multi_currency_type_crud.router)
