<reponame>Um9i/ERPv
from .models import BillOfMaterials, BOMItem
from .serializers import BillOfMaterialsSerializer, BOMItemSerializer
from rest_framework import viewsets, permissions


class BillOfMaterialsViewSet(viewsets.ModelViewSet):
    queryset = BillOfMaterials.objects.all()
    serializer_class = BillOfMaterialsSerializer
    permission_classes = [permissions.IsAuthenticated]


class BOMItemViewSet(viewsets.ModelViewSet):
    queryset = BOMItem.objects.all()
    serializer_class = BOMItemSerializer
    permission_classes = [permissions.IsAuthenticated]

from .models import BillOfMaterials, BOMItem
from .serializers import BillOfMaterialsSerializer, BOMItemSerializer
from rest_framework import viewsets, permissions


class BillOfMaterialsViewSet(viewsets.ModelViewSet):
    queryset = BillOfMaterials.objects.all()
    serializer_class = BillOfMaterialsSerializer
    permission_classes = [permissions.IsAuthenticated]


class BOMItemViewSet(viewsets.ModelViewSet):
    queryset = BOMItem.objects.all()
    serializer_class = BOMItemSerializer
    permission_classes = [permissions.IsAuthenticated]