<reponame>michaelnutt2/DjangoHotelManagementApp
from django.db import models

# Create your models here.
class Room(models.Model):
    room_number = models.IntegerField()
    num_beds = models.IntegerField()

class Customer(models.Model):
    first_name = models.CharField(max_length=20)
    last_name = models.CharField(max_length=20)
    phone = models.CharField(max_length=10)
    email = models.CharField(max_length=30)

class Booking(models.Model):
    room = models.ForeignKey(Room, on_delete=models.CASCADE)
    customer = models.ForeignKey(Customer, on_delete=models.CASCADE)
    start = models.DateField()
    end = models.DateField()

from django.db import models

# Create your models here.
class Room(models.Model):
    room_number = models.IntegerField()
    num_beds = models.IntegerField()

class Customer(models.Model):
    first_name = models.CharField(max_length=20)
    last_name = models.CharField(max_length=20)
    phone = models.CharField(max_length=10)
    email = models.CharField(max_length=30)

class Booking(models.Model):
    room = models.ForeignKey(Room, on_delete=models.CASCADE)
    customer = models.ForeignKey(Customer, on_delete=models.CASCADE)
    start = models.DateField()
    end = models.DateField()
# Create your models here.