payment modeli yaratildi
This commit is contained in:
1
core/apps/payment/serializers/__init__.py
Normal file
1
core/apps/payment/serializers/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .payment import * # noqa
|
||||
1
core/apps/payment/serializers/payment/__init__.py
Normal file
1
core/apps/payment/serializers/payment/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .payment import * # noqa
|
||||
28
core/apps/payment/serializers/payment/payment.py
Normal file
28
core/apps/payment/serializers/payment/payment.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from rest_framework import serializers
|
||||
|
||||
from core.apps.payment.models import PaymentModel
|
||||
|
||||
|
||||
class BasePaymentSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = PaymentModel
|
||||
fields = [
|
||||
"id",
|
||||
"valuation",
|
||||
]
|
||||
|
||||
|
||||
class ListPaymentSerializer(BasePaymentSerializer):
|
||||
class Meta(BasePaymentSerializer.Meta): ...
|
||||
|
||||
|
||||
class RetrievePaymentSerializer(BasePaymentSerializer):
|
||||
class Meta(BasePaymentSerializer.Meta): ...
|
||||
|
||||
|
||||
class CreatePaymentSerializer(BasePaymentSerializer):
|
||||
class Meta(BasePaymentSerializer.Meta):
|
||||
fields = [
|
||||
"id",
|
||||
"valuation",
|
||||
]
|
||||
Reference in New Issue
Block a user