feat(webstatement): tambah fitur pemrosesan data "Data Capture"
- Menambahkan fungsi baru `ProcessDataCaptureData` di `MigrasiController` untuk menjadwalkan pemrosesan data "Data Capture". - Menambahkan job baru `ProcessDataCaptureDataJob`: - Mengambil data "Data Capture" dari file CSV melalui SFTP. - Memproses dan menyimpan data ke database dengan validasi dan logging. - Mendukung operasi pembaruan (update) atau pembuatan (insert) data menggunakan Eloquent `updateOrCreate`. - Menambahkan model baru `DataCapture`: - Memetakan data ke tabel `data_captures` di database. - Mendukung properti `fillable` dan `casts` untuk format data yang valid, termasuk konversi nilai decimal dan tanggal. - Menambahkan migrasi baru `create_data_captures_table` untuk membuat tabel `data_captures`: - Mendefinisikan semua kolom sesuai kebutuhan data "Data Capture". - Menetapkan tipe data yang relevan seperti decimal, date, dan datetime. - Memperbarui metode `migrasiAll` di `MigrasiController` untuk memanggil fungsi pemrosesan baru `ProcessDataCaptureData`. Signed-off-by: Daeng Deni Mardaeni <ddeni05@gmail.com>
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('data_captures', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->string('account_number')->nullable();
|
||||
$table->string('sign')->nullable();
|
||||
$table->decimal('amount_lcy', 20, 2)->nullable();
|
||||
$table->string('transaction_code')->nullable();
|
||||
$table->string('their_reference')->nullable();
|
||||
$table->text('narrative')->nullable();
|
||||
$table->string('pl_category')->nullable();
|
||||
$table->string('customer_id')->nullable();
|
||||
$table->string('account_officer')->nullable();
|
||||
$table->string('product_category')->nullable();
|
||||
$table->date('value_date')->nullable();
|
||||
$table->string('currency')->nullable();
|
||||
$table->decimal('amount_fcy', 20, 2)->nullable();
|
||||
$table->decimal('exchange_rate', 20, 6)->nullable();
|
||||
$table->string('neg_ref_no')->nullable();
|
||||
$table->string('position_type')->nullable();
|
||||
$table->string('our_reference')->nullable();
|
||||
$table->string('reversal_marker')->nullable();
|
||||
$table->date('exposure_date')->nullable();
|
||||
$table->string('currency_market')->nullable();
|
||||
$table->string('iblc_country')->nullable();
|
||||
$table->string('last_version')->nullable();
|
||||
$table->string('otor_version')->nullable();
|
||||
$table->string('department_code')->nullable();
|
||||
$table->string('dealer_desk')->nullable();
|
||||
$table->string('bank_sort_cde')->nullable();
|
||||
$table->string('cheque_number')->nullable();
|
||||
$table->date('accounting_date')->nullable();
|
||||
$table->string('contingent_acct')->nullable();
|
||||
$table->string('cheq_type')->nullable();
|
||||
$table->string('tfs_reference')->nullable();
|
||||
$table->string('accounting_company')->nullable();
|
||||
$table->string('stmt_no')->nullable();
|
||||
$table->string('curr_no')->nullable();
|
||||
$table->string('inputter')->nullable();
|
||||
$table->string('authoriser')->nullable();
|
||||
$table->string('co_code')->nullable();
|
||||
$table->dateTime('date_time')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('data_captures');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user