from rest_framework import serializers
from .models import Job, JobApplication

class JobSerializer(serializers.ModelSerializer):
    class Meta:
        model = Job
        fields = '__all__'

class JobApplicationSerializer(serializers.ModelSerializer):
    class Meta:
        model = JobApplication
        fields = ['id', 'job', 'full_name', 'email', 'phone', 'cv_file', 'cover_letter', 'linkedin_url', 'portfolio_url', 'applied_at']
        read_only_fields = ['id', 'applied_at']
