mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
c3f153fe4b
Update Booking Logic Class Delete Booking Logic Class
47 lines
1.7 KiB
PHP
47 lines
1.7 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateBookingsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('bookings', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->bigInteger('company_id')->unsigned()->nullable();
|
|
$table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade');
|
|
$table->bigInteger('transferable_bank_id')->unsigned()->nullable();
|
|
$table->foreign('transferable_bank_id')->references('id')->on('company_banks')->onDelete('cascade');
|
|
$table->string('marking');
|
|
$table->string('reference');
|
|
$table->float('fix_amount', 20, 5)->nullable();
|
|
$table->bigInteger('fix_currency_id')->unsigned()->nullable();
|
|
$table->foreign('fix_currency_id')->references('id')->on('currencies')->onDelete('cascade');
|
|
$table->bigInteger('convertible_currency_id')->unsigned()->nullable();
|
|
$table->foreign('convertible_currency_id')->references('id')->on('currencies')->onDelete('cascade');
|
|
$table->bigInteger('conversion_currency_id')->unsigned()->nullable();
|
|
$table->foreign('conversion_currency_id')->references('id')->on('currencies')->onDelete('cascade');
|
|
$table->integer('status')->default(1);
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('bookings');
|
|
}
|
|
}
|