# Generated by Django 2.0.1 on 2018-02-10 16:32

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='CMDBLogs',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('log_content', models.CharField(max_length=500, verbose_name='日志内容')),
                ('log_type', models.CharField(max_length=50, verbose_name='日志类型')),
                ('log_datetime', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('log_user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='cmdblog_user', to=settings.AUTH_USER_MODEL, verbose_name='操作人')),
            ],
            options={
                'db_table': 'cmdb_logs',
            },
        ),
        migrations.CreateModel(
            name='Domain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('domain', models.CharField(max_length=100, unique=True, verbose_name='域名 *')),
                ('register_platform', models.CharField(max_length=50, verbose_name='注册平台 *')),
                ('platform_account', models.CharField(max_length=50, verbose_name='注册平台账号 *')),
                ('platform_password', models.CharField(max_length=1024, null=True, verbose_name='注册平台密码')),
                ('register_date', models.DateField(null=True, verbose_name='注册日期')),
                ('purchaser', models.CharField(max_length=50, null=True, verbose_name='购买人')),
                ('contact_people', models.CharField(max_length=50, null=True, verbose_name='业务联系人')),
                ('project_group', models.CharField(max_length=50, null=True, verbose_name='项目组')),
                ('owner', models.CharField(max_length=100, null=True, verbose_name='持有者')),
                ('bind_email', models.EmailField(max_length=254, verbose_name='绑定邮箱 *')),
                ('expire_date', models.DateField(verbose_name='到期日期 *')),
                ('manager_telephone', models.CharField(max_length=20, null=True, verbose_name='域名联系人手机')),
                ('auto_renew', models.IntegerField(choices=[(1, '是'), (0, '否')], default=0, verbose_name='自动续费 *')),
                ('status', models.IntegerField(choices=[(1, '已启用'), (0, '已停用'), (2, '处理中'), (3, '已吊销')], default=1, verbose_name='状态 *')),
                ('describe', models.CharField(max_length=500, null=True, verbose_name='备注')),
            ],
            options={
                'db_table': 'cmdb_domain',
            },
        ),
        migrations.CreateModel(
            name='FixedAssets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('asset_number', models.CharField(max_length=50, unique=True, verbose_name='资产编号 *')),
                ('asset_type', models.IntegerField(choices=[(1, '服务器'), (2, '存储'), (99, '其他')], verbose_name='资产类型 *')),
                ('asset_brand', models.IntegerField(choices=[(1, 'DELL'), (2, 'HP'), (99, '其他')], verbose_name='品牌 *')),
                ('asset_model_number', models.CharField(max_length=100, verbose_name='型号 *')),
                ('asset_serial_number', models.CharField(max_length=50, verbose_name='设备序列号 *')),
                ('purchased_date', models.DateField(null=True, verbose_name='购买日期')),
                ('overdue_insurance_date', models.DateField(null=True, verbose_name='过保日期')),
                ('applicant', models.CharField(max_length=50, verbose_name='申请人 *')),
                ('applicant_date', models.DateField(null=True, verbose_name='申请日期')),
                ('project', models.CharField(max_length=50, verbose_name='所属项目 *')),
                ('cpu_model_number', models.CharField(max_length=50, null=True, verbose_name='CPU型号')),
                ('cpu_kernel_num', models.IntegerField(verbose_name='CPU核数 *')),
                ('memory_model_number', models.CharField(max_length=50, null=True, verbose_name='内存型号')),
                ('memory_size', models.IntegerField(verbose_name='内存容量 *')),
                ('ext_ip', models.GenericIPAddressField(null=True, verbose_name='公网IP')),
                ('int_ip', models.GenericIPAddressField(null=True, verbose_name='内网IP')),
                ('os_version', models.CharField(max_length=50, null=True, verbose_name='OS版本')),
                ('hostname', models.CharField(max_length=50, null=True, verbose_name='主机名')),
                ('disk_number', models.IntegerField(null=True, verbose_name='磁盘个数')),
                ('disk_size', models.CharField(max_length=50, null=True, verbose_name='磁盘容量')),
                ('raid_type', models.CharField(max_length=50, null=True, verbose_name='raid类型')),
                ('asset_manager', models.CharField(max_length=50, null=True, verbose_name='负责人')),
                ('idc', models.CharField(max_length=50, null=True, verbose_name='所在位置')),
                ('describe', models.CharField(max_length=500, null=True, verbose_name='备注')),
                ('status', models.IntegerField(choices=[(1, '已上线'), (0, '已下线'), (2, '维修中'), (3, '已入库'), (4, '未使用')], default=4, verbose_name='状态 *')),
            ],
            options={
                'db_table': 'cmdb_fixed_assets',
            },
        ),
        migrations.CreateModel(
            name='NetworkDevice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('asset_number', models.CharField(max_length=50, unique=True, verbose_name='资产编号 *')),
                ('asset_type', models.IntegerField(choices=[(1, '路由器'), (2, '交换机'), (3, '防火墙'), (4, '三层交换机'), (99, '其他')], verbose_name='资产类型 *')),
                ('asset_brand', models.IntegerField(choices=[(1, 'H3C'), (2, 'Cisco'), (3, 'TP-Linuk'), (4, '天融信'), (5, '华为'), (6, 'Juniper'), (99, '其他')], verbose_name='品牌 *')),
                ('asset_model_number', models.CharField(max_length=100, verbose_name='型号 *')),
                ('asset_serial_number', models.CharField(max_length=50, verbose_name='设备序列号 *')),
                ('purchased_date', models.DateField(null=True, verbose_name='购买日期')),
                ('overdue_insurance_date', models.DateField(verbose_name='过保日期 *')),
                ('applicant', models.CharField(max_length=50, verbose_name='申请人 *')),
                ('applicant_date', models.DateField(null=True, verbose_name='申请日期')),
                ('port_num', models.IntegerField(null=True, verbose_name='端口数')),
                ('port_type', models.CharField(max_length=50, null=True, verbose_name='端口类型')),
                ('memory', models.IntegerField(null=True, verbose_name='内存')),
                ('flash_memory', models.IntegerField(null=True, verbose_name='闪存')),
                ('backplane_bandwidth', models.CharField(max_length=50, null=True, verbose_name='背板带宽')),
                ('Packet_forwarding_rate', models.CharField(max_length=50, null=True, verbose_name='包转发率')),
                ('manager_ip', models.GenericIPAddressField(verbose_name='管理IP *')),
                ('asset_manager', models.CharField(max_length=50, null=True, verbose_name='负责人')),
                ('idc', models.CharField(max_length=50, null=True, verbose_name='所在位置')),
                ('describe', models.CharField(max_length=500, null=True, verbose_name='备注')),
                ('status', models.IntegerField(choices=[(1, '已上线'), (0, '已下线'), (2, '维修中'), (3, '已入库'), (4, '未使用')], default=4, verbose_name='状态 *')),
            ],
            options={
                'db_table': 'cmdb_network_device',
            },
        ),
    ]
