web qism tugadi

This commit is contained in:
behruz-dev
2025-11-25 16:50:30 +05:00
parent 8d7738483c
commit 55bb751899
16 changed files with 500 additions and 5 deletions

View File

@@ -0,0 +1,63 @@
# Generated by Django 5.2 on 2025-11-25 10:50
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shared', '0006_plan_is_done'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Location',
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)),
('longitude', models.FloatField()),
('langitude', models.FloatField()),
('district', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='locations', to='shared.district')),
('doctor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='locations', to='shared.doctor')),
('pharmacy', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='locations', to='shared.pharmacy')),
('place', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='locations', to='shared.place')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='locations', to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='TourPlan',
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)),
('latitude', models.FloatField(blank=True, null=True)),
('longitude', models.FloatField(blank=True, null=True)),
('district', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tour_plans', to='shared.district')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tour_plans', to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='UserLocation',
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)),
('latitude', models.FloatField()),
('longitude', models.FloatField()),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_locations', to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
]

View File

@@ -0,0 +1,39 @@
# Generated by Django 5.2 on 2025-11-25 11:40
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shared', '0007_location_tourplan_userlocation'),
]
operations = [
migrations.RenameField(
model_name='location',
old_name='langitude',
new_name='latitude',
),
migrations.AlterField(
model_name='location',
name='district',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='locations', to='shared.district'),
),
migrations.AlterField(
model_name='location',
name='doctor',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='locations', to='shared.doctor'),
),
migrations.AlterField(
model_name='location',
name='pharmacy',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='locations', to='shared.pharmacy'),
),
migrations.AlterField(
model_name='location',
name='place',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='locations', to='shared.place'),
),
]