Database Setup

This commit is contained in:
2025-05-29 14:30:22 -04:00
parent 7e32878cde
commit 034a722ca8
2 changed files with 32 additions and 0 deletions

View File

@ -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()),
],
),
]

View File

@ -1,3 +1,11 @@
from django.db import models from django.db import models
# Create your models here. # 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()