import - rancher organization linked deploy --> with dashboards of cooperative management oage

This commit is contained in:
2025-12-22 14:38:52 +03:30
parent 65a826ab7f
commit 5eb810893b
9 changed files with 272 additions and 24 deletions

View File

@@ -0,0 +1,20 @@
# Generated by Django 5.0 on 2025-12-22 06:12
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('authentication', '0049_alter_bankaccountinformation_account_and_more'),
('herd', '0020_alter_rancher_ignore_purchase_limit'),
]
operations = [
migrations.AddField(
model_name='rancher',
name='organization',
field=models.ForeignKey(help_text='connect ranchers to their specific Taavoni', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ranchers', to='authentication.organization'),
),
]

View File

@@ -0,0 +1,35 @@
# Generated by Django 5.0 on 2025-12-22 07:16
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('authentication', '0049_alter_bankaccountinformation_account_and_more'),
('herd', '0021_rancher_organization'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='RancherOrganizationLink',
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)),
('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)),
('organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rancher_links', to='authentication.organization')),
('rancher', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='organization_links', to='herd.rancher')),
],
options={
'abstract': False,
},
),
]