some changes

This commit is contained in:
2025-08-06 13:32:50 +03:30
parent d9d0537ac9
commit 30dcdb2db6
18 changed files with 251 additions and 12 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.0 on 2025-08-06 07:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('herd', '0010_rancher_without_herd'),
]
operations = [
migrations.AddField(
model_name='rancher',
name='herd_code',
field=models.CharField(max_length=100, null=True),
),
]

View File

@@ -0,0 +1,23 @@
# Generated by Django 5.0 on 2025-08-06 07:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('herd', '0011_rancher_herd_code'),
]
operations = [
migrations.AlterField(
model_name='rancher',
name='national_code',
field=models.CharField(max_length=50, null=True),
),
migrations.AlterField(
model_name='rancher',
name='nationality',
field=models.CharField(max_length=50, null=True),
),
]

View File

@@ -0,0 +1,23 @@
# Generated by Django 5.0 on 2025-08-06 07:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('herd', '0012_alter_rancher_national_code_and_more'),
]
operations = [
migrations.AlterField(
model_name='herd',
name='latitude',
field=models.DecimalField(decimal_places=6, max_digits=10, null=True),
),
migrations.AlterField(
model_name='herd',
name='longitude',
field=models.DecimalField(decimal_places=6, max_digits=10, null=True),
),
]

View File

@@ -0,0 +1,23 @@
# Generated by Django 5.0 on 2025-08-06 07:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('herd', '0013_alter_herd_latitude_alter_herd_longitude'),
]
operations = [
migrations.AlterField(
model_name='herd',
name='latitude',
field=models.FloatField(default=0),
),
migrations.AlterField(
model_name='herd',
name='longitude',
field=models.FloatField(default=0),
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.0 on 2025-08-06 07:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('herd', '0014_alter_herd_latitude_alter_herd_longitude'),
]
operations = [
migrations.AlterField(
model_name='herd',
name='postal',
field=models.CharField(help_text='herd postal code', max_length=20, null=True),
),
]

View File

@@ -42,7 +42,7 @@ class Herd(BaseModel):
null=True
)
postal = models.CharField(
max_length=10,
max_length=20,
help_text="herd postal code", null=True
)
institution = models.CharField(
@@ -56,8 +56,8 @@ class Herd(BaseModel):
related_name="herd_contractor",
null=True
)
latitude = models.DecimalField(max_digits=22, decimal_places=16, null=True)
longitude = models.DecimalField(max_digits=22, decimal_places=16, null=True)
latitude = models.FloatField(default=0)
longitude = models.FloatField(default=0)
unit_unique_id = models.CharField(max_length=20, null=True)
activity_types = (
("I", "Industrial"),
@@ -82,12 +82,13 @@ class Herd(BaseModel):
class Rancher(BaseModel):
ranching_farm = models.CharField(max_length=150, null=True)
herd_code = models.CharField(max_length=100, 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)
national_code = models.CharField(max_length=50, null=True)
birthdate = models.DateTimeField(null=True)
nationality = models.CharField(max_length=20, null=True)
nationality = models.CharField(max_length=50, null=True)
address = models.TextField(blank=True)
province = models.ForeignKey(
auth_models.Province,