# Generated by Django 4.2.2 on 2023-07-03 13:26

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


class Migration(migrations.Migration):
    dependencies = [
        ("diop", "0022_alter_notification_body_alter_task_description"),
    ]

    operations = [
        migrations.CreateModel(
            name="SiteLog",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=128, verbose_name="Name")),
                (
                    "parameters",
                    models.CharField(max_length=512, verbose_name="Parameters"),
                ),
                (
                    "time",
                    models.DateTimeField(
                        auto_now_add=True, help_text="Time the action was triggered."
                    ),
                ),
                ("details", models.TextField()),
                (
                    "deliverygroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="diop.deliverygroup",
                    ),
                ),
                (
                    "machine",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="diop.machine",
                    ),
                ),
                (
                    "notification",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="diop.notification",
                    ),
                ),
                (
                    "reservation",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="diop.reservation",
                    ),
                ),
                (
                    "session",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="diop.session",
                    ),
                ),
                (
                    "task",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="diop.task",
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="diop.user",
                    ),
                ),
            ],
            options={
                "verbose_name": "Site Log",
            },
        ),
    ]
