# -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-09-04 07:50
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('CMDB', '0009_auto_20180904_0921'),
    ]

    operations = [
        migrations.CreateModel(
            name='Assets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('assets_type', models.CharField(choices=[('server', '\u7269\u7406\u673a'), ('vmser', '\u865a\u62df\u673a'), ('switch', '\u4ea4\u6362\u673a'), ('route', '\u8def\u7531\u5668'), ('printer', '\u6253\u5370\u673a'), ('scanner', '\u626b\u63cf\u4eea'), ('firewall', '\u9632\u706b\u5899'), ('storage', '\u5b58\u50a8\u8bbe\u5907'), ('wifi', '\u65e0\u7ebf\u8bbe\u5907')], default='server', max_length=100, verbose_name='\u8d44\u4ea7\u7c7b\u578b')),
                ('name', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u8d44\u4ea7\u7f16\u53f7')),
                ('sn', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u8bbe\u5907\u5e8f\u5217\u53f7')),
                ('buy_time', models.DateField(blank=True, null=True, verbose_name='\u8d2d\u4e70\u65f6\u95f4')),
                ('expire_date', models.DateField(blank=True, null=True, verbose_name='\u8fc7\u4fdd\u4fee\u671f')),
                ('buy_user', models.SmallIntegerField(blank=True, null=True, verbose_name='\u8d2d\u4e70\u4eba')),
                ('management_ip', models.GenericIPAddressField(blank=True, null=True, verbose_name='\u7ba1\u7406IP')),
                ('manufacturer', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u5236\u9020\u5546')),
                ('provider', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u4f9b\u8d27\u5546')),
                ('model', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u8d44\u4ea7\u578b\u53f7')),
                ('status', models.SmallIntegerField(blank=True, null=True, verbose_name='\u72b6\u6001')),
                ('put_zone', models.SmallIntegerField(blank=True, null=True, verbose_name='\u653e\u7f6e\u533a\u57df')),
                ('group', models.SmallIntegerField(blank=True, null=True, verbose_name='\u4f7f\u7528\u7ec4')),
                ('business', models.SmallIntegerField(blank=True, null=True, verbose_name='\u4e1a\u52a1\u7c7b\u578b')),
                ('project', models.SmallIntegerField(blank=True, null=True, verbose_name='\u9879\u76ee\u7c7b\u578b')),
                ('host_vars', models.TextField(blank=True, null=True, verbose_name='ansible\u4e3b\u673a\u53d8\u91cf')),
                ('mark', models.TextField(blank=True, null=True, verbose_name='\u8d44\u4ea7\u6807\u793a')),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'db_table': 'opsmanage_assets',
                'verbose_name': '\u603b\u8d44\u4ea7\u8868',
                'verbose_name_plural': '\u603b\u8d44\u4ea7\u8868',
                'permissions': (('can_read_assets', '\u8bfb\u53d6\u8d44\u4ea7\u6743\u9650'), ('can_change_assets', '\u66f4\u6539\u8d44\u4ea7\u6743\u9650'), ('can_add_assets', '\u6dfb\u52a0\u8d44\u4ea7\u6743\u9650'), ('can_delete_assets', '\u5220\u9664\u8d44\u4ea7\u6743\u9650'), ('can_dumps_assets', '\u5bfc\u51fa\u8d44\u4ea7\u6743\u9650')),
            },
        ),
        migrations.CreateModel(
            name='Disk_Assets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device_volume', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u786c\u76d8\u5bb9\u91cf')),
                ('device_status', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u786c\u76d8\u72b6\u6001')),
                ('device_model', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u786c\u76d8\u578b\u53f7')),
                ('device_brand', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u786c\u76d8\u751f\u4ea7\u5546')),
                ('device_serial', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u786c\u76d8\u5e8f\u5217\u53f7')),
                ('device_slot', models.SmallIntegerField(blank=True, null=True, verbose_name='\u786c\u76d8\u63d2\u69fd')),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now_add=True)),
                ('assets', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='CMDB.Assets')),
            ],
            options={
                'verbose_name_plural': '\u78c1\u76d8\u8d44\u4ea7\u8868',
                'db_table': 'opsmanage_disk_assets',
                'verbose_name': '\u78c1\u76d8\u8d44\u4ea7\u8868',
                'permissions': (('can_read_disk_assets', '\u8bfb\u53d6\u78c1\u76d8\u8d44\u4ea7\u6743\u9650'), ('can_change_disk_assets', '\u66f4\u6539\u78c1\u76d8\u8d44\u4ea7\u6743\u9650'), ('can_add_disk_assets', '\u6dfb\u52a0\u78c1\u76d8\u8d44\u4ea7\u6743\u9650'), ('can_delete_disk_assets', '\u5220\u9664\u78c1\u76d8\u8d44\u4ea7\u6743\u9650')),
            },
        ),
        migrations.CreateModel(
            name='Line_Assets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('line_name', models.CharField(max_length=100, unique=True)),
            ],
            options={
                'db_table': 'opsmanage_line_assets',
                'verbose_name': '\u51fa\u53e3\u7ebf\u8def\u8d44\u4ea7\u8868',
                'verbose_name_plural': '\u51fa\u53e3\u7ebf\u8def\u8d44\u4ea7\u8868',
                'permissions': (('can_read_line_assets', '\u8bfb\u53d6\u51fa\u53e3\u7ebf\u8def\u8d44\u4ea7\u6743\u9650'), ('can_change_line_assetss', '\u66f4\u6539\u51fa\u53e3\u7ebf\u8def\u8d44\u4ea7\u6743\u9650'), ('can_add_line_assets', '\u6dfb\u52a0\u51fa\u53e3\u7ebf\u8def\u8d44\u4ea7\u6743\u9650'), ('can_delete_line_assets', '\u5220\u9664\u51fa\u53e3\u7ebf\u8def\u8d44\u4ea7\u6743\u9650')),
            },
        ),
        migrations.CreateModel(
            name='Log_Assets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('assets_id', models.IntegerField(blank=True, default=None, null=True, verbose_name='\u8d44\u4ea7\u7c7b\u578bid')),
                ('assets_user', models.CharField(default=None, max_length=50, verbose_name='\u64cd\u4f5c\u7528\u6237')),
                ('assets_content', models.CharField(default=None, max_length=100, verbose_name='\u540d\u79f0')),
                ('assets_type', models.CharField(default=None, max_length=50)),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='\u6267\u884c\u65f6\u95f4')),
            ],
            options={
                'db_table': 'opsmanage_log_assets',
                'verbose_name': '\u9879\u76ee\u914d\u7f6e\u64cd\u4f5c\u8bb0\u5f55\u8868',
                'verbose_name_plural': '\u9879\u76ee\u914d\u7f6e\u64cd\u4f5c\u8bb0\u5f55\u8868',
            },
        ),
        migrations.CreateModel(
            name='NetworkCard_Assets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device', models.CharField(blank=True, max_length=20, null=True)),
                ('macaddress', models.CharField(blank=True, max_length=64, null=True, verbose_name='MAC')),
                ('ip', models.GenericIPAddressField(blank=True, null=True, verbose_name='IP')),
                ('module', models.CharField(blank=True, max_length=50, null=True)),
                ('mtu', models.CharField(blank=True, max_length=50, null=True)),
                ('active', models.SmallIntegerField(blank=True, null=True, verbose_name='\u662f\u5426\u5728\u7ebf')),
                ('assets', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='CMDB.Assets')),
            ],
            options={
                'db_table': 'opsmanage_networkcard_assets',
                'verbose_name': '\u670d\u52a1\u5668\u7f51\u5361\u8d44\u4ea7\u8868',
                'verbose_name_plural': '\u670d\u52a1\u5668\u7f51\u5361\u8d44\u4ea7\u8868',
            },
        ),
        migrations.CreateModel(
            name='Project_Assets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('project_name', models.CharField(max_length=100, unique=True)),
            ],
            options={
                'db_table': 'opsmanage_project_assets',
                'verbose_name': '\u9879\u76ee\u8d44\u4ea7\u8868',
                'verbose_name_plural': '\u9879\u76ee\u8d44\u4ea7\u8868',
                'permissions': (('can_read_project_assets', '\u8bfb\u53d6\u4ea7\u54c1\u7ebf\u6743\u9650'), ('can_change_project_assets', '\u66f4\u6539\u4ea7\u54c1\u7ebf\u6743\u9650'), ('can_add_project_assets', '\u6dfb\u52a0\u4ea7\u54c1\u7ebf\u6743\u9650'), ('can_delete_project_assets', '\u5220\u9664\u4ea7\u54c1\u7ebf\u6743\u9650')),
            },
        ),
        migrations.CreateModel(
            name='Raid_Assets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('raid_name', models.CharField(max_length=100, unique=True)),
            ],
            options={
                'db_table': 'opsmanage_raid_assets',
                'verbose_name': 'Raid\u8d44\u4ea7\u8868',
                'verbose_name_plural': 'Raid\u8d44\u4ea7\u8868',
                'permissions': (('can_read_raid_assets', '\u8bfb\u53d6Raid\u8d44\u4ea7\u6743\u9650'), ('can_change_raid_assets', '\u66f4\u6539Raid\u8d44\u4ea7\u6743\u9650'), ('can_add_raid_assets', '\u6dfb\u52a0Raid\u8d44\u4ea7\u6743\u9650'), ('can_delete_raid_assets', '\u5220\u9664Raid\u8d44\u4ea7\u6743\u9650')),
            },
        ),
        migrations.CreateModel(
            name='Ram_Assets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device_model', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u5185\u5b58\u578b\u53f7')),
                ('device_volume', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u5185\u5b58\u5bb9\u91cf')),
                ('device_brand', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u5185\u5b58\u751f\u4ea7\u5546')),
                ('device_slot', models.SmallIntegerField(blank=True, null=True, verbose_name='\u5185\u5b58\u63d2\u69fd')),
                ('device_status', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u5185\u5b58\u72b6\u6001')),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now_add=True)),
                ('assets', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='CMDB.Assets')),
            ],
            options={
                'verbose_name_plural': '\u5185\u5b58\u8d44\u4ea7\u8868',
                'db_table': 'opsmanage_ram_assets',
                'verbose_name': '\u5185\u5b58\u8d44\u4ea7\u8868',
                'permissions': (('can_read_ram_assets', '\u8bfb\u53d6\u5185\u5b58\u8d44\u4ea7\u6743\u9650'), ('can_change_ram_assets', '\u66f4\u6539\u5185\u5b58\u8d44\u4ea7\u6743\u9650'), ('can_add_ram_assets', '\u6dfb\u52a0\u5185\u5b58\u8d44\u4ea7\u6743\u9650'), ('can_delete_ram_assets', '\u5220\u9664\u5185\u5b58\u8d44\u4ea7\u6743\u9650')),
            },
        ),
        migrations.CreateModel(
            name='Server_Assets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.CharField(blank=True, max_length=100, null=True, unique=True)),
                ('hostname', models.CharField(blank=True, max_length=100, null=True)),
                ('username', models.CharField(blank=True, max_length=100, null=True)),
                ('passwd', models.CharField(blank=True, max_length=100, null=True)),
                ('sudo_passwd', models.CharField(blank=True, max_length=100, null=True)),
                ('keyfile', models.SmallIntegerField(blank=True, null=True)),
                ('port', models.DecimalField(blank=True, decimal_places=0, max_digits=6, null=True)),
                ('line', models.SmallIntegerField(blank=True, null=True)),
                ('cpu', models.CharField(blank=True, max_length=100, null=True)),
                ('cpu_number', models.SmallIntegerField(blank=True, null=True)),
                ('vcpu_number', models.SmallIntegerField(blank=True, null=True)),
                ('cpu_core', models.SmallIntegerField(blank=True, null=True)),
                ('disk_total', models.CharField(blank=True, max_length=100, null=True)),
                ('ram_total', models.IntegerField(blank=True, null=True)),
                ('kernel', models.CharField(blank=True, max_length=100, null=True)),
                ('selinux', models.CharField(blank=True, max_length=100, null=True)),
                ('swap', models.CharField(blank=True, max_length=100, null=True)),
                ('raid', models.SmallIntegerField(blank=True, null=True)),
                ('system', models.CharField(blank=True, max_length=100, null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now_add=True)),
                ('assets', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='CMDB.Assets')),
            ],
            options={
                'db_table': 'opsmanage_server_assets',
                'verbose_name': '\u670d\u52a1\u5668\u8d44\u4ea7\u8868',
                'verbose_name_plural': '\u670d\u52a1\u5668\u8d44\u4ea7\u8868',
                'permissions': (('can_read_server_assets', '\u8bfb\u53d6\u670d\u52a1\u5668\u8d44\u4ea7\u6743\u9650'), ('can_change_server_assets', '\u66f4\u6539\u670d\u52a1\u5668\u8d44\u4ea7\u6743\u9650'), ('can_add_server_assets', '\u6dfb\u52a0\u670d\u52a1\u5668\u8d44\u4ea7\u6743\u9650'), ('can_delete_server_assets', '\u5220\u9664\u670d\u52a1\u5668\u8d44\u4ea7\u6743\u9650')),
            },
        ),
        migrations.CreateModel(
            name='Service_Assets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('service_name', models.CharField(max_length=100)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='service_assets', to='CMDB.Project_Assets')),
            ],
            options={
                'verbose_name_plural': '\u4e1a\u52a1\u5206\u7ec4\u8868',
                'db_table': 'opsmanage_service_assets',
                'verbose_name': '\u4e1a\u52a1\u5206\u7ec4\u8868',
                'permissions': (('can_read_service_assets', '\u8bfb\u53d6\u4e1a\u52a1\u8d44\u4ea7\u6743\u9650'), ('can_change_service_assets', '\u66f4\u6539\u4e1a\u52a1\u8d44\u4ea7\u6743\u9650'), ('can_add_service_assets', '\u6dfb\u52a0\u4e1a\u52a1\u8d44\u4ea7\u6743\u9650'), ('can_delete_service_assets', '\u5220\u9664\u4e1a\u52a1\u8d44\u4ea7\u6743\u9650')),
            },
        ),
        migrations.CreateModel(
            name='Zone_Assets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('zone_name', models.CharField(max_length=100, unique=True)),
                ('zone_contact', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u673a\u623f\u8054\u7cfb\u4eba')),
                ('zone_number', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u8054\u7cfb\u4eba\u53f7\u7801')),
                ('zone_network', models.CharField(blank=True, max_length=100, null=True, verbose_name='\u673a\u623f\u7f51\u6bb5')),
            ],
            options={
                'db_table': 'opsmanage_zone_assets',
                'verbose_name': '\u673a\u623f\u8d44\u4ea7\u8868',
                'verbose_name_plural': '\u673a\u623f\u8d44\u4ea7\u8868',
                'permissions': (('can_read_zone_assets', '\u8bfb\u53d6\u673a\u623f\u8d44\u4ea7\u6743\u9650'), ('can_change_zone_assets', '\u66f4\u6539\u673a\u623f\u8d44\u4ea7\u6743\u9650'), ('can_add_zone_assets', '\u6dfb\u52a0\u673a\u623f\u8d44\u4ea7\u6743\u9650'), ('can_delete_zone_assets', '\u5220\u9664\u673a\u623f\u8d44\u4ea7\u6743\u9650')),
            },
        ),
        migrations.AlterUniqueTogether(
            name='service_assets',
            unique_together=set([('project', 'service_name')]),
        ),
        migrations.AlterUniqueTogether(
            name='ram_assets',
            unique_together=set([('assets', 'device_slot')]),
        ),
        migrations.AlterUniqueTogether(
            name='networkcard_assets',
            unique_together=set([('assets', 'macaddress')]),
        ),
        migrations.AlterUniqueTogether(
            name='disk_assets',
            unique_together=set([('assets', 'device_slot')]),
        ),
    ]
