from rest_framework import serializers

from LiveStock.models import Union, Contractor
from authentication.serializer.serializer import BankCardSerializer, SystemUserProfileForInspectionSerializer
from authentication.serializers import SystemAddressSerializer


class ContractorSerializer(serializers.ModelSerializer):
    user = SystemUserProfileForInspectionSerializer(read_only=True)
    address = SystemAddressSerializer(read_only=True)

    class Meta:
        model = Contractor
        fields = '__all__'
