# Generated by Django 2.2.16 on 2021-03-07 07:28

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('lancers', '0018_opportunity_service'),
    ]

    operations = [
        migrations.CreateModel(
            name='CategoryLevel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='作成日時')),
                ('last_updated_at', models.DateTimeField(auto_now=True, verbose_name='最終更新日時')),
                ('is_active', models.BooleanField(default=True, verbose_name='有効')),
                ('sync_id', models.IntegerField(blank=True, null=True, verbose_name='連携ID')),
                ('level', models.IntegerField(choices=[(3, '高い'), (2, '普通'), (1, '低い')], verbose_name='技術レベル')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lancers.Category', verbose_name='カテゴリ')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='service',
            name='version',
            field=models.IntegerField(default=0, verbose_name='バージョン'),
        ),
        migrations.CreateModel(
            name='ClientProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='作成日時')),
                ('last_updated_at', models.DateTimeField(auto_now=True, verbose_name='最終更新日時')),
                ('is_active', models.BooleanField(default=True, verbose_name='有効')),
                ('sync_id', models.IntegerField(blank=True, null=True, verbose_name='連携ID')),
                ('level_comprehensive', models.IntegerField(blank=True, choices=[(3, '高い'), (2, '普通'), (1, '低い')], null=True, verbose_name='技術レベル')),
                ('frequency', models.IntegerField(blank=True, choices=[(3, '頻繁'), (2, '普通'), (1, '少ない')], null=True, verbose_name='連絡頻度')),
                ('requiring_camera', models.BooleanField(verbose_name='カメラOn')),
                ('github_url', models.URLField(blank=True, null=True, verbose_name='GitHub')),
                ('created_by', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='lancers_clientprofile_created_by', to=settings.AUTH_USER_MODEL, verbose_name='作成者')),
                ('last_updated_by', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='lancers_clientprofile_last_updated_by', to=settings.AUTH_USER_MODEL, verbose_name='最終更新者')),
                ('level_services', models.ManyToManyField(blank=True, through='lancers.CategoryLevel', to='lancers.Category')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='categorylevel',
            name='client_profile',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lancers.ClientProfile', verbose_name='クライアント'),
        ),
        migrations.AddField(
            model_name='categorylevel',
            name='created_by',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='lancers_categorylevel_created_by', to=settings.AUTH_USER_MODEL, verbose_name='作成者'),
        ),
        migrations.AddField(
            model_name='categorylevel',
            name='last_updated_by',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='lancers_categorylevel_last_updated_by', to=settings.AUTH_USER_MODEL, verbose_name='最終更新者'),
        ),
        migrations.AddField(
            model_name='client',
            name='client_profile',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='lancers.ClientProfile', verbose_name='クライアントプロファイル'),
        ),
    ]
