# Generated by Django 4.1.7 on 2023-03-28 07:45

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


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                (
                    'id',
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name='ID',
                    ),
                ),
                ('created', models.DateTimeField(verbose_name='created')),
                (
                    'modified',
                    models.DateTimeField(auto_now=True, verbose_name='modified'),
                ),
                ('gender', models.IntegerField(choices=[('M', 1), ('F', 2)])),
                ('name', models.CharField(max_length=32, unique=True)),
                ('age', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                (
                    'id',
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name='ID',
                    ),
                ),
                ('created', models.DateTimeField(verbose_name='created')),
                (
                    'modified',
                    models.DateTimeField(auto_now=True, verbose_name='modified'),
                ),
                ('title', models.CharField(max_length=128)),
                (
                    'author',
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name='books',
                        to='testapp.author',
                    ),
                ),
            ],
        ),
    ]
