# Generated by Django 2.2.4 on 2019-09-02 07:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Person',
            fields=[
                ('personnel_id', models.AutoField(primary_key=True, serialize=False, verbose_name='personnel_id')),
                ('personnel_name', models.CharField(max_length=50, verbose_name='personnel_name')),
                ('department', models.CharField(max_length=50, verbose_name='department')),
                ('is_delete', models.IntegerField(default=0, verbose_name='is_delete')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='create_time')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='update_time')),
                ('delete_time', models.DateTimeField(default=None, null=True, verbose_name='delete_time')),
            ],
            options={
                'db_table': 'Person',
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('project_id', models.AutoField(primary_key=True, serialize=False, verbose_name='project_id')),
                ('project_name', models.CharField(max_length=150, verbose_name='project_name')),
                ('contract_no', models.CharField(max_length=50, unique=True, verbose_name='contract_no')),
                ('project_amount', models.FloatField(null=True, verbose_name='project_amount')),
                ('project_partner', models.CharField(max_length=50, null=True, verbose_name='project_partner')),
                ('project_contact', models.CharField(max_length=50, null=True, verbose_name='project_contact')),
                ('project_remark', models.CharField(max_length=300, null=True, verbose_name='project_remark')),
                ('project_date', models.CharField(max_length=20, null=True, verbose_name='project_date')),
                ('project_cycle', models.CharField(max_length=20, null=True, verbose_name='project_cycle')),
                ('is_delete', models.IntegerField(default=0, verbose_name='is_delete')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='create_time')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='update_time')),
                ('delete_time', models.DateTimeField(default=None, null=True, verbose_name='delete_time')),
            ],
            options={
                'db_table': 'Project',
            },
        ),
        migrations.CreateModel(
            name='Stage',
            fields=[
                ('stage_id', models.AutoField(primary_key=True, serialize=False, verbose_name='stage_id')),
                ('stage_name', models.CharField(max_length=50, verbose_name='stage_name')),
                ('begin_time', models.CharField(max_length=50, null=True, verbose_name='begin_time')),
                ('end_time', models.CharField(max_length=50, null=True, verbose_name='end_time')),
                ('progress', models.CharField(max_length=20, null=True, verbose_name='progress')),
                ('is_delete', models.IntegerField(default=0, verbose_name='is_delete')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='create_time')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='update_time')),
                ('delete_time', models.DateTimeField(default=None, null=True, verbose_name='delete_time')),
                ('personnel_ids', models.ManyToManyField(null=True, to='master.Person')),
            ],
            options={
                'db_table': 'Stage',
            },
        ),
        migrations.CreateModel(
            name='Plan',
            fields=[
                ('plan_id', models.AutoField(primary_key=True, serialize=False, verbose_name='自增ID')),
                ('plan_content', models.CharField(max_length=300, verbose_name='plan_content')),
                ('is_delete', models.IntegerField(default=0, verbose_name='is_delete')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='create_time')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='update_time')),
                ('delete_time', models.DateTimeField(default=None, null=True, verbose_name='delete_time')),
                ('project_id', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='master.Project')),
                ('stage_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='master.Stage')),
            ],
            options={
                'db_table': 'Plan',
            },
        ),
    ]
