# Generated by Django 5.2.7 on 2025-10-06 10:59

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


class Migration(migrations.Migration):

    dependencies = [
        ('sitemanagement', '0004_sensor_math_formula'),
    ]

    operations = [
        migrations.AlterField(
            model_name='alert',
            name='message',
            field=models.CharField(max_length=255, verbose_name='Сообщение'),
        ),
        migrations.AlterField(
            model_name='alert',
            name='metric',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alerts', to='sitemanagement.metric', verbose_name='Метрика'),
        ),
        migrations.AlterField(
            model_name='alert',
            name='resolved',
            field=models.BooleanField(default=False, verbose_name='Статус обработки'),
        ),
        migrations.AlterField(
            model_name='alert',
            name='sensor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alerts', to='sitemanagement.sensor', verbose_name='Датчик'),
        ),
        migrations.AlterField(
            model_name='alert',
            name='sensor_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alerts', to='sitemanagement.sensortype', verbose_name='Тип сенсора'),
        ),
        migrations.AlterField(
            model_name='alert',
            name='severity',
            field=models.CharField(choices=[('warning', 'Warning'), ('critical', 'Critical')], default='warning', max_length=20, verbose_name='Уровень тревоги'),
        ),
        migrations.AlterField(
            model_name='metric',
            name='raw_value',
            field=models.CharField(max_length=50, verbose_name='Исходное значение'),
        ),
        migrations.AlterField(
            model_name='metric',
            name='sensor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='metrics', to='sitemanagement.sensor', verbose_name='Датчик'),
        ),
        migrations.AlterField(
            model_name='metric',
            name='status',
            field=models.CharField(blank=True, max_length=20, null=True, verbose_name='Статус'),
        ),
        migrations.AlterField(
            model_name='metric',
            name='value',
            field=models.FloatField(blank=True, null=True, verbose_name='Преобразованное значение'),
        ),
        migrations.AlterField(
            model_name='sensor',
            name='math_formula',
            field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Математическая формула'),
        ),
        migrations.AlterField(
            model_name='sensor',
            name='name',
            field=models.CharField(blank=True, max_length=50, null=True, verbose_name='Название'),
        ),
        migrations.AlterField(
            model_name='sensor',
            name='sensor_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sitemanagement.sensortype', verbose_name='Тип сенсора'),
        ),
        migrations.AlterField(
            model_name='sensor',
            name='serial_number',
            field=models.CharField(blank=True, max_length=50, null=True, verbose_name='Серийный номер'),
        ),
        migrations.AlterField(
            model_name='sensor',
            name='signal_format',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='sitemanagement.signalformat', verbose_name='Формат сигнала'),
        ),
        migrations.AlterField(
            model_name='signalformat',
            name='code',
            field=models.CharField(max_length=50, verbose_name='Код'),
        ),
        migrations.AlterField(
            model_name='signalformat',
            name='conversion_rule',
            field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Правило преобразования'),
        ),
        migrations.AlterField(
            model_name='signalformat',
            name='unit',
            field=models.CharField(blank=True, max_length=20, null=True, verbose_name='Единица измерения'),
        ),
    ]
