forked from uncloud/uncloud
13 lines
352 B
Python
13 lines
352 B
Python
|
from rest_framework import serializers
|
||
|
from .models import Bill, Payment
|
||
|
|
||
|
class BillSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Bill
|
||
|
fields = ['user', 'amount']
|
||
|
|
||
|
class PaymentSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Payment
|
||
|
fields = ['user', 'amount', 'source', 'timestamp']
|