From 034a722ca8bc90274ead06b6c4b498f0b17b6974 Mon Sep 17 00:00:00 2001 From: Jonathan Rampersad Date: Thu, 29 May 2025 14:30:22 -0400 Subject: [PATCH] Database Setup --- .../migrations/0001_initial.py | 24 +++++++++++++++++++ worldtour/asiatoursagency/models.py | 8 +++++++ 2 files changed, 32 insertions(+) create mode 100644 worldtour/asiatoursagency/migrations/0001_initial.py diff --git a/worldtour/asiatoursagency/migrations/0001_initial.py b/worldtour/asiatoursagency/migrations/0001_initial.py new file mode 100644 index 0000000..b2b691d --- /dev/null +++ b/worldtour/asiatoursagency/migrations/0001_initial.py @@ -0,0 +1,24 @@ +# Generated by Django 5.2 on 2025-05-29 18:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Tour', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('origin_country', models.CharField(max_length=64)), + ('destination_country', models.CharField(max_length=64)), + ('number_of_nights', models.IntegerField()), + ('price', models.IntegerField()), + ], + ), + ] diff --git a/worldtour/asiatoursagency/models.py b/worldtour/asiatoursagency/models.py index 71a8362..c834b09 100644 --- a/worldtour/asiatoursagency/models.py +++ b/worldtour/asiatoursagency/models.py @@ -1,3 +1,11 @@ from django.db import models # Create your models here. +class Tour(models.Model): + # We need a origin country, destination, number of nights and price of the tour. + origin_country = models.CharField(max_length=64) + destination_country = models.CharField(max_length=64) + number_of_nights = models.IntegerField() + price = models.IntegerField() + +