Hotel/hotel/rooms/migrations/0005_client_reservation.py

33 lines
1.1 KiB
Python

# Generated by Django 2.1.5 on 2019-01-20 11:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('rooms', '0004_auto_20190112_2307'),
]
operations = [
migrations.CreateModel(
name='Client',
fields=[
('id_number', models.CharField(max_length=9, primary_key=True, serialize=False)),
('name', models.CharField(max_length=40)),
('surname', models.CharField(max_length=40)),
],
),
migrations.CreateModel(
name='Reservation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('begin_date', models.DateField()),
('end_date', models.DateField()),
('client_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rooms.Client')),
('room_number', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rooms.Room')),
],
),
]