2026-08-17 19:20:53 +03:00

29 lines
1017 B
Python

from rest_framework.routers import DefaultRouter
from .viewsets import (
CostViewSet,
IntegrationConnectionViewSet,
IntegrationSyncRunViewSet,
ProductBindingViewSet,
ProductViewSet,
SaleViewSet,
SaleLineViewSet,
SourceSystemViewSet,
StockSnapshotViewSet,
)
app_name = "commerce"
router = DefaultRouter()
router.register(r"connections", IntegrationConnectionViewSet, basename="connection")
router.register(r"sync-runs", IntegrationSyncRunViewSet, basename="syncrun")
router.register(r"products", ProductViewSet, basename="product")
router.register(r"sources", SourceSystemViewSet, basename="source")
router.register(r"product-bindings", ProductBindingViewSet, basename="productbinding")
router.register(r"sales", SaleViewSet, basename="sale")
router.register(r"sale-lines", SaleLineViewSet, basename="saleline")
router.register(r"costs", CostViewSet, basename="cost")
router.register(r"stock-snapshots", StockSnapshotViewSet, basename="stocksnapshot")
urlpatterns = router.urls