from rest_framework import serializers
from order.models import Order, Coupon

class OrderSerializer(serializers.ModelSerializer):
    orderId = serializers.SerializerMethodField()
    class Meta:
        model = Order
        fields="__all__"
    def get_orderId(self, obj):
        return Order.START + obj.id

class CouponSerializer(serializers.ModelSerializer):
    class Meta:
        model = Coupon
        fields="__all__"
f5de7ab8dc929f41b2f73edff2bb7a29c770ad4e
<mask token>


class CouponSerializer(serializers.ModelSerializer):


    class Meta:
        model = Coupon
        fields = '__all__'

<mask token>


class OrderSerializer(serializers.ModelSerializer):
    <mask token>


    class Meta:
        model = Order
        fields = '__all__'

    def get_orderId(self, obj):
        return Order.START + obj.id


class CouponSerializer(serializers.ModelSerializer):


    class Meta:
        model = Coupon
        fields = '__all__'

<mask token>


class OrderSerializer(serializers.ModelSerializer):
    orderId = serializers.SerializerMethodField()


    class Meta:
        model = Order
        fields = '__all__'

    def get_orderId(self, obj):
        return Order.START + obj.id


class CouponSerializer(serializers.ModelSerializer):


    class Meta:
        model = Coupon
        fields = '__all__'

from rest_framework import serializers
from order.models import Order, Coupon


class OrderSerializer(serializers.ModelSerializer):
    orderId = serializers.SerializerMethodField()


    class Meta:
        model = Order
        fields = '__all__'

    def get_orderId(self, obj):
        return Order.START + obj.id


class CouponSerializer(serializers.ModelSerializer):


    class Meta:
        model = Coupon
        fields = '__all__'

from rest_framework import serializers
from order.models import Order, Coupon

class OrderSerializer(serializers.ModelSerializer):
    orderId = serializers.SerializerMethodField()
    class Meta:
        model = Order
        fields="__all__"
    def get_orderId(self, obj):
        return Order.START + obj.id

class CouponSerializer(serializers.ModelSerializer):
    class Meta:
        model = Coupon
        fields="__all__"