text: # -*- coding: utf-8 -*-
  # Generated by Django 1.9.8 on 2016-07-23 13:19
  from __future__ import unicode_literals
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='AccessRecord',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('date', models.DateField()),
                  ('user_count', models.IntegerField()),
                  ('view_count', models.IntegerField()),
              ],
              options={
                  'verbose_name': 'Access Record',
                  'verbose_name_plural': 'Access Record',
              },
          ),
          migrations.CreateModel(
              name='Host',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(db_index=True, max_length=30, verbose_name='\u4e3b\u673a\u540d')),
                  ('mip', models.GenericIPAddressField(blank=True, help_text=b'manager IP', null=True)),
                  ('bip', models.GenericIPAddressField(blank=True, help_text=b'business IP', null=True)),
                  ('vip', models.GenericIPAddressField(blank=True, null=True)),
                  ('status', models.SmallIntegerField(choices=[(0, 'Normal'), (1, 'Down'), (2, 'No Connect'), (3, 'Error')], default=0, verbose_name='\u72b6\u6001')),
                  ('core_num', models.SmallIntegerField(choices=[(2, b'2 Cores'), (4, b'4 Cores'), (6, b'6 Cores'), (8, b'8 Cores'), (10, b'10 Cores'), (12, b'12 Cores'), (14, b'14 Cores'), (16, b'16 Cores'), (18, b'18 Cores'), (20, b'20 Cores'), (22, b'22 Cores'), (24, b'24 Cores'), (26, b'26 Cores'), (28, b'28 Cores'), (30, b'30 Cores'), (32, b'32 Cores'), (34, b'34 Cores'), (36, b'36 Cores')], default=2)),
                  ('hard_disk', models.IntegerField(blank=True, null=True)),
                  ('memory', models.IntegerField(blank=True, null=True)),
                  ('system', models.CharField(choices=[('centOS7.2', 'centOS7.2'), ('rh6.5', 'rh6.5'), ('windows', 'windows')], default=b'centOS7.2', max_length=32, verbose_name='System OS')),
                  ('create_time', models.DateField(auto_now=True)),
                  ('service_type', models.CharField(choices=[(b'app', 'app'), (b'job', 'job'), (b'mysql', 'mysql'), (b'oracle', 'oracle'), (b'ta', 'ta'), (b'codis', 'codis'), (b'zookeeper', 'zookeeper'), (b'dubbo', 'dubbo'), (b'lts', 'lts'), (b'rocketmq', 'rocketmq'), (b'elk', 'elk'), (b'cat', 'cat'), (b'fastdfs', 'fastdfs'), (b'nginx', 'nginx')], db_index=True, max_length=16)),
                  ('zone_type', models.CharField(choices=[(b'APP', 'APP'), (b'DB', 'DB'), (b'LOG', 'LOG'), (b'BUSINESS', 'BUSINESS'), (b'DMZ-WEB', 'DMZ-WEB'), (b'DMZ-OUT', 'DMZ-OUT')], db_index=True, max_length=16)),
                  ('description', models.TextField(blank=True, null=True, verbose_name='\u5907\u6ce8')),
              ],
              options={
                  'verbose_name': 'Host',
                  'verbose_name_plural': 'Host',
              },
          ),
          migrations.CreateModel(
              name='HostGroup',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=32)),
                  ('description', models.TextField(blank=True, null=True)),
                  ('hosts', models.ManyToManyField(blank=True, related_name='groups', to='cmdb.Host', verbose_name='Hosts')),
              ],
              options={
                  'verbose_name': 'Host Group',
                  'verbose_name_plural': 'Host Group',
              },
          ),
          migrations.CreateModel(
              name='IDC',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=10, verbose_name='IDC\u7f16\u7801')),
                  ('address', models.CharField(max_length=128, verbose_name='\u5730\u5740')),
                  ('contact', models.CharField(blank=True, max_length=32, null=True, verbose_name='\u8054\u7cfb\u4eba')),
                  ('telphone', models.CharField(blank=True, max_length=32, null=True, verbose_name='\u7535\u8bdd')),
                  ('qq', models.CharField(blank=True, max_length=32, null=True, verbose_name='QQ')),
                  ('customer_id', models.CharField(blank=True, max_length=128, null=True)),
                  ('description', models.TextField(blank=True, null=True, verbose_name='\u5907\u6ce8')),
                  ('create_time', models.DateField(auto_now=True)),
              ],
              options={
                  'verbose_name': 'IDC',
                  'verbose_name_plural': 'IDC',
              },
          ),
          migrations.CreateModel(
              name='MaintainLog',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('maintain_type', models.CharField(max_length=32)),
                  ('time', models.DateTimeField()),
                  ('operator', models.CharField(max_length=16)),
                  ('note', models.TextField()),
                  ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cmdb.Host')),
              ],
              options={
                  'verbose_name': '\u7ef4\u4fee\u65e5\u5fd7',
                  'verbose_name_plural': '\u7ef4\u4fee\u65e5\u5fd7',
              },
          ),
          migrations.AddField(
              model_name='host',
              name='idc',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cmdb.IDC'),
          ),
      ]
  