# Generated by Django 5.2.7 on 2026-02-06 07:28

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0027_alter_device_device_type_cashiercounterregistry'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='CashierSession',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_time', models.DateTimeField(auto_now_add=True, verbose_name='Start Time')),
                ('end_time', models.DateTimeField(blank=True, null=True, verbose_name='End Time')),
                ('opening_balance', models.DecimalField(decimal_places=3, default=0, max_digits=15, verbose_name='Opening Balance')),
                ('closing_balance', models.DecimalField(blank=True, decimal_places=3, max_digits=15, null=True, verbose_name='Closing Balance')),
                ('status', models.CharField(choices=[('active', 'Active'), ('closed', 'Closed')], default='active', max_length=20, verbose_name='Status')),
                ('notes', models.TextField(blank=True, verbose_name='Notes')),
                ('counter', models.ForeignKey(blank=True, limit_choices_to={'device_type': 'counter'}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sessions', to='core.device', verbose_name='Counter')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sessions', to=settings.AUTH_USER_MODEL, verbose_name='Cashier')),
            ],
        ),
    ]
