1
0

modyfikacja bazy + formularz dodawania klienta

This commit is contained in:
Hokan 2019-01-20 12:06:40 +01:00
parent 316043e17f
commit 531adcee2e
4 changed files with 32 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,32 @@
# 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')),
],
),
]