robosats/api/serializers.py
2022-01-04 16:13:08 -08:00

17 lines
637 B
Python

from rest_framework import serializers
from .models import Order
class ListOrderSerializer(serializers.ModelSerializer):
class Meta:
model = Order
fields = ('id','status','created_at','expires_at','type','currency','amount','payment_method','is_explicit','premium','satoshis','maker','taker')
class MakeOrderSerializer(serializers.ModelSerializer):
class Meta:
model = Order
fields = ('type','currency','amount','payment_method','is_explicit','premium','satoshis')
class UpdateOrderSerializer(serializers.ModelSerializer):
class Meta:
model = Order
fields = ('id','invoice')