class PublicationListSerializer(serializers.ModelSerializer): created_by = AuxUserSerializer() vacancy = VacancyListSerializer() class Meta: model = Publication exclude = []
class InterviewerDetailSerializer(serializers.ModelSerializer): user = AuxUserSerializer() evaluations = EvaluationSerializer(many=True) class Meta: model = Interviewer fields = ['id', 'user', 'comment', 'evaluations']
class RequestDetailSerializer(serializers.ModelSerializer): created_by = AuxUserSerializer(read_only=True) position = AuxPositionSerializer(read_only=True) requirements = RequirementSerializer(many=True, read_only=True) class Meta: model = Request fields = ('id', 'created_by', 'position', 'requirements', 'created', 'status', 'count', 'modified')
class AuxInterviewSerializer(serializers.ModelSerializer): """Serializer for Detailed Candidate Endpoint""" interviewers = AuxUserSerializer(many=True) class Meta: depth = 3 model = Interview fields = ('id', 'status', 'date', 'interviewers')
class VacancyDetailSerializer(serializers.ModelSerializer): created_by = AuxUserSerializer(read_only=True) requirements = RequirementSerializer(many=True, read_only=True) request = VacancyRequestSerializer() class Meta: model = Vacancy exclude = []
class VacancyDetailSerializer(serializers.ModelSerializer): created_by = AuxUserSerializer(read_only=True) requirements = RequirementSerializer(many=True, source='request.requirements', read_only=True) request = VacancyRequestSerializer(read_only=True) name = serializers.CharField(source='request.position.name', read_only=True) class Meta: model = Vacancy exclude = ['uuid']
class InterviewListSerializer(serializers.ModelSerializer): """Serializer for Interviews List Endpoint""" candidate = 'apps.candidates.AuxCandidateSerializer()' interviewers = AuxUserSerializer(many=True) class Meta: model = Interview depth = 3 fields = ('id', 'date', 'status', 'candidate', 'request', 'interviewers')
class CommentSerializer(serializers.ModelSerializer): created_by = AuxUserSerializer() class Meta: model = Comment fields = ('id', 'text', 'created_by', 'created')
class InterviewerSerializer(serializers.ModelSerializer): user = AuxUserSerializer() class Meta: model = Interviewer fields = ('id', 'user')