# Generated by Django 2.2.10 on 2020-12-01 16:39

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('network', '0001_initial'),
        ('dockerapi', '0002_imageinfo_is_share'),
    ]

    operations = [
        migrations.CreateModel(
            name='Layout',
            fields=[
                ('layout_id', models.UUIDField(default=uuid.UUID('fe6bfac1-ca05-400a-bcef-03d17767fd09'), editable=False, primary_key=True, serialize=False, verbose_name='编排UUID')),
                ('layout_name', models.CharField(max_length=255, verbose_name='环境名称')),
                ('create_user_id', models.IntegerField(verbose_name='用户ID')),
                ('yml_content', models.TextField(verbose_name='编排内容')),
                ('env_content', models.TextField(verbose_name='环境变量')),
                ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_date', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
            ],
            options={
                'db_table': 'layout',
            },
        ),
        migrations.CreateModel(
            name='LayoutData',
            fields=[
                ('layout_user_id', models.UUIDField(default=uuid.UUID('1a25bbd2-8988-4ced-8f9d-1836476048a2'), editable=False, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_user_id', models.IntegerField(verbose_name='用户ID')),
                ('status', models.CharField(max_length=255, verbose_name='状态信息')),
                ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_date', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('layout_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='layout_image.Layout', verbose_name='编排 ID')),
            ],
            options={
                'db_table': 'layout_data',
            },
        ),
        migrations.CreateModel(
            name='LayoutService',
            fields=[
                ('service_id', models.UUIDField(default=uuid.UUID('521622c1-b2a8-4c9f-be13-0f39a7741ed7'), editable=False, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_exposed', models.BooleanField(editable=False, verbose_name='是否暴露')),
                ('exposed_port', models.CharField(max_length=255, verbose_name='暴露随机端口')),
                ('exposed_source_port', models.CharField(max_length=255, verbose_name='暴露原端口')),
                ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_date', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('image_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dockerapi.ImageInfo', verbose_name='Docker ID')),
                ('layout_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='layout_image.Layout', verbose_name='编排 ID')),
            ],
            options={
                'db_table': 'layout_service',
            },
        ),
        migrations.CreateModel(
            name='LayoutServiceNetwork',
            fields=[
                ('layout_service_network_id', models.UUIDField(default=uuid.UUID('ccc7cd57-1e83-47ce-826f-38ca133ed03f'), editable=False, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_date', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('network_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='network.NetWorkInfo', verbose_name='网卡名称')),
                ('service_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='layout_image.LayoutService', verbose_name='服务ID')),
            ],
            options={
                'db_table': 'layout_service_network',
            },
        ),
        migrations.CreateModel(
            name='LayoutServiceContainer',
            fields=[
                ('service_container_id', models.UUIDField(default=uuid.UUID('c0bc3b3d-5a9f-428e-a972-257f2e0710aa'), editable=False, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_id', models.IntegerField(verbose_name='用户ID')),
                ('docker_container_id', models.CharField(max_length=255, verbose_name='Docker容器运行ID')),
                ('container_host', models.CharField(max_length=255, verbose_name='容器漏洞URL')),
                ('container_status', models.CharField(max_length=255, verbose_name='容器当前状态')),
                ('container_port', models.CharField(max_length=255, verbose_name='容器端口')),
                ('container_flag', models.CharField(max_length=255, verbose_name='flag')),
                ('is_check', models.BooleanField(default=False, verbose_name='Flag是否通过')),
                ('is_check_date', models.DateTimeField(null=True, verbose_name='Flag提交时间')),
                ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='容器创建时间，默认为当前时间')),
                ('update_date', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('image_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dockerapi.ImageInfo', verbose_name='镜像ID')),
                ('layout_user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='layout_image.LayoutData', verbose_name='编排环境运行信息')),
                ('service_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='layout_image.LayoutService', verbose_name='服务ID')),
            ],
            options={
                'db_table': 'layout_service_container',
            },
        ),
    ]
