Initial Commit; base feats
This commit is contained in:
commit
9732135e90
137 changed files with 13856 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('prices', function (Blueprint $table) {
|
||||
$table->id('price_id');
|
||||
$table->timestamps();
|
||||
$table->enum('price_type', ['adult', 'child', 'senior']);
|
||||
$table->decimal('price', 5, 2);
|
||||
$table->foreignId('showing_id')->constrained('showings', 'showing_id');
|
||||
$table->foreignId('user_id')->constrained('users', 'user_id'); // who added the price?
|
||||
$table->unique(['showing_id', 'price_type']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('prices');
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue