# Generated by Django 2.1.1 on 2018-09-11 02:11

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


class Migration(migrations.Migration):

    dependencies = [
        ('main', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='apply_patent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('applicant', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='family_nation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nation', models.CharField(max_length=5)),
            ],
        ),
        migrations.CreateModel(
            name='Patent',
            fields=[
                ('title', models.TextField()),
                ('title_cn', models.TextField()),
                ('abstract', models.TextField()),
                ('abstract_cn', models.TextField()),
                ('index', models.CharField(max_length=60)),
                ('pub_id', models.CharField(max_length=20, primary_key=True, serialize=False)),
                ('pub_date', models.DateField(verbose_name='date published')),
                ('application_id', models.CharField(max_length=20, unique=True)),
                ('application_date', models.DateField()),
                ('patent_type', models.IntegerField(choices=[(0, '不确定'), (1, '发明申请'), (2, '发明授权'), (3, '实用新型'), (4, '外观设计')], default=0)),
                ('cat_id', models.CharField(max_length=50)),
                ('branch1', models.CharField(max_length=60)),
                ('branch2', models.CharField(max_length=60)),
                ('branch3', models.CharField(max_length=60)),
                ('invent_desc', models.CharField(max_length=200)),
                ('tech_prob', models.CharField(max_length=200)),
                ('pdf_file', models.FileField(upload_to=main.models.pdf_directory_path)),
            ],
        ),
        migrations.CreateModel(
            name='same_family',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('same_family_patent', models.CharField(max_length=20)),
                ('patent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Patent')),
            ],
        ),
        migrations.RemoveField(
            model_name='choice',
            name='question',
        ),
        migrations.DeleteModel(
            name='Choice',
        ),
        migrations.DeleteModel(
            name='Question',
        ),
        migrations.AddField(
            model_name='family_nation',
            name='patent',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Patent'),
        ),
        migrations.AddField(
            model_name='apply_patent',
            name='patent',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Patent'),
        ),
    ]

# Generated by Django 2.1.1 on 2018-09-11 02:11

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


class Migration(migrations.Migration):

    dependencies = [
        ('main', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='apply_patent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('applicant', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='family_nation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nation', models.CharField(max_length=5)),
            ],
        ),
        migrations.CreateModel(
            name='Patent',
            fields=[
                ('title', models.TextField()),
                ('title_cn', models.TextField()),
                ('abstract', models.TextField()),
                ('abstract_cn', models.TextField()),
                ('index', models.CharField(max_length=60)),
                ('pub_id', models.CharField(max_length=20, primary_key=True, serialize=False)),
                ('pub_date', models.DateField(verbose_name='date published')),
                ('application_id', models.CharField(max_length=20, unique=True)),
                ('application_date', models.DateField()),
                ('patent_type', models.IntegerField(choices=[(0, '不确定'), (1, '发明申请'), (2, '发明授权'), (3, '实用新型'), (4, '外观设计')], default=0)),
                ('cat_id', models.CharField(max_length=50)),
                ('branch1', models.CharField(max_length=60)),
                ('branch2', models.CharField(max_length=60)),
                ('branch3', models.CharField(max_length=60)),
                ('invent_desc', models.CharField(max_length=200)),
                ('tech_prob', models.CharField(max_length=200)),
                ('pdf_file', models.FileField(upload_to=main.models.pdf_directory_path)),
            ],
        ),
        migrations.CreateModel(
            name='same_family',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('same_family_patent', models.CharField(max_length=20)),
                ('patent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Patent')),
            ],
        ),
        migrations.RemoveField(
            model_name='choice',
            name='question',
        ),
        migrations.DeleteModel(
            name='Choice',
        ),
        migrations.DeleteModel(
            name='Question',
        ),
        migrations.AddField(
            model_name='family_nation',
            name='patent',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Patent'),
        ),
        migrations.AddField(
            model_name='apply_patent',
            name='patent',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Patent'),
        ),
    ]

# Generated by Django 2.1.1 on 2018-09-11 02:11