# Generated by Django 3.1.8 on 2021-06-03 05:22

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 = [
        ('system', '0002_auto_20210602_1459'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('expert', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Award',
            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='删除标记')),
                ('name', models.CharField(max_length=100, verbose_name='名称')),
                ('level', models.CharField(choices=[('省部级', '省部级')], max_length=60, verbose_name='级别')),
                ('issue_date', models.DateField(verbose_name='颁发日期')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='award_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
            ],
            options={
                'verbose_name': '专家获奖/荣誉',
                'verbose_name_plural': '专家获奖/荣誉',
            },
        ),
        migrations.CreateModel(
            name='Expert',
            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='删除标记')),
                ('name', models.CharField(max_length=100, verbose_name='姓名')),
                ('gender', models.CharField(choices=[('男', '男'), ('女', '女')], default='男', max_length=10, verbose_name='性别')),
                ('idnumber', models.CharField(max_length=40, verbose_name='身份证号')),
                ('paddress', models.TextField(verbose_name='通讯地址')),
                ('photo', models.CharField(blank=True, max_length=100, null=True, verbose_name='证件照')),
                ('belong_dept', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='expert_belong_dept', to='system.organization', verbose_name='所属部门')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='expert_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='expert_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='expert_user', to=settings.AUTH_USER_MODEL, verbose_name='关联账户')),
            ],
            options={
                'verbose_name': '专家基本信息',
                'verbose_name_plural': '专家基本信息',
            },
        ),
        migrations.CreateModel(
            name='Paper',
            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='删除标记')),
                ('name', models.CharField(max_length=100, verbose_name='名称')),
                ('is_leader', models.BooleanField(default=True, verbose_name='是否第一作者')),
                ('publish_date', models.DateField(verbose_name='发表日期')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='paper_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('expert', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='paper_expert', to='expert.expert', verbose_name='所属专家')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='paper_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'verbose_name': '专家论文/著作',
                'verbose_name_plural': '专家论文/著作',
            },
        ),
        migrations.CreateModel(
            name='Project',
            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='删除标记')),
                ('name', models.CharField(max_length=100, verbose_name='名称')),
                ('number', models.CharField(max_length=100, verbose_name='项目编号')),
                ('start_date', models.DateField(verbose_name='开始日期')),
                ('content', models.TextField(verbose_name='主要工作内容')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='project_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('expert', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='project_expert', to='expert.expert', verbose_name='所属专家')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='project_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'verbose_name': '专家项目',
                'verbose_name_plural': '专家项目',
            },
        ),
        migrations.CreateModel(
            name='WorkExperience',
            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='删除标记')),
                ('name', models.CharField(max_length=100, verbose_name='单位名')),
                ('start_date', models.DateField(verbose_name='开始日期')),
                ('post', models.CharField(max_length=100, verbose_name='职务/岗位')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='workexperience_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('expert', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='workexperience_expert', to='expert.expert', verbose_name='所属专家')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='workexperience_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'verbose_name': '专家工作经历',
                'verbose_name_plural': '专家工作经历',
            },
        ),
        migrations.DeleteModel(
            name='BaseInfo',
        ),
        migrations.AddField(
            model_name='award',
            name='expert',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='award_expert', to='expert.expert', verbose_name='所属专家'),
        ),
        migrations.AddField(
            model_name='award',
            name='update_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='award_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人'),
        ),
    ]
