from rest_framework import serializers
from .models import ContactMessage, ProjectInquiry

class ContactMessageSerializer(serializers.ModelSerializer):
    class Meta:
        model = ContactMessage
        fields = ['id', 'name', 'email', 'phone', 'company', 'subject', 'service_interested', 'message', 'created_at']
        read_only_fields = ['id', 'created_at']

class ProjectInquirySerializer(serializers.ModelSerializer):
    class Meta:
        model = ProjectInquiry
        fields = ['id', 'name', 'company', 'email', 'phone', 'service', 'estimated_budget', 'timeline', 'project_description', 'attachment', 'created_at']
        read_only_fields = ['id', 'created_at']
