# Generated by Django 5.0 on 2025-08-03 12:12

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


class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0027_remove_organizationstats_total_buyers_and_more'),
        ('herd', '0008_herd_cooperative_herd_heavy_livestock_number_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Rancher',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('creator_info', models.CharField(max_length=100, null=True)),
                ('modifier_info', models.CharField(max_length=100, null=True)),
                ('trash', models.BooleanField(default=False)),
                ('ranching_farm', models.CharField(max_length=150, null=True)),
                ('first_name', models.CharField(max_length=150, null=True)),
                ('last_name', models.CharField(max_length=150, null=True)),
                ('mobile', models.CharField(max_length=25, null=True)),
                ('national_code', models.CharField(max_length=20, null=True)),
                ('birthdate', models.DateTimeField(null=True)),
                ('nationality', models.CharField(max_length=20, null=True)),
                ('address', models.TextField(blank=True)),
                ('city', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ranchers', to='authentication.city')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_createddby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('province', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ranchers', to='authentication.province')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='herd',
            name='rancher',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='herd', to='herd.rancher'),
        ),
    ]
