97 lines
4.0 KiB
PHP
97 lines
4.0 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, 7 = ubah marhun,8 = ubah mutu, berat dan marhun,9=ubah mutu dan marhun,10=ubah berat dan marhun
|
|
$table->string('request_berat')->nullable();
|
|
$table->string('request_karat')->nullable();
|
|
$table->string('request_marhun')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
|
|
|
|
Schema::create('scan_semak', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('kodcaw');
|
|
$table->unsignedBigInteger('lelong_id')->unsigned();
|
|
$table->integer('lelongbid_id');
|
|
$table->string('norujukan');
|
|
$table->string('khazanah_id', '100');
|
|
$table->string('penilai_id', '100')->nullable();
|
|
$table->datetime('scan_keluar');
|
|
$table->datetime('terima_marhun')->nullable();
|
|
$table->datetime('serah_marhun')->nullable();
|
|
$table->datetime('scan_masuk')->nullable();
|
|
$table->integer('serahkpdpembida')->default(0);
|
|
$table->timestamps();
|
|
});
|
|
|
|
Schema::create('scan_jual', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('kodcaw');
|
|
$table->unsignedBigInteger('lelong_id')->unsigned();
|
|
$table->integer('lelongbid_id');
|
|
$table->string('norujukan');
|
|
$table->string('khazanah_id', '100');
|
|
$table->datetime('scan_keluar');
|
|
$table->datetime('serah_marhun')->nullable();
|
|
$table->integer('serahkpdpembida')->default(0);
|
|
$table->timestamps();
|
|
});
|
|
|
|
Schema::create('temppengesahan', 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, 7 = ubah marhun,8 = ubah mutu, berat dan marhun,9=ubah mutu dan marhun,10=ubah berat dan marhun
|
|
$table->string('request_berat')->nullable();
|
|
$table->string('request_karat')->nullable();
|
|
$table->string('request_marhun')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('pengesahan');
|
|
Schema::dropIfExists('scan_semak');
|
|
Schema::dropIfExists('scan_jual');
|
|
Schema::dropIfExists('temppengesahan');
|
|
}
|
|
}
|