from rest_framework import serializers from .models import Product, Employee, Position, StorageLocation, Contractor, SupplyContract, Truck class ProductSerializer(serializers.ModelSerializer): class Meta: model = Product fields = '__all__' ref_name = 'InventoryProductSerializer' # Unique ref_name for inventory class PositionSerializer(serializers.ModelSerializer): class Meta: model = Position fields = '__all__' ref_name = 'InventoryPositionSerializer' # Unique ref_name for inventory class EmployeeSerializer(serializers.ModelSerializer): class Meta: model = Employee fields = '__all__' ref_name = 'InventoryEmployeeSerializer' # Unique ref_name for inventory class StorageLocationSerializer(serializers.ModelSerializer): class Meta: model = StorageLocation fields = '__all__' ref_name = 'InventoryStorageLocationSerializer' # Unique ref_name for inventory class ContractorSerializer(serializers.ModelSerializer): class Meta: model = Contractor fields = '__all__' ref_name = 'InventoryContractorSerializer' # Unique ref_name for inventory class SupplyContractSerializer(serializers.ModelSerializer): class Meta: model = SupplyContract fields = '__all__' ref_name = 'InventorySupplyContractSerializer' # Unique ref_name for inventory class TruckSerializer(serializers.ModelSerializer): class Meta: model = Truck fields = '__all__' ref_name = 'InventoryTruckSerializer' # Unique ref_name for inventory