from rest_framework import serializers

from .models import Organization, Project


class OrganizationSerializer(serializers.ModelSerializer):
    class Meta:
        model = Organization
        fields = ["restricted_object_id", "name"]
        read_only_fields = ["restricted_object_id"]


class ProjectSerializer(serializers.ModelSerializer):
    class Meta:
        model = Project
        fields = ["restricted_object_id", "name", "description"]
        read_only_fields = ["restricted_object_id"]