from django.contrib import admin
from django.urls import path, re_path
from controller import User, LangSet, LangWord, LangArea, WebHook, AsImg, SysSet, Lottery

urlpatterns = [
    path('admin/', admin.site.urls),
    path('user/register', User.registerView.as_view()),
    path('user/login', User.loginView.as_view()),
    path('user/query', User.queryView.as_view()),
    path('user/delete', User.deleteView.as_view()),
    path('user/update', User.updateView.as_view()),
    re_path('langSet/(?P<operation>.*)', LangSet.LangSetView.as_view()),
    re_path('langWord/(?P<operation>.*)', LangWord.LangWordView.as_view()),
    re_path('langArea/(?P<operation>.*)', LangArea.LangAreaView.as_view()),
    path('exportLang', LangArea.exportLangView.as_view()),
    # 47 hook
    path('hookWeb', WebHook.HookWebView.as_view()),

    path('asimg/add', AsImg.addView.as_view()),
    path('asimg/query', AsImg.queryView.as_view()),
    path('asimg/update', AsImg.updateView.as_view()),
    path('asimg/delete', AsImg.deleteView.as_view()),

    path('sysSet/query', SysSet.queryView.as_view()),
    path('sysSet/update', SysSet.updateView.as_view()),

    path('asimg/cycleImgView', AsImg.cycleImgView.as_view()),

    # 抽奖模块

    path('lottery/authcode', Lottery.AuthCodeView.as_view()),
    path('lottery/login', Lottery.loginView.as_view()),
    path('lottery/draw', Lottery.drawView.as_view()),
    path('lottery/setAddr', Lottery.setAddrView.as_view()),
    path('lottery/index', Lottery.indexView.as_view()),
]
