uncloud-mravi/uncloud/uncloud_pay/serializers.py

12 lines
423 B
Python

from rest_framework import serializers
from .models import Bill, Payment
class BillSerializer(serializers.ModelSerializer):
class Meta:
model = Bill
fields = ['owner', 'amount', 'due_date', 'creation_date', 'starting_date', 'ending_date', 'paid']
class PaymentSerializer(serializers.ModelSerializer):
class Meta:
model = Payment
fields = ['owner', 'amount', 'source', 'timestamp']