# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2018-07-31 15:07
from __future__ import unicode_literals

import datetime
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Business',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=30, verbose_name='业务名称')),
                ('status', models.SmallIntegerField(choices=[(1, '正常'), (2, '下线')], verbose_name='业务状态')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '业务线管理',
                'verbose_name_plural': '业务线管理',
            },
        ),
        migrations.CreateModel(
            name='Servers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.GenericIPAddressField(verbose_name='主机IP')),
                ('port', models.IntegerField(verbose_name='主机端口')),
                ('user', models.CharField(max_length=30, verbose_name='ssh用户')),
                ('user_pass', models.CharField(max_length=30, verbose_name='ssh密码')),
                ('host_name', models.CharField(max_length=50, null=True, verbose_name='主机名')),
                ('memory', models.IntegerField(verbose_name='主机内存')),
                ('cpu', models.IntegerField(verbose_name='主机CPU')),
                ('raid', models.SmallIntegerField(verbose_name='RAID种类')),
                ('disk', models.IntegerField(verbose_name='磁盘大小')),
                ('status', models.SmallIntegerField(verbose_name='主机状态')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '主机管理',
                'verbose_name_plural': '主机管理',
            },
        ),
        migrations.CreateModel(
            name='Zones',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=30, verbose_name='机房名称')),
                ('city', models.IntegerField(choices=[(1, '杭州'), (2, '北京'), (3, '上海')], verbose_name='机房地区')),
                ('status', models.SmallIntegerField(choices=[(1, '正常'), (2, '下线')], verbose_name='机房状态')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '机房管理',
                'verbose_name_plural': '机房管理',
            },
        ),
        migrations.AddField(
            model_name='servers',
            name='zone',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cmdb.Zones'),
        ),
    ]
