forked from uncloud/uncloud
64 lines
2.9 KiB
Python
64 lines
2.9 KiB
Python
|
# Generated by Django 3.0.5 on 2020-04-03 17:27
|
||
|
|
||
|
from django.conf import settings
|
||
|
import django.contrib.postgres.fields.jsonb
|
||
|
import django.core.validators
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
import uuid
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||
|
('uncloud_pay', '0001_initial'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='MACAdress',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='VPNPool',
|
||
|
fields=[
|
||
|
('extra_data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, editable=False, null=True)),
|
||
|
('network', models.GenericIPAddressField(editable=False, primary_key=True, serialize=False)),
|
||
|
('network_size', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(128)])),
|
||
|
],
|
||
|
options={
|
||
|
'abstract': False,
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='VPNProduct',
|
||
|
fields=[
|
||
|
('extra_data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, editable=False, null=True)),
|
||
|
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||
|
('status', models.CharField(choices=[('PENDING', 'Pending'), ('AWAITING_PAYMENT', 'Awaiting payment'), ('BEING_CREATED', 'Being created'), ('SCHEDULED', 'Scheduled'), ('ACTIVE', 'Active'), ('MODIFYING', 'Modifying'), ('DELETED', 'Deleted'), ('DISABLED', 'Disabled'), ('UNUSABLE', 'Unusable')], default='PENDING', max_length=32)),
|
||
|
('network', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_net.VPNPool')),
|
||
|
('order', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='uncloud_pay.Order')),
|
||
|
('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||
|
],
|
||
|
options={
|
||
|
'abstract': False,
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='VPNNetwork',
|
||
|
fields=[
|
||
|
('extra_data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, editable=False, null=True)),
|
||
|
('network', models.GenericIPAddressField(editable=False, primary_key=True, serialize=False)),
|
||
|
('vpnpool', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_net.VPNPool')),
|
||
|
],
|
||
|
options={
|
||
|
'abstract': False,
|
||
|
},
|
||
|
),
|
||
|
]
|