Add JSON support for product description
This commit is contained in:
parent
c6bacab35a
commit
c32499199a
10 changed files with 1589 additions and 653 deletions
19
uncloud_pay/migrations/0017_order_config.py
Normal file
19
uncloud_pay/migrations/0017_order_config.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 3.1 on 2020-09-28 19:04
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uncloud_pay', '0016_auto_20200928_1858'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='order',
|
||||
name='config',
|
||||
field=models.JSONField(default={}),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
20
uncloud_pay/migrations/0018_order_product.py
Normal file
20
uncloud_pay/migrations/0018_order_product.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Generated by Django 3.1 on 2020-09-28 19:08
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uncloud_pay', '0017_order_config'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='order',
|
||||
name='product',
|
||||
field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='uncloud_pay.product'),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
17
uncloud_pay/migrations/0019_remove_product_owner.py
Normal file
17
uncloud_pay/migrations/0019_remove_product_owner.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 3.1 on 2020-09-28 19:14
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uncloud_pay', '0018_order_product'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='product',
|
||||
name='owner',
|
||||
),
|
||||
]
|
||||
29
uncloud_pay/migrations/0020_auto_20200928_1915.py
Normal file
29
uncloud_pay/migrations/0020_auto_20200928_1915.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Generated by Django 3.1 on 2020-09-28 19:15
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uncloud_pay', '0019_remove_product_owner'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='product',
|
||||
name='status',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='product',
|
||||
name='description',
|
||||
field=models.CharField(default='', max_length=1024),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='product',
|
||||
name='name',
|
||||
field=models.CharField(default='', max_length=256),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
23
uncloud_pay/migrations/0021_auto_20200928_1932.py
Normal file
23
uncloud_pay/migrations/0021_auto_20200928_1932.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 3.1 on 2020-09-28 19:32
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uncloud_pay', '0020_auto_20200928_1915'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='product',
|
||||
name='default_currency',
|
||||
field=models.CharField(choices=[('CHF', 'Swiss Franc'), ('EUR', 'Euro'), ('USD', 'US Dollar')], default='CHF', max_length=32),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='product',
|
||||
name='default_recurring_period',
|
||||
field=models.IntegerField(choices=[(31536000, 'Per 365 days'), (2592000, 'Per 30 days'), (604800, 'Per Week'), (86400, 'Per Day'), (3600, 'Per Hour'), (60, 'Per Minute'), (1, 'Per Second'), (0, 'Onetime')], default=2592000),
|
||||
),
|
||||
]
|
||||
18
uncloud_pay/migrations/0022_auto_20200928_1932.py
Normal file
18
uncloud_pay/migrations/0022_auto_20200928_1932.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 3.1 on 2020-09-28 19:32
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uncloud_pay', '0021_auto_20200928_1932'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='product',
|
||||
old_name='default_currency',
|
||||
new_name='currency',
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue