from django.contrib import admin
from django.urls import path, re_path
from controller import User, LangSet, LangWord, LangArea, WebHook, AsImg, SysSet, Lottery, SkuSuitName, \
    SkuConditionName, SkuRuleName, EmailSend, LangAVSSController, LangProjectController, SearchToolController, \
    ComprehendController, EmaillangController, EmailUserController, EmailProjectController, EmailSortController

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()),
    path('user/init', User.initView.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()),

    re_path('cku_suit/(?P<operation>.*)', SkuSuitName.skuSuitView.as_view()),
    re_path('sku_condition/(?P<operation>.*)', SkuConditionName.skuConditionView.as_view()),
    re_path('cku_rule/(?P<operation>.*)', SkuRuleName.skuRuleView.as_view()),
    re_path('email_send/(?P<operation>.*)', EmailSend.EmailSendView.as_view()),
    re_path('avss/(?P<operation>.*)', LangAVSSController.LangAVSSView.as_view()),
    re_path('langProject/(?P<operation>.*)', LangProjectController.LangProjectView.as_view()),
    re_path('searchtool/(?P<operation>.*)', SearchToolController.SearchToolView.as_view()),
    # re_path('comprehend/(?P<operation>.*)', ComprehendController.ComprehendView.as_view()),

    re_path('Emaillang/(?P<operation>.*)', EmaillangController.EmaillangView.as_view()),
    re_path('EmailUser/(?P<operation>.*)', EmailUserController.EmailUserView.as_view()),
    re_path('EmailProject/(?P<operation>.*)', EmailProjectController.EmailProjectView.as_view()),
    re_path('EmailSort/(?P<operation>.*)', EmailSortController.EmailSorView.as_view())

]
