"""
Group view
"""

from rest_framework import viewsets

from core.apps.eggs import models
from core.apps.eggs import serializers
from core.http.permissions import IsRole


class GroupViewSet(viewsets.ModelViewSet):
    queryset = models.Group.objects.all()
    serializer_class = serializers.GroupSerializer
    http_method_names = ["get", "post", "put", "patch", "delete"]
    permission_classes = [IsRole(["admin", "sklad", "courier", "market"])]
