fix+add: seats + seat-chooser
This commit is contained in:
parent
2c6745e812
commit
b0cc5b5278
31 changed files with 808 additions and 115 deletions
|
@ -19,8 +19,8 @@ return new class extends Migration
|
|||
$table->string('cinema_name');
|
||||
$table->foreignId('address_id')->constrained('addresses', 'address_id');
|
||||
$table->foreignId('user_id')->constrained('users', 'user_id'); // who created this cinema
|
||||
$table->timestamp('cinema_open')->nullable();
|
||||
$table->timestamp('cinema_close')->nullable();
|
||||
$table->time('cinema_open');
|
||||
$table->time('cinema_close');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ return new class extends Migration
|
|||
$table->timestamps();
|
||||
$table->addColumn('integer', 'seat_row');
|
||||
$table->addColumn('integer', 'seat_column');
|
||||
$table->addColumn('enum', 'seat_type', ['values' => ['standard', 'wheelchair', 'loveseat']]);
|
||||
$table->enum('seat_type', ['standard', 'wheelchair', 'loveseat', 'not_available']);
|
||||
$table->foreignId('seat_linked_id')->nullable()->constrained('seats', 'seat_id');
|
||||
$table->foreignId('room_id')->constrained('rooms', 'room_id');
|
||||
$table->unique(['room_id', 'seat_row', 'seat_column']);
|
||||
});
|
||||
|
|
|
@ -25,6 +25,8 @@ class CinemaSeeder extends Seeder
|
|||
'address_zip' => '12345',
|
||||
'address_phone' => '123-456-7890',
|
||||
],
|
||||
'cinema_open' => '10:00:00',
|
||||
'cinema_close' => '22:00:00',
|
||||
],
|
||||
[
|
||||
'cinema_name' => 'Cinema 2',
|
||||
|
@ -36,6 +38,8 @@ class CinemaSeeder extends Seeder
|
|||
'address_zip' => '12345',
|
||||
'address_phone' => '123-456-7890',
|
||||
],
|
||||
'cinema_open' => '12:00:00',
|
||||
'cinema_close' => '23:00:00',
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -44,6 +48,8 @@ class CinemaSeeder extends Seeder
|
|||
$c = new \App\Models\Cinema();
|
||||
$c->cinema_name = $cinema['cinema_name'];
|
||||
$c->user_id = 1;
|
||||
$c->cinema_open = $cinema['cinema_open'];
|
||||
$c->cinema_close = $cinema['cinema_close'];
|
||||
|
||||
$a = new \App\Models\Address();
|
||||
$a->address_street = $cinema['cinema_address']['address_line_1'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue