first commit
This commit is contained in:
79
core/apps/management/migrations/0001_initial.py
Normal file
79
core/apps/management/migrations/0001_initial.py
Normal file
@@ -0,0 +1,79 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-04 12:15
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='District',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Region',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100, unique=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Device',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('toys_count', models.PositiveIntegerField(default=0)),
|
||||
('monthly_fee', models.DecimalField(decimal_places=2, max_digits=10)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('district', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='management.district')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='district',
|
||||
name='region',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='districts', to='management.region'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Warehouse',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100, unique=True)),
|
||||
('toys_count', models.PositiveIntegerField(default=0)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('region', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='warehouses', to='management.region')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ToyMovement',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('movement_type', models.CharField(choices=[('from_warehouse', 'Warehouse → Device'), ('to_device', 'Device refill'), ('between_warehouses', 'Warehouse → Warehouse')], max_length=30)),
|
||||
('quantity', models.PositiveIntegerField()),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
|
||||
('device', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='management.device')),
|
||||
('from_warehouse', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='outgoing', to='management.warehouse')),
|
||||
('to_warehouse', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='incoming', to='management.warehouse')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='device',
|
||||
name='warehouse',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='management.warehouse'),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='district',
|
||||
unique_together={('region', 'name')},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,46 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-04 12:41
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ExpenseType',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=255, unique=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Expense',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('amount', models.DecimalField(decimal_places=2, max_digits=12)),
|
||||
('is_confirmed', models.BooleanField(default=False)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('confirmed_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='confirmed_expenses', to=settings.AUTH_USER_MODEL)),
|
||||
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
|
||||
('expense_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='expenses', to='management.expensetype')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Income',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('amount', models.DecimalField(decimal_places=2, max_digits=12)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('confirmed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='confirmed_income', to=settings.AUTH_USER_MODEL)),
|
||||
('device', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='management.device')),
|
||||
('reported_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='reported_income', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,125 @@
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def load_data(apps, schema_editor):
|
||||
Region = apps.get_model("management", "Region")
|
||||
District = apps.get_model("management", "District")
|
||||
|
||||
data = {
|
||||
"Qoraqalpogʻiston Respublikasi": [
|
||||
"Amudaryo tumani", "Beruniy tumani", "Chimboy tumani",
|
||||
"Ellikqalʼa tumani", "Kegeyli tumani", "Moʻynoq tumani",
|
||||
"Nukus tumani", "Qanlikoʻl tumani", "Qoʻngʻirot tumani",
|
||||
"Qoraoʻzak tumani", "Shumanay tumani", "Taxiatosh tumani",
|
||||
"Taxtakoʻpir tumani", "Toʻrtkoʻl tumani", "Xoʻjayli tumani"
|
||||
],
|
||||
"Andijon viloyati": [
|
||||
"Andijon tumani", "Asaka tumani", "Baliqchi tumani",
|
||||
"Boʻz tumani", "Buloqboshi tumani", "Izboskan tumani",
|
||||
"Jalaquduq tumani", "Marhamat tumani", "Oltinkoʻl tumani",
|
||||
"Paxtaobod tumani", "Qoʻrgʻontepa tumani",
|
||||
"Shahrixon tumani", "Ulugʻnor tumani", "Xoʻjaobod tumani"
|
||||
],
|
||||
"Buxoro viloyati": [
|
||||
"Buxoro tumani", "Gʻijduvon tumani", "Jondor tumani",
|
||||
"Kogon tumani", "Olot tumani", "Peshku tumani",
|
||||
"Qorakoʻl tumani", "Qorovulbozor tumani",
|
||||
"Romitan tumani", "Shofirkon tumani", "Vobkent tumani"
|
||||
],
|
||||
"Fargʻona viloyati": [
|
||||
"Bagʻdod tumani", "Beshariq tumani", "Dangʻara tumani",
|
||||
"Fargʻona tumani", "Furqat tumani", "Oltiariq tumani",
|
||||
"Qoʻshtepa tumani", "Quva tumani", "Rishton tumani",
|
||||
"Soʻx tumani", "Toshloq tumani", "Uchkoʻprik tumani",
|
||||
"Yozyovon tumani"
|
||||
],
|
||||
"Jizzax viloyati": [
|
||||
"Arnasoy tumani", "Baxmal tumani", "Doʻstlik tumani",
|
||||
"Forish tumani", "Gʻallaorol tumani", "Mirzachoʻl tumani",
|
||||
"Paxtakor tumani", "Sharof Rashidov tumani",
|
||||
"Yangiobod tumani", "Zomin tumani", "Zafarobod tumani"
|
||||
],
|
||||
"Xorazm viloyati": [
|
||||
"Bogʻot tumani", "Gurlan tumani", "Hazorasp tumani",
|
||||
"Qoʻshkoʻpir tumani", "Shovot tumani",
|
||||
"Urganch tumani", "Xazorasp tumani", "Xiva tumani",
|
||||
"Yangiariq tumani", "Yangibozor tumani"
|
||||
],
|
||||
"Namangan viloyati": [
|
||||
"Chortoq tumani", "Chust tumani", "Kosonsoy tumani",
|
||||
"Mingbuloq tumani", "Namangan tumani",
|
||||
"Norin tumani", "Pop tumani", "Toʻraqoʻrgʻon tumani",
|
||||
"Uchqoʻrgʻon tumani", "Uychi tumani", "Yangiqoʻrgʻon tumani"
|
||||
],
|
||||
"Navoiy viloyati": [
|
||||
"Karmana tumani", "Konimex tumani", "Navbahor tumani",
|
||||
"Nurota tumani", "Qiziltepa tumani",
|
||||
"Tomdi tumani", "Uchquduq tumani", "Xatirchi tumani"
|
||||
],
|
||||
"Qashqadaryo viloyati": [
|
||||
"Chiroqchi tumani", "Dehqonobod tumani",
|
||||
"Gʻuzor tumani", "Kasbi tumani", "Kitob tumani",
|
||||
"Koson tumani", "Mirishkor tumani", "Muborak tumani",
|
||||
"Nishon tumani", "Qamashi tumani",
|
||||
"Qarshi tumani", "Shahrisabz tumani",
|
||||
"Yakkabogʻ tumani"
|
||||
],
|
||||
"Samarqand viloyati": [
|
||||
"Bulungʻur tumani", "Ishtixon tumani",
|
||||
"Jomboy tumani", "Kattaqoʻrgʻon tumani",
|
||||
"Narpay tumani", "Nurobod tumani",
|
||||
"Oqdaryo tumani", "Paxtachi tumani",
|
||||
"Pastdargʻom tumani", "Payariq tumani",
|
||||
"Qoʻshrabot tumani", "Samarqand tumani",
|
||||
"Toyloq tumani", "Urgut tumani"
|
||||
],
|
||||
"Surxondaryo viloyati": [
|
||||
"Angor tumani", "Bandixon tumani", "Boysun tumani",
|
||||
"Denov tumani", "Jarqoʻrgʻon tumani",
|
||||
"Muzrabot tumani", "Oltinsoy tumani",
|
||||
"Qiziriq tumani", "Qumqoʻrgʻon tumani",
|
||||
"Sariosiyo tumani", "Sherobod tumani",
|
||||
"Shoʻrchi tumani", "Termiz tumani", "Uzun tumani"
|
||||
],
|
||||
"Sirdaryo viloyati": [
|
||||
"Boyovut tumani", "Guliston tumani",
|
||||
"Mirzaobod tumani", "Oqoltin tumani",
|
||||
"Sayxunobod tumani", "Sardoba tumani",
|
||||
"Xovos tumani"
|
||||
],
|
||||
"Toshkent viloyati": [
|
||||
"Angren tumani", "Bekobod tumani",
|
||||
"Boʻka tumani", "Boʻstonliq tumani",
|
||||
"Chinoz tumani", "Ohangaron tumani",
|
||||
"Oqqoʻrgʻon tumani", "Parkent tumani",
|
||||
"Piskent tumani", "Quyi Chirchiq tumani",
|
||||
"Yangiyoʻl tumani", "Yuqori Chirchiq tumani",
|
||||
"Zangiota tumani"
|
||||
],
|
||||
"Toshkent shahri": [
|
||||
"Bektemir tumani", "Chilonzor tumani",
|
||||
"Hamza tumani", "Mirobod tumani",
|
||||
"Mirzo Ulugʻbek tumani", "Olmazor tumani",
|
||||
"Sergeli tumani", "Shayxontohur tumani",
|
||||
"Uchtepa tumani", "Yakkasaroy tumani",
|
||||
"Yashnobod tumani", "Yunusobod tumani"
|
||||
],
|
||||
}
|
||||
|
||||
for region_name, districts in data.items():
|
||||
region, _ = Region.objects.get_or_create(name=region_name)
|
||||
District.objects.bulk_create(
|
||||
[District(name=d, region=region) for d in districts],
|
||||
ignore_conflicts=True
|
||||
)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("management", "0002_expensetype_expense_income"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(load_data),
|
||||
]
|
||||
18
core/apps/management/migrations/0004_alter_device_name.py
Normal file
18
core/apps/management/migrations/0004_alter_device_name.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-05 05:50
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0003_load_uzbekistan_regions_districts'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='device',
|
||||
name='name',
|
||||
field=models.CharField(max_length=100, unique=True),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,24 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-05 06:05
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0004_alter_device_name'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='toymovement',
|
||||
name='from_warehouse',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='outgoing', to='management.warehouse'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='toymovement',
|
||||
name='movement_type',
|
||||
field=models.CharField(choices=[('from_warehouse', 'Warehouse → Device'), ('between_warehouses', 'Warehouse → Warehouse')], max_length=30),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-05 06:16
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0005_alter_toymovement_from_warehouse_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='device',
|
||||
name='warehouse',
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,21 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-05 07:49
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0006_remove_device_warehouse'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='expense',
|
||||
name='expense_type',
|
||||
field=models.CharField(choices=[('rent', 'Rent'), ('salary', 'Salary'), ('utilities', 'Utilities'), ('maintenance', 'Maintenance'), ('other', 'Other')], default='other', max_length=20),
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='ExpenseType',
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-05 07:52
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0007_alter_expense_expense_type_delete_expensetype'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='expense',
|
||||
name='expense_type',
|
||||
field=models.CharField(choices=[('rent', 'Ijara'), ('salary', 'Maosh'), ('utilities', 'Kommunal to‘lovlar'), ('maintenance', 'Texnik xizmat'), ('other', 'Boshqa')], default='other', max_length=20),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-05 07:53
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0008_alter_expense_expense_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='expense',
|
||||
name='expense_type',
|
||||
field=models.CharField(choices=[('rent', 'Ijara'), ('salary', 'Maosh'), ('utilities', 'Kommunal to‘lovlar'), ('maintenance', 'Texnik xizmat'), ('food', 'Oziq-ovqat'), ('transport', "Yo'lkira"), ('other', 'Boshqa')], default='other', max_length=20),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,31 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-05 08:03
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0009_alter_expense_expense_type'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='expense',
|
||||
name='device',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='management.device'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='expense',
|
||||
name='employee',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='salaries', to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='expense',
|
||||
name='expense_type',
|
||||
field=models.CharField(choices=[('rent', 'Ijara'), ('salary', 'Maosh'), ('utilities', 'Kommunal to‘lovlar'), ('maintenance', 'Texnik xizmat'), ('food', 'Oziq-ovqat'), ('transport', "Yo'lkira"), ('buy_toys', 'Oʻyinchoqlar sotib olish'), ('other', 'Boshqa')], default='other', max_length=20),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,21 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-05 08:04
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0010_expense_device_expense_employee_and_more'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='expense',
|
||||
name='confirmed_by',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='confirmed_expenses', to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,41 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-05 09:37
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0011_alter_expense_confirmed_by'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='income',
|
||||
name='reported_by',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='income',
|
||||
name='created_by',
|
||||
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, related_name='created_incomes', to=settings.AUTH_USER_MODEL),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='income',
|
||||
name='is_confirmed',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='income',
|
||||
name='confirmed_by',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='confirmed_incomes', to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='income',
|
||||
name='device',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='incomes', to='management.device'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,44 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-06 07:08
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0012_remove_income_reported_by_income_created_by_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='device',
|
||||
old_name='name',
|
||||
new_name='address',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='device',
|
||||
name='monthly_fee',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='device',
|
||||
name='toys_count',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='toymovement',
|
||||
name='movement_type',
|
||||
field=models.CharField(choices=[('from_warehouse', 'Ombordan → Aparatga'), ('between_warehouses', 'Ombordan → Omborga')], max_length=30),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Rent',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('address', models.CharField(max_length=100, unique=True)),
|
||||
('due_date', models.DateField()),
|
||||
('amount', models.IntegerField()),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('device', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='device_rents', to='management.device')),
|
||||
('district', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='district_rents', to='management.district')),
|
||||
],
|
||||
),
|
||||
]
|
||||
18
core/apps/management/migrations/0014_alter_income_amount.py
Normal file
18
core/apps/management/migrations/0014_alter_income_amount.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-06 12:15
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0013_rename_name_device_address_remove_device_monthly_fee_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='income',
|
||||
name='amount',
|
||||
field=models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-06 12:54
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('management', '0014_alter_income_amount'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='income',
|
||||
name='confirmed_by',
|
||||
),
|
||||
]
|
||||
0
core/apps/management/migrations/__init__.py
Normal file
0
core/apps/management/migrations/__init__.py
Normal file
Reference in New Issue
Block a user