# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-21 01:31
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, null=True, verbose_name='\u4e3b\u673aIP')),
                ('other_ip', models.CharField(blank=True, max_length=255, null=True, verbose_name='\u5176\u4ed6IP')),
                ('hostname', models.CharField(max_length=128, unique=True, verbose_name='\u4e3b\u673a\u540d')),
                ('brand', models.CharField(blank=True, max_length=64, null=True, verbose_name='\u786c\u4ef6\u5382\u5546\u578b\u53f7')),
                ('cpu', models.CharField(blank=True, max_length=64, null=True, verbose_name='CPU')),
                ('memory', models.CharField(blank=True, max_length=128, null=True, verbose_name='\u5185\u5b58')),
                ('disk', models.CharField(blank=True, max_length=1024, null=True, verbose_name='\u786c\u76d8')),
                ('system_type', models.CharField(blank=True, max_length=32, null=True, verbose_name='\u7cfb\u7edf\u7c7b\u578b')),
                ('status', models.IntegerField(blank=True, choices=[(1, '\u8fd0\u884c'), (2, '\u5173\u673a'), (3, '\u7ef4\u4fee'), (4, '\u4e0b\u67b6')], default=1, null=True, verbose_name='\u673a\u5668\u72b6\u6001')),
                ('sn', models.CharField(blank=True, max_length=128, null=True, verbose_name='SN\u7801')),
                ('date_added', models.DateTimeField(auto_now=True, null=True)),
                ('is_active', models.BooleanField(default=True, verbose_name='\u662f\u5426\u6fc0\u6d3b')),
                ('comment', models.CharField(blank=True, max_length=128, null=True, verbose_name='\u5907\u6ce8')),
            ],
        ),
        migrations.CreateModel(
            name='AssetGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=80, unique=True)),
                ('comment', models.CharField(blank=True, max_length=160, null=True)),
            ],
        ),
        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')),
                ('linkman', models.CharField(blank=True, default='', max_length=16, null=True, verbose_name='\u8054\u7cfb\u4eba')),
                ('phone', models.CharField(blank=True, default='', max_length=32, null=True, verbose_name='\u8054\u7cfb\u7535\u8bdd')),
                ('address', models.CharField(blank=True, default='', max_length=128, null=True, verbose_name='\u673a\u623f\u5730\u5740')),
                ('network', models.TextField(blank=True, default='', null=True, verbose_name='IP\u5730\u5740\u6bb5')),
                ('operator', models.CharField(blank=True, default='', max_length=32, null=True, verbose_name='\u8fd0\u8425\u5546')),
                ('comment', models.CharField(blank=True, default='', max_length=128, null=True, verbose_name='\u5907\u6ce8')),
            ],
            options={
                'verbose_name': 'IDC',
                'verbose_name_plural': 'IDC',
            },
        ),
        migrations.AddField(
            model_name='asset',
            name='groups',
            field=models.ManyToManyField(blank=True, to='asset.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='asset.IDC', verbose_name='\u673a\u623f'),
        ),
    ]
