rancher setub
This commit is contained in:
48
apps/herd/migrations/0009_rancher_herd_rancher.py
Normal file
48
apps/herd/migrations/0009_rancher_herd_rancher.py
Normal file
@@ -0,0 +1,48 @@
|
||||
# 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'),
|
||||
),
|
||||
]
|
||||
18
apps/herd/migrations/0010_rancher_without_herd.py
Normal file
18
apps/herd/migrations/0010_rancher_without_herd.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0 on 2025-08-03 12:13
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('herd', '0009_rancher_herd_rancher'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='rancher',
|
||||
name='without_herd',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user