# Generated by Django 5.1.15 on 2026-01-18 15:05

import datetime

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

import oldp.apps.laws.models


class Migration(migrations.Migration):
    dependencies = [
        ("accounts", "0003_create_default_permissions"),
        ("laws", "0019_add_revision_constraints_and_validation"),
    ]

    operations = [
        migrations.AddField(
            model_name="law",
            name="created_by_token",
            field=models.ForeignKey(
                blank=True,
                help_text="API token used to create this law via the API",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="created_laws",
                to="accounts.apitoken",
            ),
        ),
        migrations.AddField(
            model_name="lawbook",
            name="created_by_token",
            field=models.ForeignKey(
                blank=True,
                help_text="API token used to create this law book via the API",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="created_lawbooks",
                to="accounts.apitoken",
            ),
        ),
        migrations.AlterField(
            model_name="law",
            name="content",
            field=models.TextField(
                blank=True, help_text="Law content with HTML tags and reference markers"
            ),
        ),
        migrations.AlterField(
            model_name="law",
            name="id",
            field=models.BigAutoField(
                auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
            ),
        ),
        migrations.AlterField(
            model_name="lawbook",
            name="id",
            field=models.BigAutoField(
                auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
            ),
        ),
        migrations.AlterField(
            model_name="lawbook",
            name="revision_date",
            field=models.DateField(
                default=datetime.date(1990, 1, 1),
                help_text="Date of revision",
                validators=[oldp.apps.laws.models.validate_revision_date],
            ),
        ),
        migrations.AlterField(
            model_name="relatedlaw",
            name="id",
            field=models.BigAutoField(
                auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
            ),
        ),
    ]
