# Generated by Django 2.0.1 on 2019-10-08 09:28

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='FlieClass',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='文件类型')),
            ],
            options={
                'verbose_name_plural': '文件分类',
            },
        ),
        migrations.CreateModel(
            name='ImportFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='File')),
                ('name', models.CharField(max_length=50, verbose_name='文件名')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Module',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='模块名')),
            ],
            options={
                'verbose_name_plural': '模块表',
            },
        ),
        migrations.CreateModel(
            name='PlanFileName',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phase', models.CharField(blank=True, choices=[('01', '1'), ('02', '2'), ('03', '3'), ('04', '4'), ('05', '5'), ('06', '6'), ('07', '7'), ('08', '8'), ('09', '9'), ('10', '10')], max_length=30, null=True, verbose_name='阶段')),
                ('date', models.DateField(blank=True, null=True, verbose_name='日期')),
                ('name', models.CharField(max_length=30, verbose_name='文件名')),
                ('author', models.CharField(blank=True, max_length=30, null=True, verbose_name='作者')),
                ('number', models.IntegerField(blank=True, null=True, verbose_name='序号')),
                ('result', models.CharField(max_length=60, null=True, verbose_name='文件全名')),
            ],
            options={
                'verbose_name_plural': '计划类文件',
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='项目名')),
            ],
            options={
                'verbose_name_plural': '项目列表',
            },
        ),
        migrations.CreateModel(
            name='ProjectFlieClass',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='项目文件类型')),
                ('code', models.CharField(blank=True, max_length=30, null=True, verbose_name='代号')),
                ('flieclass', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name_generate.FlieClass')),
            ],
            options={
                'verbose_name_plural': '项目分类',
            },
        ),
        migrations.CreateModel(
            name='RecordFileName',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(blank=True, null=True, verbose_name='日期')),
                ('name', models.CharField(max_length=30, verbose_name='文件名')),
                ('author', models.CharField(blank=True, max_length=30, null=True, verbose_name='作者')),
                ('number', models.IntegerField(blank=True, null=True, verbose_name='序号')),
                ('result', models.CharField(max_length=60, null=True, verbose_name='文件全名')),
                ('project', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='name_generate.Project', verbose_name='项目')),
                ('projectflieclass', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='name_generate.ProjectFlieClass', verbose_name='类别代号')),
            ],
            options={
                'verbose_name_plural': '记录类文件',
            },
        ),
        migrations.CreateModel(
            name='Scheme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='方案名')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name_generate.Project', verbose_name='项目')),
            ],
            options={
                'verbose_name_plural': '方案表',
            },
        ),
        migrations.CreateModel(
            name='TechniFileName',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='文件名')),
                ('date', models.DateField(blank=True, null=True, verbose_name='日期')),
                ('author', models.CharField(blank=True, max_length=30, null=True, verbose_name='作者')),
                ('number', models.IntegerField(blank=True, null=True, verbose_name='序号')),
                ('version', models.CharField(blank=True, max_length=30, null=True, verbose_name='版本')),
                ('result', models.CharField(max_length=50, verbose_name='文件全名')),
                ('module', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='name_generate.Module', verbose_name='模块')),
                ('project', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='name_generate.Project', verbose_name='项目')),
                ('projectflieclass', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='name_generate.ProjectFlieClass', verbose_name='类别代号')),
                ('scheme', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='name_generate.Scheme', verbose_name='方案')),
            ],
            options={
                'verbose_name_plural': '技术类文件',
            },
        ),
        migrations.AddField(
            model_name='planfilename',
            name='project',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='name_generate.Project', verbose_name='项目'),
        ),
        migrations.AddField(
            model_name='planfilename',
            name='projectflieclass',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='name_generate.ProjectFlieClass', verbose_name='类别代号'),
        ),
        migrations.AddField(
            model_name='module',
            name='project',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name_generate.Project', verbose_name='项目'),
        ),
    ]
