# Generated manually on 2025-08-21 08:25

import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('rog', '0004_add_team_timestamps'),
    ]

    operations = [
        # Create GpsCheckin model
        migrations.CreateModel(
            name='GpsCheckin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('event_code', models.CharField(max_length=50)),
                ('zekken', models.CharField(max_length=20)),
                ('serial_number', models.CharField(max_length=50)),
                ('cp_number', models.CharField(blank=True, max_length=20, null=True)),
                ('lat', models.FloatField(blank=True, null=True)),
                ('lng', models.FloatField(blank=True, null=True)),
                ('checkin_time', models.DateTimeField(blank=True, null=True)),
                ('record_time', models.DateTimeField(blank=True, null=True)),
                ('location', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
                ('mobserver_id', models.IntegerField(blank=True, null=True)),
                ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gps_checkins', to='rog.newevent2')),
                ('team', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gps_checkins', to='rog.team')),
                ('checkpoint', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gps_checkins', to='rog.checkpoint')),
            ],
            options={
                'db_table': 'rog_gpscheckin',
                'indexes': [
                    models.Index(fields=['event_code'], name='rog_gpschec_event_c_9f1a75_idx'),
                    models.Index(fields=['zekken'], name='rog_gpschec_zekken_8e7f42_idx'),
                    models.Index(fields=['serial_number'], name='rog_gpschec_serial__1b5e3a_idx'),
                    models.Index(fields=['cp_number'], name='rog_gpschec_cp_numb_d7c8e5_idx'),
                ],
            },
        ),
        
        # Create GpsLog model  
        migrations.CreateModel(
            name='GpsLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('event_code', models.CharField(max_length=50)),
                ('zekken', models.CharField(max_length=20)),
                ('serial_number', models.CharField(max_length=50)),
                ('cp_number', models.CharField(blank=True, max_length=20, null=True)),
                ('lat', models.FloatField(blank=True, null=True)),
                ('lng', models.FloatField(blank=True, null=True)),
                ('checkin_time', models.DateTimeField(blank=True, null=True)),
                ('record_time', models.DateTimeField(blank=True, null=True)),
                ('location', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
                ('mobserver_id', models.IntegerField(blank=True, null=True)),
                ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gps_logs', to='rog.newevent2')),
                ('team', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gps_logs', to='rog.team')),
                ('checkpoint', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gps_logs', to='rog.checkpoint')),
            ],
            options={
                'db_table': 'rog_gpslog',
                'indexes': [
                    models.Index(fields=['event_code'], name='rog_gpslog_event_c_8a2b94_idx'),
                    models.Index(fields=['zekken'], name='rog_gpslog_zekken_7c5f39_idx'),
                    models.Index(fields=['serial_number'], name='rog_gpslog_serial__6d4e28_idx'),
                    models.Index(fields=['cp_number'], name='rog_gpslog_cp_numb_5b3a17_idx'),
                ],
            },
        ),
    ]
