change serializer fields

This commit is contained in:
behruz-dev
2025-08-07 17:29:05 +05:00
parent 2999d4bdab
commit c902a09c7b
9 changed files with 157 additions and 8 deletions

View File

@@ -0,0 +1,65 @@
# Generated by Django 5.2.4 on 2025-08-07 16:01
import django.db.models.deletion
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0004_product_type'),
('projects', '0012_project_is_archive'),
]
operations = [
migrations.CreateModel(
name='ProjectEstimate',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('number', models.PositiveIntegerField(default=1)),
('name', models.CharField(max_length=200)),
],
options={
'verbose_name': 'Loyiha smetasi',
'verbose_name_plural': 'Loyiha smetalari',
},
),
migrations.CreateModel(
name='EstimateProduct',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('quantity', models.PositiveIntegerField(default=1)),
('price', models.PositiveBigIntegerField(blank=True, null=True)),
('date', models.DateField(blank=True, null=True)),
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='estimate_products', to='products.product')),
('unity', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='estimate_products', to='products.unity')),
],
options={
'verbose_name': 'Smeta mahsuloti',
'verbose_name_plural': 'Smeta mahsulotlari',
},
),
migrations.CreateModel(
name='EstimateWork',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('number', models.PositiveIntegerField(default=1)),
('name', models.CharField(max_length=200)),
('quantity', models.PositiveIntegerField(default=1)),
('price', models.PositiveBigIntegerField(blank=True, null=True)),
('date', models.DateField(blank=True, null=True)),
('unity', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='estimate_works', to='products.unity')),
('estimate', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='estimate_works', to='projects.projectestimate')),
],
options={
'verbose_name': 'Smeta ishlar',
},
),
]