# Generated by Django 5.2.17 on 2026-09-01 07:06

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


class Migration(migrations.Migration):

    dependencies = [
        ('catalog_app', '0029_author_email'),
    ]

    operations = [
        migrations.CreateModel(
            name='Publisher',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('email', models.EmailField(blank=True, help_text='Used to send monthly distribution statements.', max_length=254)),
                ('default_my_keep_percent', models.DecimalField(decimal_places=2, default=25.0, help_text='Default Tai AfroPress margin % applied to all books from this publisher.', max_digits=5)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.AddField(
            model_name='book',
            name='publisher',
            field=models.ForeignKey(blank=True, help_text='If set, earnings/statements for this book go to the publisher instead of the author.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='books', to='catalog_app.publisher'),
        ),
    ]
