示例#1
0
class PublicationListSerializer(serializers.ModelSerializer):
    created_by = AuxUserSerializer()
    vacancy = VacancyListSerializer()

    class Meta:
        model = Publication
        exclude = []
示例#2
0
class InterviewerDetailSerializer(serializers.ModelSerializer):
    user = AuxUserSerializer()
    evaluations = EvaluationSerializer(many=True)

    class Meta:
        model = Interviewer
        fields = ['id', 'user', 'comment', 'evaluations']
示例#3
0
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')
示例#4
0
class AuxInterviewSerializer(serializers.ModelSerializer):
    """Serializer for Detailed Candidate Endpoint"""
    interviewers = AuxUserSerializer(many=True)

    class Meta:
        depth = 3
        model = Interview
        fields = ('id', 'status', 'date', 'interviewers')
示例#5
0
class VacancyDetailSerializer(serializers.ModelSerializer):
    created_by = AuxUserSerializer(read_only=True)
    requirements = RequirementSerializer(many=True, read_only=True)
    request = VacancyRequestSerializer()

    class Meta:
        model = Vacancy
        exclude = []
示例#6
0
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']
示例#7
0
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')
示例#8
0
class CommentSerializer(serializers.ModelSerializer):
    created_by = AuxUserSerializer()

    class Meta:
        model = Comment
        fields = ('id', 'text', 'created_by', 'created')
示例#9
0
class InterviewerSerializer(serializers.ModelSerializer):
    user = AuxUserSerializer()

    class Meta:
        model = Interviewer
        fields = ('id', 'user')