This commit is contained in:
behruz-dev
2025-11-27 18:45:43 +05:00
parent bf2a3c0842
commit e2386dcb11
3 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.2 on 2025-11-27 13:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shared', '0010_factory'),
]
operations = [
migrations.AddField(
model_name='tourplan',
name='date',
field=models.DateField(blank=True, null=True),
),
]

View File

@@ -13,6 +13,7 @@ class TourPlan(BaseModel):
latitude = models.FloatField(null=True, blank=True) latitude = models.FloatField(null=True, blank=True)
longitude = models.FloatField(null=True, blank=True) longitude = models.FloatField(null=True, blank=True)
location_send = models.BooleanField(default=False) location_send = models.BooleanField(default=False)
date = models.DateField(null=True, blank=True)
def __str__(self): def __str__(self):
return f"{self.user.first_name}'s tour plan to {self.place_name}" return f"{self.user.first_name}'s tour plan to {self.place_name}"

View File

@@ -9,7 +9,7 @@ class TourPlanSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = TourPlan model = TourPlan
fields = [ fields = [
'id', 'place_name', 'longitude', 'latitude', 'location_send', 'created_at' 'id', 'place_name', 'longitude', 'latitude', 'location_send', 'date', 'created_at'
] ]