diff --git a/monitorizer/report/migrations/0013_telegramreport_created_at_telegramreport_updated_at_and_more.py b/monitorizer/report/migrations/0013_telegramreport_created_at_telegramreport_updated_at_and_more.py new file mode 100644 index 0000000..6ad5d8a --- /dev/null +++ b/monitorizer/report/migrations/0013_telegramreport_created_at_telegramreport_updated_at_and_more.py @@ -0,0 +1,61 @@ +# Generated by Django 5.0.4 on 2024-04-11 05:16 + +import uuid + +import django.utils.timezone +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("report", "0012_webhookreport_file_param_webhookreport_message_param"), + ] + + operations = [ + migrations.AddField( + model_name="telegramreport", + name="created_at", + field=models.DateTimeField( + auto_now_add=True, default=django.utils.timezone.now + ), + preserve_default=False, + ), + migrations.AddField( + model_name="telegramreport", + name="updated_at", + field=models.DateTimeField(auto_now=True), + ), + migrations.AddField( + model_name="webhookreport", + name="created_at", + field=models.DateTimeField( + auto_now_add=True, default=django.utils.timezone.now + ), + preserve_default=False, + ), + migrations.AddField( + model_name="webhookreport", + name="updated_at", + field=models.DateTimeField(auto_now=True), + ), + migrations.AlterField( + model_name="telegramreport", + name="id", + field=models.UUIDField( + default=uuid.uuid4, editable=False, primary_key=True, serialize=False + ), + ), + migrations.AlterField( + model_name="webhookreport", + name="id", + field=models.UUIDField( + default=uuid.uuid4, editable=False, primary_key=True, serialize=False + ), + ), + migrations.AlterField( + model_name="webhookreport", + name="message_param", + field=models.CharField(default="content"), + ), + ] diff --git a/monitorizer/report/models.py b/monitorizer/report/models.py index 97e28b8..6bea36b 100644 --- a/monitorizer/report/models.py +++ b/monitorizer/report/models.py @@ -7,8 +7,10 @@ from django.dispatch import receiver from django_celery_beat.models import IntervalSchedule, PeriodicTask +from monitorizer.server.models import BaseModel -class Report(models.Model): + +class Report(BaseModel): class FilterTypes(models.TextChoices): STARTS_WITH = "value__startswith", "Starts with" ENDS_WITH = "value__endswith", "Ends with"