Files
RasadDam_Backend/apps/herd/migrations/0001_initial.py

47 lines
2.5 KiB
Python

# Generated by Django 4.2.20 on 2025-05-05 11:54
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('authentication', '0007_user_ownership'),
]
operations = [
migrations.CreateModel(
name='Herd',
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)),
('trash', models.BooleanField(default=False)),
('name', models.CharField(max_length=50)),
('photo', models.CharField(max_length=50, null=True)),
('code', models.CharField(max_length=20)),
('postal', models.CharField(help_text='herd postal code', max_length=10, null=True)),
('institution', models.CharField(help_text='herd institution code', max_length=20, null=True)),
('epidemiologic', models.CharField(max_length=18, null=True)),
('latitude', models.DecimalField(decimal_places=16, max_digits=22, null=True)),
('longitude', models.DecimalField(decimal_places=16, max_digits=22, null=True)),
('unit_unique_id', models.CharField(max_length=20, null=True)),
('activity', models.CharField(choices=[('I', 'Industrial'), ('V', 'Village'), ('N', 'Nomadic')], max_length=1, null=True)),
('activity_state', models.BooleanField(default=False)),
('operating_license_state', models.BooleanField(default=False)),
('capacity', models.IntegerField(default=0)),
('contractor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='herd_contractor', to='authentication.organization')),
('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_createdby', 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)),
],
options={
'abstract': False,
},
),
]