# Generated by Django 5.0.7 on 2024-07-23 11:35

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


class Migration(migrations.Migration):

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        ("eggs", "0068_alter_market_avatar"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name="broken",
            name="price",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                default=0,
                max_digits=30,
                null=True,
            ),
        ),
        migrations.CreateModel(
            name="Monitoring",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("object_id", models.PositiveIntegerField()),
                ("action", models.CharField(max_length=255)),
                ("timestamp", models.DateTimeField(auto_now_add=True)),
                (
                    "created_by",
                    models.CharField(blank=True, max_length=255, null=True),
                ),
                (
                    "created_who",
                    models.CharField(blank=True, max_length=255, null=True),
                ),
                (
                    "comment",
                    models.CharField(blank=True, max_length=255, null=True),
                ),
                (
                    "reason",
                    models.CharField(blank=True, max_length=255, null=True),
                ),
                (
                    "price",
                    models.DecimalField(
                        blank=True,
                        decimal_places=2,
                        default=0,
                        max_digits=30,
                        null=True,
                    ),
                ),
                (
                    "content_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="contenttypes.contenttype",
                    ),
                ),
                (
                    "user_id",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="monitoring",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["-timestamp"],
            },
        ),
    ]
