Files
lelong/database/migrations/2022_03_07_061858_create_pengesahan_table.php
T
2022-04-26 16:00:56 +08:00

55 lines
1.7 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePengesahanTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pengesahan', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('lelong_id')->unsigned();
$table->unsignedBigInteger('lelongbid_id')->unsigned();
$table->unsignedBigInteger('lelongbidmarhun_id')->unsigned();
$table->string('norujukan');
$table->integer('disahkan_oleh')->nullable();
$table->datetime('disahkan_pada')->nullable();
$table->integer('diminta_oleh');
$table->datetime('diminta_pada');
$table->integer('status')->default(0); //1 = terima, 2 = tangguh lelong
$table->integer('status_ubah')->default(0); //1 = ubah mutu, 2 = tambah marhun, 3 = hapus marhun, 4 = ubah berat, 5 = ubah mutu & berat, 6 = tangguh lelong pc
$table->timestamps();
// $table->foreign('lelong_id')
// ->references('id')->on('lelong')
// ->onDelete('cascade');
// $table->foreign('lelongbid_id')
// ->references('id')->on('lelongbid')
// ->onDelete('cascade');
// $table->foreign('lelongbidmarhun_id')
// ->references('id')->on('lelongbidmarhun')
// ->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pengesahan');
}
}