# Generated by Django 2.2 on 2019-04-16 15:01

import datetime
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='Book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('TITLE', models.CharField(max_length=70)),
                ('DESCRIPTION', models.TextField(blank=True, null=True)),
                ('DATE', models.DateTimeField(default=datetime.datetime.now)),
                ('AUTHOR', models.CharField(max_length=50)),
                ('COPIES', models.IntegerField(default=0)),
                ('LANGUAGE', models.CharField(choices=[('ARY', 'Arabic'), ('BUL', 'Bulgarian'), ('CHI', 'Chinese'), ('DUT', 'Dutch'), ('ENG', 'English'), ('FRE', 'French'), ('GER', 'German'), ('GRE', 'Greek'), ('ITA', 'Italian'), ('JPN', 'Japanese'), ('KOR', 'Korean'), ('POR', 'Portuguese'), ('RUM', 'Romanian'), ('RUS', 'Russian'), ('SPA', 'Spanish'), ('SWE', 'Swedish'), ('TUR', 'Turkish'), ('UKR', 'Ukrainian'), ('VIE', 'Vietnamese')], default='ENG', max_length=3)),
                ('PRICE', models.FloatField(default=0.0)),
                ('STATUS', models.CharField(choices=[('AVAILABLE', 'Available'), ('UNAVAILABLE', 'Unavailable')], default='AVAILABLE', max_length=15)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('TITLE', models.CharField(max_length=70, unique=True)),
            ],
            options={
                'verbose_name': 'Category',
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='BookCopy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('LAST_LOANED', models.DateTimeField(blank=True, default=None, null=True)),
                ('CLASSIFICATION', models.CharField(max_length=50, unique=True)),
                ('STATUS', models.CharField(choices=[('AVAILABLE', 'Available'), ('ONLOAN', 'On Loan'), ('PROCESSING', 'Processing')], default='AVAILABLE', max_length=15)),
                ('BOOK', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Book')),
                ('LAST_BORROWER', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Copy',
                'verbose_name_plural': 'Copies',
            },
        ),
        migrations.AddField(
            model_name='book',
            name='CATEGORY',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Category'),
        ),
    ]
