- Menambahkan job baru `ProcessTellerDataJob` untuk memproses data teller dari file CSV. - Membuat controller method `ProcessTellerData` di `MigrasiController` untuk dispatch job `ProcessTellerDataJob`. - Menambahkan model baru `Teller` yang merepresentasikan data teller dengan kolom sesuai header map pada CSV. - Menambahkan migrasi `2025_05_21_144332_create_tellers_table.php` untuk membuat tabel database `tellers` dengan struktur data lengkap. - Menambahkan logika pada job untuk membaca, memproses, dan menyimpan data CSV ke dalam database. - Menyediakan mekanisme pemrosesan file CSV termasuk: - Validasi jumlah kolom pada CSV jika tidak sesuai dengan header. - Membuat dan menghapus file sementara selama pemrosesan. - Mapping data CSV ke atribut model `Teller`. - Penanganan error saat menyimpan data ke model `Teller`. - Logging proses meliputi jumlah data yang diproses dan error selama jalannya job. Signed-off-by: Daeng Deni Mardaeni <ddeni05@gmail.com>
131 lines
6.6 KiB
PHP
131 lines
6.6 KiB
PHP
<?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('tellers', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('id_teller')->nullable();
|
|
$table->string('account_1')->nullable();
|
|
$table->string('currency_1')->nullable();
|
|
$table->string('amount_local_1')->nullable();
|
|
$table->string('value_date_1')->nullable();
|
|
$table->string('account_2')->nullable();
|
|
$table->string('new_cust_bal')->nullable();
|
|
$table->string('term_type')->nullable();
|
|
$table->string('term_id')->nullable();
|
|
$table->string('trans_reff')->nullable();
|
|
$table->string('card_no')->nullable();
|
|
$table->string('recipt_no')->nullable();
|
|
$table->string('transaction_code')->nullable();
|
|
$table->string('date_time')->nullable();
|
|
$table->string('record_status')->nullable();
|
|
$table->string('amount_local_2')->nullable();
|
|
$table->string('co_code')->nullable();
|
|
$table->text('narrative_1')->nullable();
|
|
$table->string('wic_flag')->nullable();
|
|
$table->string('wic_cust_type')->nullable();
|
|
$table->string('wic_full_name')->nullable();
|
|
$table->string('wic_alias_name')->nullable();
|
|
$table->string('wic_acct_no')->nullable();
|
|
$table->string('wic_id_type')->nullable();
|
|
$table->string('wic_id_no')->nullable();
|
|
$table->string('wic_npwp')->nullable();
|
|
$table->string('wic_nationality')->nullable();
|
|
$table->string('wic_ind_birthpl')->nullable();
|
|
$table->string('wic_ind_birthdt')->nullable();
|
|
$table->string('wic_address_id')->nullable();
|
|
$table->string('wic_address_cur')->nullable();
|
|
$table->string('wic_city')->nullable();
|
|
$table->string('wic_province')->nullable();
|
|
$table->string('wic_post_code')->nullable();
|
|
$table->string('wic_phone')->nullable();
|
|
$table->string('wic_gender')->nullable();
|
|
$table->string('wic_marital_sts')->nullable();
|
|
$table->string('wic_occptn')->nullable();
|
|
$table->string('wic_occptn_dur')->nullable();
|
|
$table->string('wic_income_avg')->nullable();
|
|
$table->string('wic_cor_name')->nullable();
|
|
$table->string('wic_cor_address')->nullable();
|
|
$table->string('wic_cor_phone')->nullable();
|
|
$table->string('wic_cor_lgl_typ')->nullable();
|
|
$table->string('wic_cor_lic_no')->nullable();
|
|
$table->string('wic_cor_birthpl')->nullable();
|
|
$table->string('wic_cor_birthdt')->nullable();
|
|
$table->string('wic_cor_rel')->nullable();
|
|
$table->string('wic_party_rel')->nullable();
|
|
$table->string('wic_amount')->nullable();
|
|
$table->string('wic_amount_type')->nullable();
|
|
$table->string('wic_amtbnk_name')->nullable();
|
|
$table->string('wic_amtbnk_cunm')->nullable();
|
|
$table->string('wic_fund_source')->nullable();
|
|
$table->string('wic_fund_use')->nullable();
|
|
$table->string('dr_cr_marker')->nullable();
|
|
$table->string('charge_code')->nullable();
|
|
$table->string('chrg_amt_local')->nullable();
|
|
$table->string('charge_category')->nullable();
|
|
$table->string('charge_account')->nullable();
|
|
$table->string('amount_fcy_1')->nullable();
|
|
$table->string('rate_1')->nullable();
|
|
$table->string('deal_rate')->nullable();
|
|
$table->string('l_wic_id')->nullable();
|
|
$table->string('account_1_co_code')->nullable();
|
|
$table->string('account_2_co_code')->nullable();
|
|
$table->string('l_charge_amt')->nullable();
|
|
$table->string('bl_cust_no')->nullable();
|
|
$table->string('stmt_no')->nullable();
|
|
$table->string('bil_customer')->nullable();
|
|
$table->string('value_date_2')->nullable();
|
|
$table->string('cheq_type')->nullable();
|
|
$table->string('cheque_number')->nullable();
|
|
$table->string('inputter')->nullable();
|
|
$table->string('authoriser')->nullable();
|
|
$table->string('bil_product')->nullable();
|
|
$table->string('fx_document')->nullable();
|
|
$table->string('fx_purpose')->nullable();
|
|
$table->text('narrative_2')->nullable();
|
|
$table->string('customer_2')->nullable();
|
|
$table->string('l_sms_1')->nullable();
|
|
$table->string('l_phone_1')->nullable();
|
|
$table->string('kyc_incom_rng')->nullable();
|
|
$table->string('wic_rt')->nullable();
|
|
$table->string('wic_rw')->nullable();
|
|
$table->string('ktp_kelurahan')->nullable();
|
|
$table->string('ktp_kecamatan')->nullable();
|
|
$table->string('ktp_provinsi')->nullable();
|
|
$table->string('wic_jenis_kelam')->nullable();
|
|
$table->string('kyc_sumber_dana')->nullable();
|
|
$table->string('l_manual_risk')->nullable();
|
|
$table->string('l_slip_no')->nullable();
|
|
$table->string('dest_bank_id')->nullable();
|
|
$table->text('dr_narrative')->nullable();
|
|
$table->string('inter_type')->nullable();
|
|
$table->string('l_va_number')->nullable();
|
|
$table->string('inter_bank_id')->nullable();
|
|
$table->text('term_narr')->nullable();
|
|
$table->string('currency_2')->nullable();
|
|
$table->string('amount_fcy_2')->nullable();
|
|
$table->string('rate_2')->nullable();
|
|
$table->string('customer_1')->nullable();
|
|
$table->string('last_version')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('tellers');
|
|
}
|
|
};
|