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