add new api

This commit is contained in:
behruz-dev
2025-08-19 15:55:24 +05:00
parent 4e8c59668a
commit 3887fc7a87
10 changed files with 269 additions and 4 deletions

View File

@@ -0,0 +1,34 @@
# Generated by Django 5.2.4 on 2025-08-19 15:00
import django.db.models.deletion
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orders', '0004_remove_order_project_department_order_project_folder_and_more'),
]
operations = [
migrations.CreateModel(
name='Offer',
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)),
('name', models.CharField(max_length=200)),
('price', models.PositiveBigIntegerField()),
('phone', models.CharField(blank=True, max_length=15, null=True)),
('comment', models.TextField(blank=True, null=True)),
('qqs', models.BooleanField(blank=True, default=False, null=True)),
('number', models.PositiveIntegerField(default=1)),
('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='offers', to='orders.order')),
],
options={
'verbose_name': 'Taklif',
'verbose_name_plural': 'Takliflar',
},
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.2.4 on 2025-08-19 15:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orders', '0005_offer'),
]
operations = [
migrations.AddField(
model_name='offer',
name='price_type',
field=models.CharField(choices=[('UZS', 'uzs'), ('USD', 'usd')], default='uzs'),
),
]