from rest_framework import viewsets
from rest_framework.response import Response

from core.apps.eggs.models import DailyCost
from core.apps.eggs.serializers import DailyCostSerializer


class DailyCostViewSet(viewsets.ModelViewSet):
    queryset = DailyCost.objects.all()
    serializer_class = DailyCostSerializer

    def get_queryset(self):
        return DailyCost.objects.all().order_by("-id")[:1]