# Generated by Django 5.0.2 on 2025-11-20 19:16

import django.db.models.deletion
import django.utils.timezone
import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('projects', '0001_initial'),
        ('tasks', '0001_initial'),
        ('user', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Stamp',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('stamp_function', models.CharField(max_length=20)),
                ('description', models.TextField(blank=True, null=True)),
                ('time', models.TimeField()),
                ('date', models.DateField()),
                ('start_date', models.DateTimeField()),
                ('return_date', models.DateTimeField(blank=True, null=True)),
                ('work_id', models.UUIDField(blank=True, null=True)),
                ('duration', models.CharField(blank=True, help_text='Duration in hours format (e.g., "8:30" or "8.5")', max_length=50, null=True)),
                ('paycode', models.CharField(blank=True, help_text='Paycode from configuration questions', max_length=50, null=True)),
                ('parent_stamp_id', models.UUIDField(blank=True, help_text='ID of the parent stamp that generated this stamp (for absence date ranges)', null=True)),
                ('status', models.CharField(blank=True, choices=[('A', 'Approved'), ('', 'Pending'), ('S', 'Suspended')], default='', max_length=1)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='stamps', to='projects.project')),
                ('task', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='stamps', to='tasks.task')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stamps', to='user.user')),
            ],
            options={
                'db_table': 'stamps',
                'ordering': ['-created_at'],
            },
        ),
    ]
