# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-07-20 16: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='App',
            fields=[
                ('app_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=200)),
                ('version', models.CharField(max_length=100, null=True)),
                ('port', models.IntegerField(null=True)),
                ('language', models.CharField(max_length=100, null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='AssetFClass',
            fields=[
                ('assetfclass_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50, unique=True)),
                ('remarks', models.TextField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Assets',
            fields=[
                ('assets_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100, unique=True)),
                ('sn', models.CharField(max_length=100, null=True)),
                ('manufactor', models.CharField(max_length=100, null=True)),
                ('purchasing_date', models.DateField(null=True)),
                ('warranty_date', models.DateField(null=True)),
                ('price', models.FloatField(null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='AssetsAdmin',
            fields=[
                ('assets_admin_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('tel', models.CharField(max_length=20, unique=True)),
                ('qq', models.BigIntegerField(null=True)),
                ('email', models.CharField(max_length=200, null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='AssetSClass',
            fields=[
                ('assetsclass_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50, unique=True)),
                ('remarks', models.TextField(null=True)),
                ('assetfclass_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='silas.AssetFClass')),
            ],
        ),
        migrations.CreateModel(
            name='Business',
            fields=[
                ('business_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100, unique=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('superior_business', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='silas.Business')),
            ],
        ),
        migrations.CreateModel(
            name='CPU',
            fields=[
                ('CPU_id', models.AutoField(primary_key=True, serialize=False)),
                ('model', models.CharField(max_length=200)),
                ('sn', models.CharField(max_length=100, null=True, unique=True)),
                ('corenum', models.IntegerField()),
                ('nowspeed', models.FloatField()),
                ('slot', models.CharField(max_length=64, null=True)),
                ('manufactor', models.CharField(max_length=100, null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('asset_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='silas.Assets')),
            ],
        ),
        migrations.CreateModel(
            name='Database',
            fields=[
                ('database_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=200)),
                ('version', models.CharField(max_length=100, null=True)),
                ('port', models.IntegerField(null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('asset_id', models.ManyToManyField(to='silas.Assets')),
            ],
        ),
        migrations.CreateModel(
            name='Disk',
            fields=[
                ('disk_id', models.AutoField(primary_key=True, serialize=False)),
                ('model', models.CharField(max_length=200)),
                ('type', models.CharField(max_length=64, null=True)),
                ('sn', models.CharField(max_length=100, null=True, unique=True)),
                ('capacity', models.IntegerField()),
                ('nowspeed', models.IntegerField(null=True)),
                ('slot', models.CharField(max_length=64, null=True)),
                ('interface', models.CharField(max_length=64, null=True)),
                ('manufactor', models.CharField(max_length=100, null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('asset_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='silas.Assets')),
            ],
        ),
        migrations.CreateModel(
            name='MEM',
            fields=[
                ('MEM_id', models.AutoField(primary_key=True, serialize=False)),
                ('model', models.CharField(max_length=200)),
                ('sn', models.CharField(max_length=100, null=True, unique=True)),
                ('capacity', models.IntegerField()),
                ('nowspeed', models.IntegerField(null=True)),
                ('slot', models.CharField(max_length=64, null=True)),
                ('interface', models.CharField(max_length=64, null=True)),
                ('manufactor', models.CharField(max_length=100, null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('asset_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='silas.Assets')),
            ],
        ),
        migrations.CreateModel(
            name='Middleware',
            fields=[
                ('middleware_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=200)),
                ('version', models.CharField(max_length=100, null=True)),
                ('port', models.IntegerField(null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('asset_id', models.ManyToManyField(to='silas.Assets')),
            ],
        ),
        migrations.CreateModel(
            name='Net',
            fields=[
                ('net_id', models.AutoField(primary_key=True, serialize=False)),
                ('model', models.CharField(max_length=200)),
                ('sn', models.CharField(max_length=100, null=True, unique=True)),
                ('name', models.CharField(max_length=65, null=True)),
                ('nowspeed', models.IntegerField(null=True)),
                ('mac', models.CharField(max_length=64, null=True)),
                ('ip', models.GenericIPAddressField(null=True)),
                ('manufactor', models.CharField(max_length=100, null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('asset_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='silas.Assets')),
            ],
        ),
        migrations.CreateModel(
            name='OS',
            fields=[
                ('os_id', models.AutoField(primary_key=True, serialize=False)),
                ('os_class', models.CharField(choices=[('Linux', 'Linux'), ('UNIX', 'UNIX'), ('Windows', 'Windows')], max_length=100)),
                ('version', models.CharField(max_length=100)),
                ('bit', models.CharField(choices=[('X86', 'X86'), ('X64', 'X64')], max_length=50)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('asset_id', models.ManyToManyField(to='silas.Assets')),
            ],
        ),
        migrations.CreateModel(
            name='OtherPart',
            fields=[
                ('other_part_id', models.AutoField(primary_key=True, serialize=False)),
                ('model', models.CharField(max_length=200)),
                ('sn', models.CharField(max_length=100, null=True, unique=True)),
                ('name', models.CharField(max_length=65, null=True)),
                ('manufactor', models.CharField(max_length=100, null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('asset_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='silas.Assets')),
            ],
        ),
        migrations.CreateModel(
            name='Pact',
            fields=[
                ('pacr_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=200)),
                ('sn', models.CharField(max_length=100, unique=True)),
                ('price', models.IntegerField(null=True)),
                ('file_path', models.CharField(max_length=200, null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('room_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100, unique=True)),
                ('idcadmin', models.CharField(max_length=100, null=True)),
                ('tel', models.CharField(max_length=20, null=True)),
                ('qq', models.BigIntegerField(null=True)),
                ('email', models.CharField(max_length=200, null=True)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Seat',
            fields=[
                ('seat_id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('remarks', models.TextField(null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('seat_room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='silas.Room')),
            ],
        ),
        migrations.AddField(
            model_name='assets',
            name='assets_admin',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assets_set', to='silas.AssetsAdmin'),
        ),
        migrations.AddField(
            model_name='assets',
            name='assetsclass_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='silas.AssetSClass'),
        ),
        migrations.AddField(
            model_name='assets',
            name='business',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assets_set', to='silas.Business'),
        ),
        migrations.AddField(
            model_name='assets',
            name='pact',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assets_set', to='silas.Pact'),
        ),
        migrations.AddField(
            model_name='assets',
            name='seat',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assets_set', to='silas.Seat'),
        ),
        migrations.AddField(
            model_name='app',
            name='asset_id',
            field=models.ManyToManyField(to='silas.Assets'),
        ),
        migrations.AlterUniqueTogether(
            name='seat',
            unique_together=set([('seat_room', 'name')]),
        ),
        migrations.AlterUniqueTogether(
            name='os',
            unique_together=set([('os_class', 'version', 'bit')]),
        ),
        migrations.AlterUniqueTogether(
            name='middleware',
            unique_together=set([('name', 'version', 'port')]),
        ),
        migrations.AlterUniqueTogether(
            name='database',
            unique_together=set([('name', 'version', 'port')]),
        ),
        migrations.AlterUniqueTogether(
            name='app',
            unique_together=set([('name', 'version', 'port', 'language')]),
        ),
    ]
