from rest_framework import viewsets
from core.apps.eggs.models import Debt
from core.apps.eggs.serializers import DebtSerializer
from core.http.permissions import IsRole


class DebtViewSet(viewsets.ModelViewSet):
    queryset = Debt.objects.all()
    serializer_class = DebtSerializer
    permission_classes = [IsRole(["admin", "courier"])]
    http_method_names = ["post", "get"]
