text: # Generated by Django 2.1.11 on 2019-11-07 15:27
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='AgentDomainModels',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('domain_name', models.CharField(help_text='域名', max_length=120)),
                  ('zone_file', models.CharField(help_text='zone文件使用的文件路径', max_length=120)),
                  ('create_time', models.DateTimeField(auto_now_add=True, help_text='创建时间')),
                  ('update_time', models.DateTimeField(auto_now=True, help_text='更新时间')),
              ],
              options={
                  'verbose_name': '域名表',
                  'verbose_name_plural': '域名表',
              },
          ),
          migrations.CreateModel(
              name='AgentResolveModels',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(help_text='解析名称', max_length=120)),
                  ('type', models.CharField(help_text='解析类型', max_length=120)),
                  ('mx', models.IntegerField(default=0, help_text='MX记录值, 非MX记录则为0')),
                  ('ttl', models.IntegerField(default=600, help_text='TTL值, 默认值600')),
                  ('address', models.CharField(help_text='解析地址', max_length=120)),
                  ('domain', models.ForeignKey(help_text='域名', on_delete=django.db.models.deletion.CASCADE, related_name='resolve', to='agent.AgentDomainModels')),
              ],
              options={
                  'verbose_name': '解析表',
                  'verbose_name_plural': '解析表',
              },
          ),
          migrations.CreateModel(
              name='AgentViewModels',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('view_name', models.CharField(help_text='视图名称', max_length=120, unique=True)),
                  ('key_name', models.CharField(help_text='视图所有使用的Key名称', max_length=120)),
                  ('code_name', models.CharField(help_text='视图所有使用密钥', max_length=120)),
                  ('type', models.IntegerField(choices=[(1, 'master'), (2, 'slave')], default=1, help_text='服务类型')),
                  ('create_time', models.DateTimeField(auto_now_add=True, help_text='创建时间')),
                  ('update_time', models.DateTimeField(auto_now=True, help_text='更新时间')),
                  ('is_register', models.BooleanField(default=False, help_text='是否注册到服务端')),
              ],
              options={
                  'verbose_name': '视图表',
                  'verbose_name_plural': '视图表',
              },
          ),
          migrations.AddField(
              model_name='agentdomainmodels',
              name='view',
              field=models.ForeignKey(help_text='视图', on_delete=django.db.models.deletion.CASCADE, related_name='domain', to='agent.AgentViewModels'),
          ),
      ]
  