91 lines
3.6 KiB
PHP
91 lines
3.6 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateCawangansTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('cawangan', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('caw_dbname')->nullable();
|
|
$table->string('caw_dbuser')->nullable();
|
|
$table->string('caw_dbpass')->nullable();
|
|
$table->string('caw_ip')->nullable();
|
|
$table->string('caw_name')->nullable();
|
|
$table->string('caw_code')->nullable();
|
|
$table->string('nama_bank')->nullable();
|
|
$table->string('bank_acc')->nullable();
|
|
$table->string('bank_acc_no')->nullable();
|
|
$table->string('alamat1')->nullable();
|
|
$table->string('alamat2')->nullable();
|
|
$table->string('notel')->nullable();
|
|
$table->string('nofaks')->nullable();
|
|
$table->string('lokasi')->nullable();
|
|
$table->string('pkb_jmc')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
|
|
Schema::create('gadai', function (Blueprint $table) {
|
|
$table->bigIncrements('id');
|
|
$table->string('kodcaw');
|
|
$table->string('norujukan');
|
|
$table->decimal('jbg', $precision = 7, $scale = 2);
|
|
$table->decimal('kadarupah', $precision = 5, $scale = 2)->nullable();
|
|
$table->decimal('upahsimpan', $precision = 11, $scale = 2)->nullable();
|
|
$table->decimal('ansuran', $precision = 11, $scale = 2)->nullable();
|
|
$table->decimal('nilaimarhun', $precision = 9, $scale = 2)->nullable();
|
|
$table->decimal('pinjaman', $precision = 9, $scale = 2)->nullable();
|
|
$table->decimal('bakiupah', $precision = 7, $scale = 2)->nullable();
|
|
$table->decimal('cajlain', $precision = 7, $scale = 2)->nullable();
|
|
$table->decimal('baki', $precision = 9, $scale = 2)->nullable();
|
|
$table->decimal('berat', $precision = 7, $scale = 2)->nullable();
|
|
$table->string('marhun')->nullable();
|
|
$table->decimal('gst_hj', $precision = 7, $scale = 2)->default(0.00);
|
|
$table->decimal('gst_cl', $precision = 7, $scale = 2)->default(0.00);
|
|
$table->decimal('percent', $precision = 7, $scale = 2)->nullable();
|
|
$table->integer('mora_upah')->default(0);
|
|
$table->date('t_gadai')->nullable();
|
|
$table->date('t_matang')->nullable();
|
|
$table->integer('sttebus')->nullable();
|
|
$table->integer('tagpalsu')->nullable();
|
|
$table->integer('tagpalsu2')->nullable();
|
|
$table->integer('taglel')->nullable();
|
|
$table->integer('lelong_tawarruq')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
|
|
Schema::create('gadaimarhun', function (Blueprint $table) {
|
|
$table->bigIncrements('id');
|
|
$table->unsignedBigInteger('gadai_id')->unsigned();
|
|
$table->decimal('bil', $precision = 3, $scale = 0);
|
|
$table->string('marhun');
|
|
$table->string('nota');
|
|
$table->string('karat');
|
|
$table->decimal('berat', $precision = 7, $scale = 2);
|
|
$table->timestamps();
|
|
|
|
$table->foreign('gadai_id')
|
|
->references('id')->on('gadai')
|
|
->onDelete('cascade');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('cawangan');
|
|
}
|
|
}
|