# Generated by Django 3.1 on 2021-07-02 03:23

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Zone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('zone', models.CharField(max_length=255, unique=True, verbose_name='域名')),
                ('comment', models.TextField(blank=True, default='', max_length=128, verbose_name='描述')),
                ('status', models.SmallIntegerField(choices=[(1, '激活'), (0, '暂停解析')], default=1, verbose_name='状态')),
                ('gmt_create', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': 'domian',
                'verbose_name_plural': 'domian',
                'db_table': 'dns_zones',
            },
        ),
        migrations.CreateModel(
            name='DnsRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('host', models.CharField(max_length=255, verbose_name='主机记录')),
                ('type', models.CharField(choices=[('A', 'A记录:\u3000将域名指向一个IP地址'), ('CNAME', 'CNAME:\u3000将域名指向另一个域名'), ('MX', 'MX:\u3000设置邮箱,添加MX记录'), ('TXT', 'TXT:\u3000长度限制255，通常用来做SPF记录'), ('NS', 'NS:\u3000域名服务器记录，将子域名交给其他服务商解析'), ('AAAA', 'AAAA:\u3000将主机名指向IPv6地址'), ('SRV', 'SRV:  记录哪台计算机提供了哪个服务，如：_xmpp-server._tcp')], default='A', max_length=5, verbose_name='记录类型')),
                ('data', models.CharField(blank=True, max_length=255, null=True, verbose_name='记录值')),
                ('ttl', models.IntegerField(default=60, verbose_name='TTL(秒)')),
                ('mx_priority', models.IntegerField(blank=True, null=True)),
                ('refresh', models.IntegerField(default=3600)),
                ('retry', models.IntegerField(default=3600)),
                ('expire', models.IntegerField(default=86400)),
                ('minimum', models.IntegerField(default=3600)),
                ('serial', models.BigIntegerField(default=2016111600)),
                ('resp_person', models.CharField(default='ns1.ops.net', max_length=64)),
                ('primary_ns', models.CharField(default='ns1.ops.net', max_length=64)),
                ('gmt_create', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
                ('gmt_modified', models.DateField(auto_now=True, verbose_name='最后操作时间')),
                ('zone', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bind.zone', verbose_name='域名')),
            ],
            options={
                'verbose_name': 'record',
                'verbose_name_plural': 'record',
                'db_table': 'dns_records',
                'ordering': ['-gmt_modified'],
                'unique_together': {('zone', 'host')},
            },
        ),
    ]

# Generated by Django 3.1 on 2021-07-02 03:23

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Zone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('zone', models.CharField(max_length=255, unique=True, verbose_name='域名')),
                ('comment', models.TextField(blank=True, default='', max_length=128, verbose_name='描述')),
                ('status', models.SmallIntegerField(choices=[(1, '激活'), (0, '暂停解析')], default=1, verbose_name='状态')),
                ('gmt_create', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': 'domian',
                'verbose_name_plural': 'domian',
                'db_table': 'dns_zones',
            },
        ),
        migrations.CreateModel(
            name='DnsRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('host', models.CharField(max_length=255, verbose_name='主机记录')),
                ('type', models.CharField(choices=[('A', 'A记录:\u3000将域名指向一个IP地址'), ('CNAME', 'CNAME:\u3000将域名指向另一个域名'), ('MX', 'MX:\u3000设置邮箱,添加MX记录'), ('TXT', 'TXT:\u3000长度限制255，通常用来做SPF记录'), ('NS', 'NS:\u3000域名服务器记录，将子域名交给其他服务商解析'), ('AAAA', 'AAAA:\u3000将主机名指向IPv6地址'), ('SRV', 'SRV:  记录哪台计算机提供了哪个服务，如：_xmpp-server._tcp')], default='A', max_length=5, verbose_name='记录类型')),
                ('data', models.CharField(blank=True, max_length=255, null=True, verbose_name='记录值')),
                ('ttl', models.IntegerField(default=60, verbose_name='TTL(秒)')),
                ('mx_priority', models.IntegerField(blank=True, null=True)),
                ('refresh', models.IntegerField(default=3600)),
                ('retry', models.IntegerField(default=3600)),
                ('expire', models.IntegerField(default=86400)),
                ('minimum', models.IntegerField(default=3600)),
                ('serial', models.BigIntegerField(default=2016111600)),
                ('resp_person', models.CharField(default='ns1.ops.net', max_length=64)),
                ('primary_ns', models.CharField(default='ns1.ops.net', max_length=64)),
                ('gmt_create', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
                ('gmt_modified', models.DateField(auto_now=True, verbose_name='最后操作时间')),
                ('zone', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bind.zone', verbose_name='域名')),
            ],
            options={
                'verbose_name': 'record',
                'verbose_name_plural': 'record',
                'db_table': 'dns_records',
                'ordering': ['-gmt_modified'],
                'unique_together': {('zone', 'host')},
            },
        ),
    ]

# Generated by Django 3.1 on 2021-07-02 03:23