mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-13 19:06:26 +00:00
22 lines
786 B
Python
22 lines
786 B
Python
from rest_framework import serializers
|
|
from .models import Order, LNPayment
|
|
|
|
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','buyer_invoice')
|
|
|
|
class UpdateInvoiceSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = LNPayment
|
|
fields = ['invoice'] |