forked from uncloud/uncloud
Add description field to Orders
This commit is contained in:
parent
db3c29d17e
commit
0560063326
3 changed files with 21 additions and 1 deletions
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 3.0.6 on 2020-05-07 10:07
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uncloud_pay', '0009_auto_20200502_2047'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='order',
|
||||
name='description',
|
||||
field=models.TextField(default=''),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
|
@ -808,6 +808,7 @@ class Order(models.Model):
|
|||
on_delete=models.CASCADE,
|
||||
editable=False)
|
||||
billing_address = models.ForeignKey(BillingAddress, on_delete=models.CASCADE)
|
||||
description = models.TextField()
|
||||
|
||||
# TODO: enforce ending_date - starting_date to be larger than recurring_period.
|
||||
creation_date = models.DateTimeField(auto_now_add=True)
|
||||
|
|
|
@ -70,7 +70,7 @@ class OrderSerializer(serializers.ModelSerializer):
|
|||
|
||||
class Meta:
|
||||
model = Order
|
||||
fields = ['uuid', 'owner', 'creation_date', 'starting_date', 'ending_date',
|
||||
fields = ['uuid', 'owner', 'description', 'creation_date', 'starting_date', 'ending_date',
|
||||
'bill', 'recurring_period', 'recurring_price', 'one_time_price']
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue