# Generated by Django 6.0 on 2025-03-15 00:12

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

import django.utils.timezone


class Migration(migrations.Migration):
    dependencies = [
        ("edc_pharmacy", "0067_auto_20250314_1547"),
        ("sites", "0002_alter_domain_unique"),
    ]

    operations = [
        migrations.CreateModel(
            name="StockOut",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("report_model", models.CharField(max_length=50)),
                ("created", models.DateTimeField(default=django.utils.timezone.now)),
                ("subject_identifier", models.CharField(max_length=50, null=True)),
                (
                    "visit_code",
                    models.DecimalField(decimal_places=1, max_digits=8, null=True),
                ),
                ("appt_date", models.DateField(null=True)),
                ("baseline_date", models.DateField(null=True)),
                ("relative_days", models.IntegerField(null=True)),
                (
                    "site",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.DO_NOTHING, to="sites.site"
                    ),
                ),
            ],
            options={
                "verbose_name": "Stock out",
                "verbose_name_plural": "Stock out",
                "abstract": False,
                "default_permissions": ("view", "export", "viewallsites"),
                "indexes": [
                    models.Index(
                        fields=["subject_identifier", "site"],
                        name="edc_pharmac_subject_63b1ce_idx",
                    )
                ],
            },
        ),
    ]
