# Generated by Django 3.1.13 on 2021-07-22 11:19

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    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=150, verbose_name='book title')),
                ('author', models.CharField(blank=True, max_length=100, verbose_name='author')),
                ('publish_year', models.DateTimeField(null=True, verbose_name='publish_year')),
                ('image', models.ImageField(blank=True, upload_to='books/')),
                ('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='release_year')),
                ('updated', models.DateTimeField(auto_now=True, null=True, verbose_name='update time')),
                ('book_info', models.TextField(blank=True, null=True, verbose_name='book information')),
                ('status', models.CharField(choices=[('F', 'Free'), ('B', 'Borrowed'), ('D', 'Deprecated')], default='F', max_length=1, verbose_name='status')),
            ],
            options={
                'verbose_name': 'کتاب',
                'verbose_name_plural': 'کتاب ها',
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(max_length=500)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ('created',),
            },
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('like', models.CharField(choices=[('L', 'like'), ('d', 'dislike')], max_length=3)),
                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.book')),
            ],
        ),
    ]
