from django.contrib.auth import get_user_model from rest_framework import serializers from .models import * User = get_user_model() # User Serializer class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ('id', 'username', 'email') # CentralPayment serializer class CentralPaymentSerializer(serializers.ModelSerializer): user_id = UserSerializer() class Meta: model = CentralPayment fields = ( "id", "date", "promo_code", "services_used", "services_id", "user_id", "qtn", "total_amount", "amount_charged", "discount", "gateway_fee", "currency", "payment_status", "payment_gateway", "payment_id", "order_id", "signature_id" ) class AdminActionSerializer(serializers.Serializer): id = serializers.CharField(max_length=200) action = serializers.CharField(max_length=200) # class JuggernautPackageSerializer(serializers.ModelSerializer): # class Meta: # model = JuggernautPackage # fields = '__all__' # ''' for project center-->GET ''' # class JuggernautProjectCenterSerializer(serializers.ModelSerializer): # class Meta: # model = JuggernautProjectCenter # fields = '__all__' # ''' for narration -->GET ''' # class JuggernautNarrationSerializer(serializers.ModelSerializer): # class Meta: # model = JuggernautNarration # fields = '__all__' # ''' for pitchdeck -->GET ''' # class JuggernautPitchdeckSerializer(serializers.ModelSerializer): # class Meta: # model = JuggernautPitchdeck # fields = '__all__' # ''' for conversion ''' # class JuggernautConversionSerializer(serializers.ModelSerializer): # class Meta: # model = JuggernautConversion # fields = '__all__' # ''' for subtitle ''' # class JuggernautSubtitleSerializer(serializers.ModelSerializer): # class Meta: # model = JuggernautSubtitling # fields = '__all__' # ''' for beat sheet ''' # class JuggernautBeatSheetSerializer(serializers.ModelSerializer): # class Meta: # model = JuggernautBeatSheet # fields = '__all__'