# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-21 09:52
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='Asset',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.CharField(blank=True, max_length=32, verbose_name='\u4e3b\u673aIP')),
                ('other_ip', models.CharField(blank=True, max_length=255, verbose_name='\u5176\u4ed6IP')),
                ('remote_card_ip', models.CharField(blank=True, max_length=16, verbose_name='\u8fdc\u63a7\u5361IP')),
                ('hostname', models.CharField(blank=True, max_length=128, unique=True, verbose_name='\u4e3b\u673a\u540d')),
                ('port', models.IntegerField(blank=True, verbose_name='\u7aef\u53e3\u53f7')),
                ('username', models.CharField(blank=True, max_length=16, verbose_name='\u7ba1\u7406\u7528\u6237\u540d')),
                ('password', models.CharField(blank=True, max_length=256, verbose_name='\u5bc6\u7801')),
                ('mac_addr', models.CharField(blank=True, max_length=20, unique=True, verbose_name='MAC\u5730\u5740')),
                ('brand', models.CharField(blank=True, max_length=64, verbose_name='\u786c\u4ef6\u5382\u5546\u578b\u53f7')),
                ('cpu', models.CharField(blank=True, max_length=64, verbose_name='CPU')),
                ('memory', models.CharField(blank=True, max_length=128, verbose_name='\u5185\u5b58')),
                ('disk', models.CharField(blank=True, max_length=1024, verbose_name='\u786c\u76d8')),
                ('os', models.CharField(blank=True, max_length=128, verbose_name='\u7cfb\u7edf\u4fe1\u606f')),
                ('cabinet_no', models.CharField(blank=True, max_length=32, verbose_name='\u673a\u67dc\u53f7')),
                ('cabinet_pos', models.IntegerField(blank=True, verbose_name='\u673a\u5668\u4f4d\u7f6e')),
                ('number', models.CharField(blank=True, max_length=32, unique=True, verbose_name='\u8d44\u4ea7\u7f16\u53f7')),
                ('sn', models.CharField(blank=True, max_length=128, unique=True, verbose_name='SN\u7f16\u53f7')),
                ('created_by', models.CharField(blank=True, max_length=32, verbose_name='\u521b\u5efa\u8005')),
                ('is_active', models.BooleanField(default=True, verbose_name='\u662f\u5426\u6fc0\u6d3b')),
                ('date_added', models.DateTimeField(auto_now=True, null=True)),
                ('comment', models.CharField(blank=True, max_length=128, verbose_name='\u5907\u6ce8')),
            ],
            options={
                'db_table': 'asset',
            },
        ),
        migrations.CreateModel(
            name='AssetExtend',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='AssetGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
                ('created_by', models.CharField(blank=True, max_length=32, verbose_name='\u521b\u5efa\u8005')),
                ('comment', models.CharField(blank=True, max_length=128, null=True)),
            ],
            options={
                'db_table': 'assetgroup',
            },
        ),
        migrations.CreateModel(
            name='IDC',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, verbose_name='\u673a\u623f\u540d\u79f0')),
                ('bandwidth', models.CharField(blank=True, max_length=32, verbose_name='\u673a\u623f\u5e26\u5bbd')),
                ('contact', models.CharField(blank=True, max_length=16, verbose_name='\u8054\u7cfb\u4eba')),
                ('phone', models.CharField(blank=True, max_length=32, verbose_name='\u8054\u7cfb\u7535\u8bdd')),
                ('address', models.CharField(blank=True, max_length=128, verbose_name='\u673a\u623f\u5730\u5740')),
                ('network', models.TextField(blank=True, verbose_name='IP\u5730\u5740\u6bb5')),
                ('date_added', models.DateField(auto_now=True, null=True)),
                ('operator', models.CharField(blank=True, max_length=32, verbose_name='\u8fd0\u8425\u5546')),
                ('created_by', models.CharField(blank=True, max_length=32, verbose_name='\u521b\u5efa\u8005')),
                ('comment', models.CharField(blank=True, max_length=128, verbose_name='\u5907\u6ce8')),
            ],
            options={
                'db_table': 'idc',
                'verbose_name': 'IDC\u673a\u623f',
                'verbose_name_plural': 'IDC\u673a\u623f',
            },
        ),
        migrations.AddField(
            model_name='asset',
            name='env',
            field=models.ManyToManyField(blank=True, related_name='asset_env_extend', to='assets.AssetExtend', verbose_name='\u6240\u5c5e\u4e3b\u673a\u7ec4\u73af\u5883'),
        ),
        migrations.AddField(
            model_name='asset',
            name='group',
            field=models.ManyToManyField(blank=True, to='assets.AssetGroup', verbose_name='\u6240\u5c5e\u4e3b\u673a\u7ec4'),
        ),
        migrations.AddField(
            model_name='asset',
            name='idc',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='assets.IDC', verbose_name='\u673a\u623f'),
        ),
        migrations.AddField(
            model_name='asset',
            name='status',
            field=models.ManyToManyField(blank=True, related_name='asset_status_extend', to='assets.AssetExtend', verbose_name='\u673a\u5668\u72b6\u6001'),
        ),
        migrations.AddField(
            model_name='asset',
            name='type',
            field=models.ManyToManyField(blank=True, related_name='asset_type_extend', to='assets.AssetExtend', verbose_name='\u673a\u5668\u7c7b\u578b'),
        ),
    ]
