latest
This commit is contained in:
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSimulasisTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('simulasi', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('tarikh_lelong');
|
||||
$table->time('masatamat_lelong')->nullable();
|
||||
$table->string('kali')->nullable();
|
||||
$table->string('harga_emas_asas');
|
||||
$table->string('jbg');
|
||||
$table->integer('cajlelong');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('cawangan_simulasi', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('simulasi_id')->unsigned();
|
||||
$table->unsignedBigInteger('caw_id')->unsigned();
|
||||
$table->string('online');
|
||||
$table->string('export_data_sts')->nullable();
|
||||
$table->string('import_data_sts')->nullable();
|
||||
$table->date('export_data_stsdate')->nullable();
|
||||
$table->date('import_data_sts_date')->nullable();
|
||||
$table->string('lokasi');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('caw_id')
|
||||
->references('id')->on('cawangan')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('simulasi_id')
|
||||
->references('id')->on('simulasi')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('simulasibid', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('caw_id')->unsigned();
|
||||
$table->string('kodcaw');
|
||||
$table->string('norujukan');
|
||||
$table->date('t_lelong');
|
||||
$table->decimal('hargaasas', $precision = 9, $scale = 2);
|
||||
$table->decimal('hargajual', $precision = 9, $scale = 2);
|
||||
$table->date('t_jual');
|
||||
$table->integer('nopembeli');
|
||||
$table->decimal('jbg', $precision = 7, $scale = 2);
|
||||
$table->decimal('kadarupah', $precision = 5, $scale = 2);
|
||||
$table->decimal('upahsimpan', $precision = 11, $scale = 2);
|
||||
$table->decimal('ansuran', $precision = 11, $scale = 2);
|
||||
$table->decimal('nilaimarhun', $precision = 9, $scale = 2);
|
||||
$table->decimal('pinjaman', $precision = 9, $scale = 2);
|
||||
$table->decimal('bakiupah', $precision = 7, $scale = 2);
|
||||
$table->decimal('cajlain', $precision = 7, $scale = 2);
|
||||
$table->decimal('cajlelong', $precision = 7, $scale = 2);
|
||||
$table->decimal('baki', $precision = 9, $scale = 2);
|
||||
$table->decimal('berat', $precision = 7, $scale = 2);
|
||||
$table->string('marhun');
|
||||
$table->decimal('gst_hj', $precision = 7, $scale = 2);
|
||||
$table->decimal('gst_cl', $precision = 7, $scale = 2);
|
||||
$table->decimal('percent', $precision = 7, $scale = 2);
|
||||
$table->integer('status_jual');
|
||||
$table->integer('status_payment');
|
||||
$table->integer('mora_upah');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('caw_id')
|
||||
->references('id')->on('cawangan')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('simulasibidmarhun', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('simulasibid_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->decimal('harga', $precision = 5, $scale = 2);
|
||||
$table->decimal('n_marhun', $precision = 9, $scale = 2);
|
||||
$table->decimal('hargaasas', $precision = 11, $scale = 2);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('simulasibid_id')
|
||||
->references('id')->on('simulasibid')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('simkarat', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('simulasi_id')->unsigned();
|
||||
$table->string('karat');
|
||||
$table->string('keterangan');
|
||||
$table->decimal('harga', $precision = 5, $scale = 2)->nullable();
|
||||
$table->decimal('harga2', $precision = 5, $scale = 2)->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('simulasi_id')
|
||||
->references('id')->on('simulasi')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
|
||||
Schema::create('simkarat_temp', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('simulasi_id')->unsigned();
|
||||
$table->string('karat');
|
||||
$table->string('keterangan');
|
||||
$table->decimal('harga', $precision = 5, $scale = 2);
|
||||
$table->decimal('harga2', $precision = 5, $scale = 2);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('simulasi_id')
|
||||
->references('id')->on('simulasi')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('simulasi');
|
||||
Schema::dropIfExists('cawangan_simulasi');
|
||||
Schema::dropIfExists('simulasibid');
|
||||
Schema::dropIfExists('simulasibidmarhun');
|
||||
Schema::dropIfExists('simkarat');
|
||||
Schema::dropIfExists('simkarat_temp');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLelongsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('lelong', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('tarikh_lelong');
|
||||
$table->time('masatamat_lelong')->nullable();
|
||||
$table->string('kali')->nullable();
|
||||
$table->string('harga_emas_asas');
|
||||
$table->string('jbg');
|
||||
$table->integer('cajlelong');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('cawangan_lelong', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('lelong_id')->unsigned();
|
||||
$table->unsignedBigInteger('caw_id')->unsigned();
|
||||
$table->string('online');
|
||||
$table->string('export_data_sts')->nullable();
|
||||
$table->string('import_data_sts')->nullable();
|
||||
$table->date('export_data_stsdate')->nullable();
|
||||
$table->date('import_data_sts_date')->nullable();
|
||||
$table->string('lokasi');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('caw_id')
|
||||
->references('id')->on('cawangan')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('lelong_id')
|
||||
->references('id')->on('lelong')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('lelongbid', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('caw_id')->unsigned();
|
||||
$table->string('kodcaw');
|
||||
$table->string('norujukan');
|
||||
$table->date('t_lelong');
|
||||
$table->decimal('hargaasas', $precision = 9, $scale = 2);
|
||||
$table->decimal('hargajual', $precision = 9, $scale = 2);
|
||||
$table->date('t_jual');
|
||||
$table->integer('nopembeli');
|
||||
$table->decimal('jbg', $precision = 7, $scale = 2);
|
||||
$table->decimal('kadarupah', $precision = 5, $scale = 2);
|
||||
$table->decimal('upahsimpan', $precision = 11, $scale = 2);
|
||||
$table->decimal('ansuran', $precision = 11, $scale = 2);
|
||||
$table->decimal('nilaimarhun', $precision = 9, $scale = 2);
|
||||
$table->decimal('pinjaman', $precision = 9, $scale = 2);
|
||||
$table->decimal('bakiupah', $precision = 7, $scale = 2);
|
||||
$table->decimal('cajlain', $precision = 7, $scale = 2);
|
||||
$table->decimal('cajlelong', $precision = 7, $scale = 2);
|
||||
$table->decimal('baki', $precision = 9, $scale = 2);
|
||||
$table->decimal('berat', $precision = 7, $scale = 2);
|
||||
$table->string('marhun');
|
||||
$table->decimal('gst_hj', $precision = 7, $scale = 2);
|
||||
$table->decimal('gst_cl', $precision = 7, $scale = 2);
|
||||
$table->decimal('percent', $precision = 7, $scale = 2);
|
||||
$table->string('status_jual');
|
||||
$table->string('status_payment');
|
||||
$table->string('mora_upah');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('caw_id')
|
||||
->references('id')->on('cawangan')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('lelongbidmarhun', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('lelongbid_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->decimal('harga', $precision = 5, $scale = 2);
|
||||
$table->decimal('n_marhun', $precision = 9, $scale = 2);
|
||||
$table->decimal('hargaasas', $precision = 11, $scale = 2);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('lelongbid_id')
|
||||
->references('id')->on('lelongbid')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('lelkarat', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('lelong_id')->unsigned();
|
||||
$table->string('karat');
|
||||
$table->string('keterangan');
|
||||
$table->decimal('harga', $precision = 5, $scale = 2)->nullable();
|
||||
$table->decimal('harga2', $precision = 5, $scale = 2)->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('lelong_id')
|
||||
->references('id')->on('lelong')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('lelkarat_temp', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('lelong_id')->unsigned();
|
||||
$table->string('karat');
|
||||
$table->string('keterangan');
|
||||
$table->decimal('harga', $precision = 5, $scale = 2);
|
||||
$table->decimal('harga2', $precision = 5, $scale = 2);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('lelong_id')
|
||||
->references('id')->on('lelong')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('lelong');
|
||||
Schema::dropIfExists('cawangan_lelong');
|
||||
Schema::dropIfExists('lelongbid');
|
||||
Schema::dropIfExists('lelongbidmarhun');
|
||||
Schema::dropIfExists('lelkarat');
|
||||
Schema::dropIfExists('lelkarat_temp');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateJenisEmasTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('jenisemas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('marhun');
|
||||
$table->string('descpt');
|
||||
$table->integer('ordernum');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('jeniskarat', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('karat');
|
||||
$table->string('keterangan');
|
||||
$table->decimal('dariharga916', $precision = 5, $scale = 2);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('jenisemas');
|
||||
Schema::dropIfExists('jeniskarat');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user