muammo va yordam sorash uchun api chiqarildi

This commit is contained in:
behruz-dev
2025-12-03 15:40:55 +05:00
parent d7d7f23dca
commit 9276124cea
9 changed files with 164 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
# Generated by Django 5.2 on 2025-12-03 10:29
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shared', '0013_alter_district_name_alter_place_name'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Support',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('problem', models.TextField()),
('date', models.DateField()),
('district', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='supports', to='shared.district')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='supports', to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.2 on 2025-12-03 10:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shared', '0014_support'),
]
operations = [
migrations.AddField(
model_name='support',
name='type',
field=models.CharField(choices=[('PROBLEM', 'muammo'), ('HELP', 'yordam')], default='PROBLEM', max_length=8),
),
]