# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-09 21:59
from __future__ import unicode_literals

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='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ISBN', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='borTransaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('borDateTime', models.DateTimeField()),
                ('dueDate', models.DateField()),
                ('retDate', models.DateField()),
                ('fineAmount', models.FloatField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Branch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=100)),
                ('location', models.CharField(default='', max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='ChiefEditor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Copy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.CharField(default='', max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=300)),
                ('date', models.DateField()),
                ('descriptor', models.CharField(default='', max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='JournalIssue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Scope', models.CharField(default='', max_length=100)),
                ('editor', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='JournalVolume',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('volumeNo', models.IntegerField(default=0)),
                ('doc', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Document')),
                ('editorId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.ChiefEditor')),
            ],
        ),
        migrations.CreateModel(
            name='Proceeding',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('location', models.CharField(default='', max_length=500)),
                ('editor', models.CharField(default='', max_length=100)),
                ('doc', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Document')),
            ],
        ),
        migrations.CreateModel(
            name='Publisher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=100)),
                ('address', models.CharField(default='', max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='Reader',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=100)),
                ('address', models.CharField(default='', max_length=500)),
                ('phone', models.CharField(default='', max_length=15)),
                ('readerType', models.CharField(default='', max_length=20)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Reservation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('resDateTime', models.DateTimeField()),
                ('resStatus', models.CharField(default='', max_length=300)),
                ('copyNo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Copy')),
                ('readerId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Reader')),
            ],
        ),
        migrations.CreateModel(
            name='Writes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('authorId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Author')),
                ('bookId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Book')),
            ],
        ),
        migrations.AddField(
            model_name='journalissue',
            name='volId',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.JournalVolume'),
        ),
        migrations.AddField(
            model_name='document',
            name='publisherId',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Publisher'),
        ),
        migrations.AddField(
            model_name='copy',
            name='docId',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Document'),
        ),
        migrations.AddField(
            model_name='copy',
            name='libId',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Branch'),
        ),
        migrations.AddField(
            model_name='bortransaction',
            name='copyNo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Copy'),
        ),
        migrations.AddField(
            model_name='bortransaction',
            name='readerId',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Reader'),
        ),
        migrations.AddField(
            model_name='book',
            name='doc',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='libraryapp.Document'),
        ),
    ]
