from rest_framework import serializers
from package_payment.models.payment import Payment

class PaymentSerializer(serializers.ModelSerializer):
    class Meta:
        model = Payment
        fields = [
            "id",
            "user",
            "package",
            "amount",
            "currency",
            "status",
            "stripe_payment_intent",
            "stripe_customer_id",
            "payment_method_type",
            "card_brand",
            "card_last4",
            "created_at",
        ]
        read_only_fields = [
            "id",
            "status",
            "stripe_payment_intent",
            "stripe_customer_id",
            "card_brand",
            "card_last4",
            "created_at",
        ]