# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2019-04-02 06:32
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(primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=30, null=True, verbose_name='\u8d44\u4ea7\u540d\u79f0')),
                ('type', models.CharField(choices=[('1', '\u751f\u4ea7\u8bbe\u5907'), ('2', '\u529e\u516c\u8bbe\u5907'), ('3', '\u6d4b\u8bd5\u8bbe\u5907')], default=('2', '\u529e\u516c\u8bbe\u5907'), max_length=1, verbose_name='\u8d44\u4ea7\u7c7b\u522b')),
                ('assetcode', models.CharField(blank=True, max_length=60, null=True, verbose_name='\u8d44\u4ea7\u7f16\u7801')),
            ],
            options={
                'verbose_name': '\u8d44\u4ea7\u7f16\u7801\u8868',
                'verbose_name_plural': '\u8d44\u4ea7\u7f16\u7801\u8868',
            },
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='\u90e8\u95e8')),
                ('level', models.CharField(choices=[('1', '\u662f'), ('2', '\u5426')], default=('2', '\u5426'), max_length=1, verbose_name='\u662f\u5426\u4e00\u7ea7\u90e8\u95e8')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='demo.Department', verbose_name='\u4e0a\u7ea7\u90e8\u95e8')),
            ],
            options={
                'verbose_name': '\u90e8\u95e8\u8868',
                'verbose_name_plural': '\u90e8\u95e8\u8868',
            },
        ),
        migrations.CreateModel(
            name='Items',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='\u9879\u76ee')),
                ('level', models.CharField(choices=[('1', '\u662f'), ('2', '\u5426')], default=('2', '\u5426'), max_length=1, verbose_name='\u662f\u5426\u4e00\u7ea7\u9879\u76ee')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='demo.Items', verbose_name='\u4e0a\u7ea7\u9879\u76ee')),
            ],
            options={
                'verbose_name': '\u9879\u76ee\u8868',
                'verbose_name_plural': '\u9879\u76ee\u8868',
            },
        ),
        migrations.CreateModel(
            name='Physical',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.GenericIPAddressField(blank=True, null=True, verbose_name='IP\u5730\u5740')),
                ('hostname', models.CharField(blank=True, max_length=200, null=True, verbose_name='\u4e3b\u673a\u540d')),
                ('username', models.CharField(blank=True, max_length=60, null=True, verbose_name='\u7528\u6237\u540d')),
                ('password', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u5bc6\u7801')),
                ('idracip', models.GenericIPAddressField(blank=True, null=True, verbose_name='IDRAC_IP')),
                ('cpunum', models.SmallIntegerField(blank=True, null=True, verbose_name='CPU\u6570\u91cf(\u7269\u7406)')),
                ('cpuphysicalcores', models.SmallIntegerField(blank=True, null=True, verbose_name='\u5355\u4e2aCPU\u7269\u7406\u6838\u5fc3\u6570')),
                ('cpulogicalcores', models.SmallIntegerField(blank=True, null=True, verbose_name='\u903b\u8f91CPU\u6570')),
                ('cpuother', models.CharField(blank=True, max_length=80, null=True, verbose_name='CPU\u5176\u4ed6\u4fe1\u606f')),
                ('memsize', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u5185\u5b58\u5927\u5c0f')),
                ('disksize', models.CharField(blank=True, max_length=400, null=True, verbose_name='\u786c\u76d8\u5927\u5c0f')),
                ('os', models.CharField(blank=True, max_length=50, null=True, verbose_name='\u64cd\u4f5c\u7cfb\u7edf')),
                ('uuid', models.CharField(blank=True, max_length=60, null=True, verbose_name='\u8bc6\u522b\u7801')),
                ('type', models.CharField(blank=True, choices=[('1', '\u7269\u7406\u673a'), ('2', 'VMWARE'), ('3', 'vCenter')], default=('1', '\u7269\u7406\u673a'), max_length=1, null=True, verbose_name='\u8bbe\u5907\u7c7b\u578b')),
                ('status', models.CharField(choices=[('1', '\u5728\u7ebf'), ('2', '\u4e0b\u7ebf'), ('3', '\u6545\u969c')], default=('1', '\u5728\u7ebf'), max_length=1, verbose_name='\u8bbe\u5907\u72b6\u6001')),
                ('position', models.CharField(blank=True, choices=[('1', '\u6df1\u5733\u529e\u516c\u673a\u623f'), ('2', '\u4e0a\u6d77\u529e\u516c\u673a\u623f'), ('3', '\u4e16\u7eaa\u4e92\u8054\u673a\u623f')], default=('1', '\u6df1\u5733\u529e\u516c\u673a\u623f'), max_length=1, null=True, verbose_name='\u4f4d\u7f6e')),
                ('createtime', models.DateField(blank=True, null=True, verbose_name='\u9879\u76ee\u5f00\u59cb\u65f6\u95f4')),
                ('destroytime', models.DateField(blank=True, null=True, verbose_name='\u9879\u76ee\u5b8c\u6210\u65f6\u95f4')),
                ('starttime', models.DateField(blank=True, null=True, verbose_name='\u8bbe\u5907\u542f\u7528\u65f6\u95f4')),
                ('endtime', models.DateField(blank=True, null=True, verbose_name='\u8bbe\u5907\u5f03\u7528\u65f6\u95f4')),
                ('updatetime', models.DateTimeField(auto_now=True, null=True, verbose_name='\u4fee\u6539\u65f6\u95f4')),
                ('assertid', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='demo.Asset', verbose_name='\u8d44\u4ea7\u7f16\u7801')),
                ('department', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='demo.Department', verbose_name='\u6240\u5c5e\u90e8\u95e8')),
                ('item', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='demo.Items', verbose_name='\u6240\u5c5e\u9879\u76ee')),
                ('vcenterid', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='demo.Physical', verbose_name='\u6240\u5c5evCenter')),
            ],
            options={
                'verbose_name': '\u7269\u7406\u670d\u52a1\u5668\u8868',
                'verbose_name_plural': '\u7269\u7406\u670d\u52a1\u5668\u8868',
            },
        ),
        migrations.CreateModel(
            name='Statistics',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')),
                ('proportion', models.CharField(blank=True, max_length=10, null=True, verbose_name='\u9879\u76ee\u6240\u5360\u6bd4\u91cd')),
                ('host', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='demo.Physical', verbose_name='\u7269\u7406\u670d\u52a1\u5668')),
                ('item', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='demo.Items', verbose_name='\u9879\u76ee')),
            ],
            options={
                'verbose_name': '\u7edf\u8ba1\u8868',
                'verbose_name_plural': '\u7edf\u8ba1\u8868',
            },
        ),
        migrations.CreateModel(
            name='Virtual',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.CharField(blank=True, max_length=500, null=True, verbose_name='IP')),
                ('hostname', models.CharField(blank=True, max_length=200, null=True, verbose_name='\u4e3b\u673a\u540d')),
                ('cpunum', models.SmallIntegerField(blank=True, null=True, verbose_name='CPU\u6838\u5fc3\u6570')),
                ('memsize', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u5185\u5b58(MB)')),
                ('disksize', models.CharField(blank=True, max_length=400, null=True, verbose_name='\u78c1\u76d8(GB)')),
                ('os', models.CharField(blank=True, max_length=50, null=True, verbose_name='OS')),
                ('uuid', models.CharField(blank=True, max_length=60, null=True, verbose_name='\u8bc6\u522b\u7801')),
                ('createtime', models.DateField(blank=True, null=True, verbose_name='\u521b\u5efa\u65f6\u95f4')),
                ('destroytime', models.DateField(blank=True, null=True, verbose_name='\u9500\u6bc1\u65f6\u95f4')),
                ('updatetime', models.DateTimeField(auto_now=True, null=True, verbose_name='\u4fee\u6539\u65f6\u95f4')),
                ('department', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='demo.Department', verbose_name='\u6240\u5c5e\u90e8\u95e8')),
                ('host', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='demo.Physical', verbose_name='\u6240\u5c5e\u7269\u7406\u4e3b\u673a')),
                ('item', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='demo.Items', verbose_name='\u6240\u5c5e\u9879\u76ee')),
            ],
            options={
                'verbose_name': '\u865a\u62df\u673a\u8868',
                'verbose_name_plural': '\u865a\u62df\u673a\u8868',
            },
        ),
        migrations.CreateModel(
            name='Weight',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=10, verbose_name='\u7ec4\u4ef6\u7c7b\u578b')),
                ('weight', models.CharField(blank=True, max_length=10, null=True, verbose_name='\u6240\u5360\u6743\u91cd')),
            ],
            options={
                'verbose_name': '\u6743\u91cd\u8868',
                'verbose_name_plural': '\u6743\u91cd\u8868',
            },
        ),
    ]
