# Generated by Django 2.1.2 on 2018-11-19 04:00

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),
        ('books', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='BookRequest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('state', models.IntegerField(choices=[(0, 'Enviada'), (1, 'Aceptada'), (2, 'Entregado-SinConfirmacion'), (3, 'Entregado-Confirmado'), (4, 'Devuelto-SinConfirmacion'), (5, 'Devuelto-Confirmado-Sin-Calificar'), (6, 'Rechazada/Finalizada'), (7, 'Devuelto-Calificado-Owner'), (8, 'Devuelto-Calificado-Reader'), (9, 'Devuelto')], default=0)),
                ('calif_owner', models.IntegerField(default=0)),
                ('calif_reader', models.IntegerField(default=0)),
                ('timestamp', models.DateTimeField(default=datetime.date.today)),
                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='books.Book')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('timestamp',),
            },
        ),
        migrations.AlterUniqueTogether(
            name='bookrequest',
            unique_together={('user', 'book')},
        ),
    ]
