Files
lelong/database/migrations/2022_01_23_042652_create_lelongbidder_table.php
ismailmasseran e29a5891c8 Bugfix/list clickup issue (#5)
Reviewed-on: #5
Co-authored-by: ISMAIL MASSERAN <ismail@koppkb.com>
Co-committed-by: ISMAIL MASSERAN <ismail@koppkb.com>
2026-10-19 13:30:36 +08:00

52 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');
}
}