from rest_framework import serializers

from portfolio.models import Project, ProjectEntry


class ProjectSerializer(serializers.ModelSerializer):
    class Meta:
        model = Project
        fields = ('id', 'title', 'description', 'objectives', 'slug', 'appearance', 'student', 'final',)
        read_only_fields = ('id', 'slug',)


class ProjectEntrySerializer(serializers.ModelSerializer):
    class Meta:
        model = ProjectEntry
        fields = ('id', 'document_url', 'description', 'created', 'project')
        read_only_fields = ('id', 'created', 'activity', 'reflection', 'next_steps',)
