import json

from django.http import JsonResponse

from backend.Form.AuthMenuForm import AuthMenuForm
from DCbackend.utils.common import success, fail, pageData
from backend.models import AuthMenu, Admin, AuthUserMenu, TemplateCateGoryUser


class TemplateCategoryUserService:

    @staticmethod
    def search(request):
        id = request.POST.get('id')
        TemplateCateGoryUser.objects.filter(id=id).first()

        return success(TemplateCateGoryUser.objects.filter(id=id).first())

    @staticmethod
    def roleAll(request):


        return success()