"""
Courier 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 CourierViewSet(viewsets.ModelViewSet):
    queryset = models.Courier.objects.all()
    serializer_class = serializers.CourierSerializer
    http_method_names = ["get", "post", "put", "patch", "delete"]
    permission_classes = [IsRole(["courier", "admin"])]
