# Generated by Django 3.2.12 on 2022-08-15 06:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Rcertificate',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, 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=20, verbose_name='证书名称')),
                ('number', models.CharField(max_length=20, unique=True, verbose_name='证书编号')),
                ('type', models.PositiveSmallIntegerField(choices=[(10, '特种作业证书'), (20, '特种设备操作证书'), (30, '安全管理人员证书')], default=10, verbose_name='证书类型')),
                ('issue_date', models.DateField(verbose_name='发证日期')),
                ('expiration_date', models.DateField(verbose_name='有效期')),
                ('review_date', models.DateField(verbose_name='下一次复审日期')),
                ('file', models.CharField(blank=True, max_length=1000, null=True, verbose_name='文件地址')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Remployee',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, 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=20, verbose_name='姓名')),
                ('phone', models.CharField(max_length=11, verbose_name='手机号')),
                ('photo', models.CharField(max_length=1000, verbose_name='证件照')),
                ('id_number', models.CharField(max_length=100, verbose_name='身份证号')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Rfile',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, 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='删除标记')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Rparty',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, 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=20, verbose_name='名称')),
                ('number', models.CharField(blank=True, max_length=50, null=True, verbose_name='信用代码')),
                ('lawer', models.CharField(blank=True, max_length=20, null=True, verbose_name='法人')),
                ('contacter', models.CharField(max_length=20, verbose_name='联系人')),
                ('phone', models.CharField(max_length=20, verbose_name='联系电话')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='邮箱')),
                ('address', models.CharField(blank=True, max_length=200, null=True, verbose_name='企业地址')),
                ('description', models.TextField(blank=True, null=True, verbose_name='概述')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Rpj',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, 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=20, verbose_name='名称')),
                ('type', models.PositiveSmallIntegerField(default=10, verbose_name='项目类型')),
                ('contract_number', models.CharField(max_length=20, verbose_name='合同编号')),
                ('come_time', models.DateTimeField(verbose_name='进厂时间')),
                ('leave_time', models.DateTimeField(verbose_name='离厂时间')),
                ('state', models.PositiveSmallIntegerField(default=10, verbose_name='状态')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Rpjcertificate',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, 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=20, verbose_name='证书名称')),
                ('number', models.CharField(max_length=20, verbose_name='证书编号')),
                ('type', models.PositiveSmallIntegerField(choices=[(10, '特种作业证书'), (20, '特种设备操作证书'), (30, '安全管理人员证书')], default=10, verbose_name='证书类型')),
                ('issue_date', models.DateField(verbose_name='发证日期')),
                ('expiration_date', models.DateField(verbose_name='有效期')),
                ('review_date', models.DateField(verbose_name='下一次复审日期')),
                ('file', models.CharField(blank=True, max_length=1000, null=True, verbose_name='文件地址')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Rpjfile',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, 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='删除标记')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Rpjmember',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, 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='删除标记')),
                ('duty', models.CharField(blank=True, max_length=20, null=True, verbose_name='职责')),
                ('is_manager', models.BooleanField(default=False, verbose_name='是否项目负责人')),
                ('rcertificates', models.ManyToManyField(blank=True, through='rpm.Rpjcertificate', to='rpm.Rcertificate')),
                ('remployee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rpm.remployee', verbose_name='关联人员')),
                ('rpj', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rpm.rpj', verbose_name='关联项目')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
