order payment model qoshildi va plan serializer error togirlandi
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from .product import *
|
||||
from .order_item import *
|
||||
from .order import *
|
||||
from .order import *
|
||||
from .payment import *
|
||||
16
core/apps/orders/models/payment.py
Normal file
16
core/apps/orders/models/payment.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# django
|
||||
from django.db import models
|
||||
|
||||
# shared
|
||||
from core.apps.shared.models import BaseModel
|
||||
# orders
|
||||
from core.apps.orders.models import Order
|
||||
|
||||
|
||||
class Payment(BaseModel):
|
||||
order = models.ForeignKey(Order, on_delete=models.CASCADE, related_name='payments')
|
||||
price = models.DecimalField(max_digits=15, decimal_places=2)
|
||||
|
||||
def __str__(self):
|
||||
return self.price
|
||||
|
||||
Reference in New Issue
Block a user