from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import (
    RequisitionViewSet, RequisitionQuoteViewSet, ApprovalViewSet, RFQRFPViewSet, PurchaseOrderViewSet,
    ProcurementContractViewSet, GoodsReceiptViewSet, InvoiceViewSet, PaymentViewSet,
    ProcurementReportViewSet
)

router = DefaultRouter()
router.register(r"requisitions", RequisitionViewSet, basename="requisition")
router.register(r"requisition-quotes", RequisitionQuoteViewSet, basename="requisition-quote")
router.register(r"procurement-approvals", ApprovalViewSet, basename="procurement-approval")
router.register(r"procurement-reports", ProcurementReportViewSet, basename="procurement-report")
router.register(r"rfq-rfps", RFQRFPViewSet, basename="rfq-rfp")
router.register(r"purchase-orders", PurchaseOrderViewSet, basename="purchase-order")
router.register(r"procurement-contracts", ProcurementContractViewSet, basename="procurement-contract")
router.register(r"goods-receipts", GoodsReceiptViewSet, basename="goods-receipt")
router.register(r"invoices", InvoiceViewSet, basename="invoice")
router.register(r"payments", PaymentViewSet, basename="payment")

urlpatterns = [
    path("", include(router.urls)),
]