# coding=utf-8

from rest_framework import serializers
from apps.activity.models import MemberCoupon


class MemberCouponSerializer(serializers.ModelSerializer):
    activity_name = serializers.CharField(source='activity.title', read_only=True)
    coupon_name = serializers.CharField(source='coupon.name', read_only=True)

    class Meta:
        model = MemberCoupon
        fields = ('activity_name', 'coupon_name', 'receive_date', 'end_date', 'write_off_time', )
