from rest_framework import viewsets
from core.apps.eggs.models.all_history import AllHistory
from core.apps.eggs.serializers.all_history import AllHistorySerializer
from core.http.permissions import IsRole


class AllHistoryViewSet(viewsets.ModelViewSet):
    queryset = AllHistory.objects.all()
    serializer_class = AllHistorySerializer
    permission_classes = [IsRole(["admin"])]
    http_method_names = ["get"]
