# Generated by Django 4.2.15 on 2024-08-11 19:16

from django.conf import settings
import django.core.files.storage
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('endoreg_db', '0069_delete_networkdevicetypemanager_networkdevice_online'),
    ]

    operations = [
        migrations.CreateModel(
            name='LogType',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('description', models.CharField(max_length=255)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.AlterField(
            model_name='rawpdffile',
            name='file',
            field=models.FileField(storage=django.core.files.storage.FileSystemStorage(location='/home/agl-admin/agl-monitor/agl_monitor/agl_monitor/erc_data/raw_pdf'), upload_to='raw_pdf/', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['pdf'])]),
        ),
        migrations.CreateModel(
            name='NetworkDeviceLogEntry',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('ip_address', models.GenericIPAddressField(blank=True, null=True)),
                ('user_agent', models.CharField(blank=True, max_length=256, null=True)),
                ('message', models.TextField()),
                ('json_content', models.JSONField(blank=True, null=True)),
                ('device', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='endoreg_db.networkdevice')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Network Device Log Entry',
                'verbose_name_plural': 'Network Device Log Entries',
            },
        ),
        migrations.CreateModel(
            name='AglService',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('description', models.CharField(max_length=255)),
                ('online', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('port', models.IntegerField(blank=True, null=True)),
                ('protocol', models.CharField(blank=True, max_length=255, null=True)),
                ('url', models.URLField(blank=True, null=True)),
                ('devices', models.ManyToManyField(related_name='services', to='endoreg_db.networkdevice')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
    ]
