# Generated by Django 5.2.7 on 2026-02-05 13:22

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


class Migration(migrations.Migration):

    dependencies = [
        ('hr', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='BiometricDevice',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Device Name')),
                ('ip_address', models.GenericIPAddressField(verbose_name='IP Address')),
                ('port', models.PositiveIntegerField(default=4370, verbose_name='Port')),
                ('device_type', models.CharField(choices=[('zkteco', 'ZKTeco'), ('other', 'Other')], default='zkteco', max_length=20, verbose_name='Device Type')),
                ('status', models.CharField(choices=[('active', 'Active'), ('inactive', 'Inactive')], default='active', max_length=20, verbose_name='Status')),
                ('last_sync', models.DateTimeField(blank=True, null=True, verbose_name='Last Sync')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.AddField(
            model_name='attendance',
            name='device',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='attendances', to='hr.biometricdevice', verbose_name='Source Device'),
        ),
    ]
