<reponame>heytrav/drs-project
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-26 01:17
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='AccountDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=200)),
                ('surname', models.CharField(max_length=200)),
                ('middle_name', models.CharField(blank=True, max_length=200)),
                ('email', models.CharField(max_length=200)),
                ('email2', models.CharField(blank=True, max_length=200)),
                ('email3', models.CharField(blank=True, max_length=200)),
                ('telephone', models.CharField(blank=True, max_length=200)),
                ('fax', models.CharField(blank=True, max_length=200)),
                ('company', models.CharField(blank=True, max_length=200)),
                ('house_number', models.CharField(max_length=10)),
                ('street1', models.CharField(max_length=200)),
                ('street2', models.CharField(blank=True, max_length=200)),
                ('street3', models.CharField(blank=True, max_length=200)),
                ('city', models.CharField(max_length=200)),
                ('suburb', models.CharField(blank=True, max_length=200)),
                ('state', models.CharField(blank=True, max_length=200)),
                ('postcode', models.CharField(max_length=20)),
                ('country', models.CharField(max_length=2)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('postal_info_type', models.CharField(choices=[('int', 'international'), ('loc', 'local')], default='loc', max_length=3)),
                ('disclose_name', models.BooleanField(default=False)),
                ('disclose_company', models.BooleanField(default=False)),
                ('disclose_address', models.BooleanField(default=False)),
                ('disclose_telephone', models.BooleanField(default=False)),
                ('disclose_fax', models.BooleanField(default=False)),
                ('disclose_email', models.BooleanField(default=False)),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='personal_details', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, null=True)),
                ('email', models.CharField(max_length=200, null=True)),
                ('telephone', models.CharField(blank=True, max_length=200, null=True)),
                ('fax', models.CharField(blank=True, max_length=200, null=True)),
                ('company', models.CharField(blank=True, max_length=200, null=True)),
                ('house_number', models.CharField(blank=True, max_length=10, null=True)),
                ('street1', models.CharField(max_length=200, null=True)),
                ('street2', models.CharField(blank=True, max_length=200, null=True)),
                ('street3', models.CharField(blank=True, max_length=200, null=True)),
                ('city', models.CharField(max_length=200, null=True)),
                ('suburb', models.CharField(blank=True, max_length=200, null=True)),
                ('state', models.CharField(blank=True, max_length=200, null=True)),
                ('postcode', models.CharField(max_length=20, null=True)),
                ('country', models.CharField(max_length=2, null=True)),
                ('postal_info_type', models.CharField(choices=[('int', 'international'), ('loc', 'local')], default='loc', max_length=3)),
                ('authcode', models.CharField(blank=True, max_length=100, null=True)),
                ('roid', models.CharField(blank=True, max_length=100, null=True)),
                ('disclose_name', models.BooleanField(default=False)),
                ('disclose_company', models.BooleanField(default=False)),
                ('disclose_address', models.BooleanField(default=False)),
                ('disclose_telephone', models.BooleanField(default=False)),
                ('disclose_fax', models.BooleanField(default=False)),
                ('disclose_email', models.BooleanField(default=False)),
                ('status', models.CharField(max_length=200, null=True)),
                ('registry_id', models.CharField(max_length=200, unique=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('account_template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.AccountDetail')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contacts', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ContactType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='DefaultAccountContact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mandatory', models.BooleanField(default=False)),
                ('account_template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.AccountDetail')),
                ('contact_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.ContactType')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='default_account_contact', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DefaultAccountTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('account_template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.AccountDetail')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='default_account', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DefaultContact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mandatory', models.BooleanField(default=False)),
                ('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.Contact')),
                ('contact_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.ContactType')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='default_contact', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DefaultRegistrant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='default_registrant', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Domain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='DomainContact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.NullBooleanField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.Contact')),
                ('contact_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.ContactType')),
            ],
        ),
        migrations.CreateModel(
            name='DomainProvider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('slug', models.CharField(max_length=100, unique=True)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='DomainRegistrant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.NullBooleanField()),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='RegisteredDomain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.NullBooleanField()),
                ('auto_renew', models.BooleanField(default=True)),
                ('registration_period', models.IntegerField()),
                ('authcode', models.CharField(max_length=100, null=True)),
                ('roid', models.CharField(max_length=100, null=True)),
                ('status', models.CharField(max_length=200, null=True)),
                ('anniversary', models.DateTimeField(null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('domain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.Domain')),
            ],
        ),
        migrations.CreateModel(
            name='Registrant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('registry_id', models.CharField(max_length=200, unique=True)),
                ('name', models.CharField(max_length=200, null=True)),
                ('email', models.CharField(max_length=200, null=True)),
                ('telephone', models.CharField(blank=True, max_length=200, null=True)),
                ('fax', models.CharField(blank=True, max_length=200, null=True)),
                ('company', models.CharField(blank=True, max_length=200, null=True)),
                ('house_number', models.CharField(blank=True, max_length=10, null=True)),
                ('street1', models.CharField(max_length=200, null=True)),
                ('street2', models.CharField(blank=True, max_length=200, null=True)),
                ('street3', models.CharField(blank=True, max_length=200, null=True)),
                ('city', models.CharField(max_length=200, null=True)),
                ('suburb', models.CharField(blank=True, max_length=200, null=True)),
                ('state', models.CharField(blank=True, max_length=200, null=True)),
                ('status', models.CharField(max_length=200, null=True)),
                ('postcode', models.CharField(max_length=20, null=True)),
                ('country', models.CharField(max_length=2, null=True)),
                ('postal_info_type', models.CharField(choices=[('int', 'international'), ('loc', 'local')], default='loc', max_length=3)),
                ('authcode', models.CharField(blank=True, max_length=100, null=True)),
                ('roid', models.CharField(blank=True, max_length=100, null=True)),
                ('disclose_name', models.BooleanField(default=False)),
                ('disclose_company', models.BooleanField(default=False)),
                ('disclose_address', models.BooleanField(default=False)),
                ('disclose_telephone', models.BooleanField(default=False)),
                ('disclose_fax', models.BooleanField(default=False)),
                ('disclose_email', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('account_template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.AccountDetail')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='registrants', to=settings.AUTH_USER_MODEL)),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider')),
            ],
        ),
        migrations.CreateModel(
            name='TopLevelDomain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('zone', models.CharField(max_length=100, unique=True)),
                ('description', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='TopLevelDomainProvider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('anniversary_notification_period_days', models.IntegerField(default=30)),
                ('renewal_period', models.IntegerField(default=30)),
                ('grace_period_days', models.IntegerField(default=30)),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider')),
                ('zone', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.TopLevelDomain')),
            ],
        ),
        migrations.AddField(
            model_name='registereddomain',
            name='tld',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.TopLevelDomain'),
        ),
        migrations.AddField(
            model_name='registereddomain',
            name='tld_provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.TopLevelDomainProvider'),
        ),
        migrations.AddField(
            model_name='domainregistrant',
            name='registered_domain',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='registrant', to='domain_api.RegisteredDomain'),
        ),
        migrations.AddField(
            model_name='domainregistrant',
            name='registrant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.Registrant'),
        ),
        migrations.AddField(
            model_name='domaincontact',
            name='registered_domain',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contacts', to='domain_api.RegisteredDomain'),
        ),
        migrations.AddField(
            model_name='defaultregistrant',
            name='registrant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.Registrant'),
        ),
        migrations.AddField(
            model_name='defaultcontact',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider'),
        ),
        migrations.AddField(
            model_name='defaultaccounttemplate',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider'),
        ),
        migrations.AddField(
            model_name='defaultaccountcontact',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider'),
        ),
        migrations.AddField(
            model_name='contact',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider'),
        ),
        migrations.AlterUniqueTogether(
            name='registereddomain',
            unique_together=set([('domain', 'tld', 'active')]),
        ),
        migrations.AlterUniqueTogether(
            name='domainregistrant',
            unique_together=set([('registered_domain', 'registrant', 'active')]),
        ),
        migrations.AlterUniqueTogether(
            name='domaincontact',
            unique_together=set([('registered_domain', 'contact_type', 'contact', 'active')]),
        ),
        migrations.AlterUniqueTogether(
            name='defaultregistrant',
            unique_together=set([('project_id', 'registrant')]),
        ),
        migrations.AlterUniqueTogether(
            name='defaultcontact',
            unique_together=set([('project_id', 'contact_type', 'contact', 'provider')]),
        ),
        migrations.AlterUniqueTogether(
            name='defaultaccounttemplate',
            unique_together=set([('project_id', 'provider', 'account_template')]),
        ),
        migrations.AlterUniqueTogether(
            name='defaultaccountcontact',
            unique_together=set([('project_id', 'contact_type', 'account_template', 'provider', 'mandatory')]),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-26 01:17
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='AccountDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=200)),
                ('surname', models.CharField(max_length=200)),
                ('middle_name', models.CharField(blank=True, max_length=200)),
                ('email', models.CharField(max_length=200)),
                ('email2', models.CharField(blank=True, max_length=200)),
                ('email3', models.CharField(blank=True, max_length=200)),
                ('telephone', models.CharField(blank=True, max_length=200)),
                ('fax', models.CharField(blank=True, max_length=200)),
                ('company', models.CharField(blank=True, max_length=200)),
                ('house_number', models.CharField(max_length=10)),
                ('street1', models.CharField(max_length=200)),
                ('street2', models.CharField(blank=True, max_length=200)),
                ('street3', models.CharField(blank=True, max_length=200)),
                ('city', models.CharField(max_length=200)),
                ('suburb', models.CharField(blank=True, max_length=200)),
                ('state', models.CharField(blank=True, max_length=200)),
                ('postcode', models.CharField(max_length=20)),
                ('country', models.CharField(max_length=2)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('postal_info_type', models.CharField(choices=[('int', 'international'), ('loc', 'local')], default='loc', max_length=3)),
                ('disclose_name', models.BooleanField(default=False)),
                ('disclose_company', models.BooleanField(default=False)),
                ('disclose_address', models.BooleanField(default=False)),
                ('disclose_telephone', models.BooleanField(default=False)),
                ('disclose_fax', models.BooleanField(default=False)),
                ('disclose_email', models.BooleanField(default=False)),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='personal_details', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, null=True)),
                ('email', models.CharField(max_length=200, null=True)),
                ('telephone', models.CharField(blank=True, max_length=200, null=True)),
                ('fax', models.CharField(blank=True, max_length=200, null=True)),
                ('company', models.CharField(blank=True, max_length=200, null=True)),
                ('house_number', models.CharField(blank=True, max_length=10, null=True)),
                ('street1', models.CharField(max_length=200, null=True)),
                ('street2', models.CharField(blank=True, max_length=200, null=True)),
                ('street3', models.CharField(blank=True, max_length=200, null=True)),
                ('city', models.CharField(max_length=200, null=True)),
                ('suburb', models.CharField(blank=True, max_length=200, null=True)),
                ('state', models.CharField(blank=True, max_length=200, null=True)),
                ('postcode', models.CharField(max_length=20, null=True)),
                ('country', models.CharField(max_length=2, null=True)),
                ('postal_info_type', models.CharField(choices=[('int', 'international'), ('loc', 'local')], default='loc', max_length=3)),
                ('authcode', models.CharField(blank=True, max_length=100, null=True)),
                ('roid', models.CharField(blank=True, max_length=100, null=True)),
                ('disclose_name', models.BooleanField(default=False)),
                ('disclose_company', models.BooleanField(default=False)),
                ('disclose_address', models.BooleanField(default=False)),
                ('disclose_telephone', models.BooleanField(default=False)),
                ('disclose_fax', models.BooleanField(default=False)),
                ('disclose_email', models.BooleanField(default=False)),
                ('status', models.CharField(max_length=200, null=True)),
                ('registry_id', models.CharField(max_length=200, unique=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('account_template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.AccountDetail')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contacts', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ContactType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='DefaultAccountContact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mandatory', models.BooleanField(default=False)),
                ('account_template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.AccountDetail')),
                ('contact_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.ContactType')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='default_account_contact', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DefaultAccountTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('account_template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.AccountDetail')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='default_account', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DefaultContact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mandatory', models.BooleanField(default=False)),
                ('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.Contact')),
                ('contact_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.ContactType')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='default_contact', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DefaultRegistrant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='default_registrant', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Domain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='DomainContact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.NullBooleanField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.Contact')),
                ('contact_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.ContactType')),
            ],
        ),
        migrations.CreateModel(
            name='DomainProvider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('slug', models.CharField(max_length=100, unique=True)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='DomainRegistrant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.NullBooleanField()),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='RegisteredDomain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.NullBooleanField()),
                ('auto_renew', models.BooleanField(default=True)),
                ('registration_period', models.IntegerField()),
                ('authcode', models.CharField(max_length=100, null=True)),
                ('roid', models.CharField(max_length=100, null=True)),
                ('status', models.CharField(max_length=200, null=True)),
                ('anniversary', models.DateTimeField(null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('domain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.Domain')),
            ],
        ),
        migrations.CreateModel(
            name='Registrant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('registry_id', models.CharField(max_length=200, unique=True)),
                ('name', models.CharField(max_length=200, null=True)),
                ('email', models.CharField(max_length=200, null=True)),
                ('telephone', models.CharField(blank=True, max_length=200, null=True)),
                ('fax', models.CharField(blank=True, max_length=200, null=True)),
                ('company', models.CharField(blank=True, max_length=200, null=True)),
                ('house_number', models.CharField(blank=True, max_length=10, null=True)),
                ('street1', models.CharField(max_length=200, null=True)),
                ('street2', models.CharField(blank=True, max_length=200, null=True)),
                ('street3', models.CharField(blank=True, max_length=200, null=True)),
                ('city', models.CharField(max_length=200, null=True)),
                ('suburb', models.CharField(blank=True, max_length=200, null=True)),
                ('state', models.CharField(blank=True, max_length=200, null=True)),
                ('status', models.CharField(max_length=200, null=True)),
                ('postcode', models.CharField(max_length=20, null=True)),
                ('country', models.CharField(max_length=2, null=True)),
                ('postal_info_type', models.CharField(choices=[('int', 'international'), ('loc', 'local')], default='loc', max_length=3)),
                ('authcode', models.CharField(blank=True, max_length=100, null=True)),
                ('roid', models.CharField(blank=True, max_length=100, null=True)),
                ('disclose_name', models.BooleanField(default=False)),
                ('disclose_company', models.BooleanField(default=False)),
                ('disclose_address', models.BooleanField(default=False)),
                ('disclose_telephone', models.BooleanField(default=False)),
                ('disclose_fax', models.BooleanField(default=False)),
                ('disclose_email', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('account_template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.AccountDetail')),
                ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='registrants', to=settings.AUTH_USER_MODEL)),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider')),
            ],
        ),
        migrations.CreateModel(
            name='TopLevelDomain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('zone', models.CharField(max_length=100, unique=True)),
                ('description', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='TopLevelDomainProvider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('anniversary_notification_period_days', models.IntegerField(default=30)),
                ('renewal_period', models.IntegerField(default=30)),
                ('grace_period_days', models.IntegerField(default=30)),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider')),
                ('zone', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.TopLevelDomain')),
            ],
        ),
        migrations.AddField(
            model_name='registereddomain',
            name='tld',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.TopLevelDomain'),
        ),
        migrations.AddField(
            model_name='registereddomain',
            name='tld_provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.TopLevelDomainProvider'),
        ),
        migrations.AddField(
            model_name='domainregistrant',
            name='registered_domain',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='registrant', to='domain_api.RegisteredDomain'),
        ),
        migrations.AddField(
            model_name='domainregistrant',
            name='registrant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.Registrant'),
        ),
        migrations.AddField(
            model_name='domaincontact',
            name='registered_domain',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contacts', to='domain_api.RegisteredDomain'),
        ),
        migrations.AddField(
            model_name='defaultregistrant',
            name='registrant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.Registrant'),
        ),
        migrations.AddField(
            model_name='defaultcontact',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider'),
        ),
        migrations.AddField(
            model_name='defaultaccounttemplate',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider'),
        ),
        migrations.AddField(
            model_name='defaultaccountcontact',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider'),
        ),
        migrations.AddField(
            model_name='contact',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domain_api.DomainProvider'),
        ),
        migrations.AlterUniqueTogether(
            name='registereddomain',
            unique_together=set([('domain', 'tld', 'active')]),
        ),
        migrations.AlterUniqueTogether(
            name='domainregistrant',
            unique_together=set([('registered_domain', 'registrant', 'active')]),
        ),
        migrations.AlterUniqueTogether(
            name='domaincontact',
            unique_together=set([('registered_domain', 'contact_type', 'contact', 'active')]),
        ),
        migrations.AlterUniqueTogether(
            name='defaultregistrant',
            unique_together=set([('project_id', 'registrant')]),
        ),
        migrations.AlterUniqueTogether(
            name='defaultcontact',
            unique_together=set([('project_id', 'contact_type', 'contact', 'provider')]),
        ),
        migrations.AlterUniqueTogether(
            name='defaultaccounttemplate',
            unique_together=set([('project_id', 'provider', 'account_template')]),
        ),
        migrations.AlterUniqueTogether(
            name='defaultaccountcontact',
            unique_together=set([('project_id', 'contact_type', 'account_template', 'provider', 'mandatory')]),
        ),
    ]
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-26 01:17