# Generated by Django 2.2.5 on 2020-02-05 01:24

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import posts.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('slug', models.SlugField(unique=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Causediv',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('slug', models.SlugField(unique=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Checklist_A',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('slug', models.SlugField(unique=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255)),
                ('text', models.TextField()),
                ('is_publick', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Discoverydiv',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('slug', models.SlugField(unique=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Equipment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='装置名称')),
                ('slug', models.SlugField(unique=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Factordiv',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('slug', models.SlugField(unique=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Severity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('slug', models.SlugField(unique=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='State',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('slug', models.SlugField(unique=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Subcategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='小区分')),
                ('slug', models.SlugField(unique=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Reply',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255)),
                ('text', models.TextField()),
                ('is_public', models.BooleanField(default=False)),
                ('target', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='posts.Comment')),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('discoverydate', models.CharField(blank=True, help_text='※必須', max_length=10, null=True, verbose_name='発見日')),
                ('overview', models.TextField(help_text='※必須', verbose_name='発見概要')),
                ('content', models.TextField(help_text='※必須', verbose_name='発見内容')),
                ('cause', models.TextField(blank=True, default='', verbose_name='詳細原因')),
                ('counterplan', models.TextField(blank=True, default='', verbose_name='処置内容(対策)')),
                ('evidence', models.TextField(blank=True, default='', help_text='（チェックリストのエビデンス登録）', verbose_name='エビデンス')),
                ('url_link', models.URLField(blank=True, help_text='※任意', null=True, verbose_name='URLリンク')),
                ('file_link', models.CharField(blank=True, help_text='※任意\u3000パスの存在はチェックしていません。正しいパスを入力してください。', max_length=512, null=True, verbose_name='関連資料の置き場（共有ファイルサーバーのパス）')),
                ('completiondate', models.CharField(blank=True, max_length=10, null=True, verbose_name='完了日')),
                ('author', models.CharField(blank=True, max_length=256, null=True, verbose_name='登録者')),
                ('published_date', models.DateTimeField(blank=True, null=True)),
                ('created_at', models.DateField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('published_at', models.DateTimeField(blank=True, null=True)),
                ('is_public', models.BooleanField(default=True)),
                ('category', models.ForeignKey(help_text='※必須', on_delete=django.db.models.deletion.PROTECT, to='posts.Category', verbose_name='大分類')),
                ('causediv', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='posts.Causediv', verbose_name='原因区分')),
                ('checklist', models.ManyToManyField(blank=True, to='posts.Checklist_A', verbose_name='チェックリスト')),
                ('discoverydiv', models.ForeignKey(help_text='※必須', on_delete=django.db.models.deletion.PROTECT, to='posts.Discoverydiv', verbose_name='発見カテゴリ')),
                ('equipment', models.ForeignKey(help_text='※必須', on_delete=django.db.models.deletion.PROTECT, to='posts.Equipment', verbose_name='機種名称')),
                ('severity', models.ForeignKey(help_text='※必須', on_delete=django.db.models.deletion.PROTECT, to='posts.Severity', verbose_name='重大度')),
                ('state', models.ForeignKey(help_text='※必須', on_delete=django.db.models.deletion.PROTECT, to='posts.State', verbose_name='状態')),
                ('subcategory', models.ForeignKey(help_text='※必須', on_delete=django.db.models.deletion.PROTECT, to='posts.Subcategory', verbose_name='小分類')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='MarketSpillover',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reason', models.TextField(blank=True, default='', verbose_name='理由')),
                ('factor', models.CharField(blank=True, help_text='(「作業者」、「部品」、「設計」、「設備」、「作業指導」等)', max_length=25, null=True, verbose_name='要因')),
                ('shippingdate_start', models.CharField(blank=True, max_length=10, null=True, verbose_name='対象品出荷開始日')),
                ('shippingdate_end', models.CharField(blank=True, max_length=10, null=True, verbose_name='対象品出荷終了日')),
                ('shipping', models.CharField(blank=True, max_length=255, null=True, verbose_name='出荷先')),
                ('serial_start', models.CharField(blank=True, max_length=255, null=True, verbose_name='対象製造番号開始')),
                ('serial_end', models.CharField(blank=True, max_length=255, null=True, verbose_name='対象製造番号終了')),
                ('targetno', models.CharField(blank=True, max_length=255, null=True, verbose_name='対象台数')),
                ('influence', models.TextField(blank=True, default='', verbose_name='他機種への影響')),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='posts.Post')),
            ],
        ),
        migrations.CreateModel(
            name='ContentImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content_image', models.ImageField(upload_to='', verbose_name='画像ファイル')),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='posts.Post')),
            ],
        ),
        migrations.CreateModel(
            name='ContentFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content_file', models.FileField(upload_to='', verbose_name='添付ファイル')),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='posts.Post')),
            ],
        ),
        migrations.AddField(
            model_name='comment',
            name='target',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='posts.Post'),
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', posts.models.CustomUserManager()),
            ],
        ),
    ]
