fix organization pagination - quota distribution
This commit is contained in:
23
apps/product/migrations/0019_product_product_id_and_more.py
Normal file
23
apps/product/migrations/0019_product_product_id_and_more.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.0 on 2025-06-10 11:51
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('product', '0018_alter_quota_distribution_mode_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='product',
|
||||
name='product_id',
|
||||
field=models.BigIntegerField(default=0),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='quotalivestockallocation',
|
||||
name='livestock_group',
|
||||
field=models.CharField(choices=[('rural', 'روستایی'), ('industrial', 'صنعتی'), ('nomadic', 'عشایری')], max_length=20),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,25 @@
|
||||
# Generated by Django 5.0 on 2025-06-10 12:10
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authorization', '0017_alter_permissions_name'),
|
||||
('product', '0019_product_product_id_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='quota',
|
||||
name='registerer_organization',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='quotas', to='authorization.userrelations'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='quota',
|
||||
name='product',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='quotas', to='product.product'),
|
||||
),
|
||||
]
|
||||
36
apps/product/migrations/0021_quotalivestockagelimitation.py
Normal file
36
apps/product/migrations/0021_quotalivestockagelimitation.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# Generated by Django 5.0 on 2025-06-11 08:03
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('product', '0020_quota_registerer_organization_alter_quota_product'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='QuotaLiveStockAgeLimitation',
|
||||
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)),
|
||||
('livestock_type', models.CharField(choices=[('light', 'سبک'), ('heavy', 'سنگین')], max_length=20)),
|
||||
('livestock_subtype', models.CharField(choices=[('milking', 'شیری'), ('fattening', 'پرواری')], max_length=20)),
|
||||
('age_month', models.PositiveIntegerField(default=0)),
|
||||
('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)),
|
||||
('quota', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='livestock_age_limitations', to='product.quota')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,33 @@
|
||||
# Generated by Django 5.0 on 2025-06-11 09:16
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('product', '0021_quotalivestockagelimitation'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='quota',
|
||||
name='quota_balance',
|
||||
field=models.PositiveIntegerField(default=0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='quota',
|
||||
name='quota_distributed',
|
||||
field=models.PositiveIntegerField(default=0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='quota',
|
||||
name='quota_weight',
|
||||
field=models.PositiveIntegerField(default=0),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='quota',
|
||||
name='quota_id',
|
||||
field=models.CharField(max_length=15, null=True, unique=True),
|
||||
),
|
||||
]
|
||||
18
apps/product/migrations/0023_alter_quota_quota_id.py
Normal file
18
apps/product/migrations/0023_alter_quota_quota_id.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0 on 2025-06-11 10:25
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('product', '0022_quota_quota_balance_quota_quota_distributed_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='quota',
|
||||
name='quota_id',
|
||||
field=models.PositiveBigIntegerField(blank=True, null=True),
|
||||
),
|
||||
]
|
||||
19
apps/product/migrations/0024_quota_assigned_organizations.py
Normal file
19
apps/product/migrations/0024_quota_assigned_organizations.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 5.0 on 2025-06-11 10:52
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authorization', '0017_alter_permissions_name'),
|
||||
('product', '0023_alter_quota_quota_id'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='quota',
|
||||
name='assigned_organizations',
|
||||
field=models.ManyToManyField(blank=True, related_name='assigned_quotas', to='authorization.userrelations'),
|
||||
),
|
||||
]
|
||||
18
apps/product/migrations/0025_broker_name.py
Normal file
18
apps/product/migrations/0025_broker_name.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0 on 2025-06-11 11:43
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('product', '0024_quota_assigned_organizations'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='broker',
|
||||
name='name',
|
||||
field=models.CharField(max_length=255, null=True),
|
||||
),
|
||||
]
|
||||
42
apps/product/migrations/0026_quotadistribution.py
Normal file
42
apps/product/migrations/0026_quotadistribution.py
Normal file
@@ -0,0 +1,42 @@
|
||||
# Generated by Django 5.0 on 2025-06-11 12:29
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authorization', '0017_alter_permissions_name'),
|
||||
('product', '0025_broker_name'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='QuotaDistribution',
|
||||
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)),
|
||||
('description', models.TextField(max_length=1000, null=True)),
|
||||
('distribution_id', models.CharField(max_length=20, null=True)),
|
||||
('weight', models.PositiveBigIntegerField(default=0)),
|
||||
('warehouse_entry', models.PositiveBigIntegerField(default=0)),
|
||||
('warehouse_balance', models.PositiveBigIntegerField(default=0)),
|
||||
('been_sold', models.PositiveBigIntegerField(default=0)),
|
||||
('assigned_organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='distributions', to='authorization.userrelations')),
|
||||
('assigner_organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='distributions_assigner', to='authorization.userrelations')),
|
||||
('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)),
|
||||
('quota', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='distributions_assigned', to='product.quota')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,20 @@
|
||||
# Generated by Django 5.0 on 2025-06-11 13:11
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authorization', '0017_alter_permissions_name'),
|
||||
('product', '0026_quotadistribution'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='quotadistribution',
|
||||
name='assigner_organization',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='distributions_assigner', to='authorization.userrelations'),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user