# -*- coding: utf-8 -*-
from django.urls import path
from . import views

app_name = 'discounts'

urlpatterns = [
    # Скидки
    path('', views.DiscountListView.as_view(), name='list'),
    path('create/', views.DiscountCreateView.as_view(), name='create'),
    path('<int:pk>/edit/', views.DiscountUpdateView.as_view(), name='update'),
    path('<int:pk>/toggle/', views.discount_toggle, name='toggle'),
    path('<int:pk>/delete/', views.DiscountDeleteView.as_view(), name='delete'),

    # Промокоды
    path('promo-codes/', views.PromoCodeListView.as_view(), name='promo-list'),
    path('promo-codes/create/', views.PromoCodeCreateView.as_view(), name='promo-create'),
    path('promo-codes/<int:pk>/edit/', views.PromoCodeUpdateView.as_view(), name='promo-update'),
    path('promo-codes/<int:pk>/toggle/', views.promocode_toggle, name='promo-toggle'),
    path('promo-codes/<int:pk>/delete/', views.PromoCodeDeleteView.as_view(), name='promo-delete'),
]
