53 lines
1.5 KiB
PHP
53 lines
1.5 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateLelongbidderTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('lelongbidder', function (Blueprint $table) {
|
|
$table->bigIncrements('id');
|
|
$table->unsignedBigInteger('user_id')->unsigned();
|
|
$table->unsignedBigInteger('lelongbid_id')->unsigned();
|
|
$table->string('kodcaw')->nullable();
|
|
$table->string('nama_bidder');
|
|
$table->decimal('hargabida');
|
|
$table->string('notelbimbit');
|
|
$table->decimal('nilaimarhun');
|
|
$table->decimal('cajlelong');
|
|
$table->integer('status_bidder')->nullable(); //1 = win
|
|
$table->integer('payment_id')->nullable();
|
|
$table->integer('status_payment')->nullable(); // 1=paid, 2=memerlukan pengesahan operasi (CDM)
|
|
$table->datetime('masa_bidaan');
|
|
$table->timestamps();
|
|
|
|
|
|
$table->foreign('user_id')
|
|
->references('id')->on('users')
|
|
->onDelete('cascade');
|
|
|
|
$table->foreign('lelongbid_id')
|
|
->references('id')->on('lelongbid')
|
|
->onDelete('cascade');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('lelongbidder');
|
|
}
|
|
}
|