# Generated by Django 4.1.3 on 2023-01-23 15:37

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


class Migration(migrations.Migration):

    dependencies = [
        ('Clientes', '0014_alter_clientes_options'),
        ('Sistemas', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('device_name', models.CharField(max_length=255)),
                ('device_os', models.CharField(max_length=255)),
                ('ip_address', models.GenericIPAddressField()),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Clientes.clientes')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AlterModelOptions(
            name='sistemas_por_cliente',
            options={'ordering': ('-cliente', 'id_sistema')},
        ),
        migrations.CreateModel(
            name='DeviceHistory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_authentication', models.DateTimeField(auto_now_add=True)),
                ('last_authentication', models.DateTimeField(auto_now=True)),
                ('ip_address', models.GenericIPAddressField()),
                ('device', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Sistemas.device')),
            ],
        ),
    ]
