various updates
This commit is contained in:
parent
0cd8a3a787
commit
8959bc6ad5
7 changed files with 103 additions and 10 deletions
21
uncloud/migrations/0005_uncloudprovider_coupon_network.py
Normal file
21
uncloud/migrations/0005_uncloudprovider_coupon_network.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Generated by Django 3.1 on 2020-10-12 17:32
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uncloud_net', '0010_auto_20201011_2009'),
|
||||
('uncloud', '0004_auto_20201011_2031'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='uncloudprovider',
|
||||
name='coupon_network',
|
||||
field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, related_name='uncloudprovidercoupon', to='uncloud_net.uncloudnetwork'),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
|
|
@ -87,6 +87,7 @@ class UncloudProvider(UncloudAddress):
|
|||
|
||||
billing_network = models.ForeignKey(UncloudNetwork, related_name="uncloudproviderbill", on_delete=models.CASCADE)
|
||||
referral_network = models.ForeignKey(UncloudNetwork, related_name="uncloudproviderreferral", on_delete=models.CASCADE)
|
||||
coupon_network = models.ForeignKey(UncloudNetwork, related_name="uncloudprovidercoupon", on_delete=models.CASCADE)
|
||||
|
||||
|
||||
@classmethod
|
||||
|
|
@ -112,7 +113,8 @@ class UncloudProvider(UncloudAddress):
|
|||
country="CH",
|
||||
starting_date=timezone.now(),
|
||||
billing_network=UncloudNetwork.objects.get(description="uncloud Billing"),
|
||||
referral_network=UncloudNetwork.objects.get(description="uncloud Referral")
|
||||
referral_network=UncloudNetwork.objects.get(description="uncloud Referral"),
|
||||
coupon_network=UncloudNetwork.objects.get(description="uncloud Coupon")
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue