# Generated by Django 5.2.4 on 2025-07-27 10:45

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


class Migration(migrations.Migration):

    dependencies = [
        ('test_app', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='BookCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_removed', models.BooleanField(default=False)),
                ('removed_at', models.DateTimeField(blank=True, null=True)),
                ('name', models.CharField(max_length=100, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AuthorProfile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_removed', models.BooleanField(default=False)),
                ('removed_at', models.DateTimeField(blank=True, null=True)),
                ('bio', models.TextField(blank=True)),
                ('author', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to='test_app.author')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_removed', models.BooleanField(default=False)),
                ('removed_at', models.DateTimeField(blank=True, null=True)),
                ('title', models.CharField(max_length=100)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test_app.author')),
                ('categories', models.ManyToManyField(blank=True, related_name='books', to='test_app.bookcategory')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='BookMeta',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_removed', models.BooleanField(default=False)),
                ('removed_at', models.DateTimeField(blank=True, null=True)),
                ('format', models.CharField(choices=[('paperback', 'Paperback'), ('hardcover', 'Hardcover'), ('ebook', 'eBook')], default='paperback', max_length=30)),
                ('book', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='meta', to='test_app.book')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
