# Generated by Django 2.2.4 on 2019-08-17 12:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Library',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('library_name', models.CharField(default='未命名', max_length=30)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PdfFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hash', models.CharField(max_length=40)),
                ('pdf_file', models.FileField(upload_to='uploads/%Y/%m/%d')),
                ('init_info', models.FileField(upload_to='uploads/%Y/%m/%d')),
            ],
        ),
        migrations.CreateModel(
            name='Ref',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('info', models.FileField(upload_to='ref_info/%Y/%m/%d')),
                ('comment', models.TextField(max_length=500)),
                ('library', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ref.Library')),
                ('pdf', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ref.PdfFile')),
            ],
        ),
    ]
