# Generated by Django 3.0.7 on 2020-07-10 07:35

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('system', '0022_auto_20200710_1535'),
        ('employee', '0003_auto_20200710_1139'),
    ]

    operations = [
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('code', models.CharField(blank=True, max_length=30, null=True, verbose_name='编号')),
                ('photo', models.CharField(blank=True, default='', max_length=1000, null=True, verbose_name='证件照')),
                ('remember_code', models.CharField(blank=True, max_length=30, null=True, verbose_name='易记码')),
                ('gender', models.CharField(choices=[('男', '男'), ('女', '女')], default='男', max_length=50, verbose_name='性别')),
                ('landline', models.CharField(blank=True, max_length=100, null=True, verbose_name='座机')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='邮箱')),
                ('birth', models.DateField(blank=True, null=True, verbose_name='出生日期')),
                ('ID_number', models.CharField(blank=True, max_length=100, null=True, verbose_name='身份证号')),
                ('is_onjob', models.BooleanField(default=True, verbose_name='是否在职')),
                ('is_fulltime', models.BooleanField(default=True, verbose_name='是否专职')),
                ('is_payinsurance', models.BooleanField(default=True, verbose_name='是否缴纳保险')),
                ('finance_number', models.CharField(blank=True, max_length=30, null=True, verbose_name='财务编号')),
                ('address', models.TextField(blank=True, null=True, verbose_name='详细地址')),
                ('signature', models.CharField(blank=True, max_length=200, null=True, verbose_name='签名图片')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='employee_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('fee_level', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='userdetail_fee_level', to='system.Dict', verbose_name='劳务费级别')),
                ('pro_title', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='userdetail_pro_title', to='system.Dict', verbose_name='职称')),
                ('region', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='userdetail_region', to='system.Dict', verbose_name='省市区')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='employee_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '人员详细信息',
                'verbose_name_plural': '人员详细信息',
            },
        ),
        migrations.DeleteModel(
            name='UserDetail',
        ),
        migrations.AlterField(
            model_name='ability',
            name='employee',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ability_employee', to='employee.Employee'),
        ),
        migrations.AlterField(
            model_name='education',
            name='employee',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='education_employee', to='employee.Employee'),
        ),
        migrations.AlterField(
            model_name='historicalability',
            name='employee',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='employee.Employee'),
        ),
        migrations.AlterField(
            model_name='historicalqualification',
            name='employee',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='employee.Employee'),
        ),
        migrations.AlterField(
            model_name='qualification',
            name='employee',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='qualification_employee', to='employee.Employee'),
        ),
        migrations.AlterField(
            model_name='train',
            name='employees',
            field=models.ManyToManyField(related_name='train_employees', to='employee.Employee', verbose_name='参加人员'),
        ),
    ]
