# Generated by Django 5.0 on 2026-03-17 08:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('fertilizer', '0008_spreadingsession_fertilizationentry_actual_bags_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='WorkRecord',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('work_date', models.DateField(verbose_name='作業日')),
                ('work_type', models.CharField(choices=[('fertilizer_delivery', '肥料運搬'), ('fertilizer_spreading', '肥料散布')], max_length=40, verbose_name='作業種別')),
                ('title', models.CharField(max_length=200, verbose_name='タイトル')),
                ('year', models.IntegerField(verbose_name='年度')),
                ('auto_created', models.BooleanField(default=True, verbose_name='自動生成')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('delivery_trip', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='work_record', to='fertilizer.deliverytrip', verbose_name='運搬回')),
                ('spreading_session', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='work_record', to='fertilizer.spreadingsession', verbose_name='散布実績')),
            ],
            options={
                'verbose_name': '作業記録',
                'verbose_name_plural': '作業記録',
                'ordering': ['-work_date', '-updated_at', '-id'],
            },
        ),
    ]
