Commit 05600633 authored by fnux's avatar fnux

Add description field to Orders

parent db3c29d1
Pipeline #1388 failed with stage
in 3 minutes and 22 seconds
# 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']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment