modyfikacja bazy + formularz dodawania klienta
This commit is contained in:
parent
316043e17f
commit
531adcee2e
BIN
hotel/db.sqlite3
BIN
hotel/db.sqlite3
Binary file not shown.
Binary file not shown.
32
hotel/rooms/migrations/0005_client_reservation.py
Normal file
32
hotel/rooms/migrations/0005_client_reservation.py
Normal 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')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user