From 3986b35c2541e1e67a09404c38353918aa64a564 Mon Sep 17 00:00:00 2001 From: Daeng Deni Mardaeni Date: Tue, 18 Feb 2025 16:31:03 +0700 Subject: [PATCH] feat(stmt_entry): tambahkan model dan migrasi untuk tabel stmt_entry - Menambahkan model StmtEntry untuk mengelola data entri pernyataan. - Membuat migrasi untuk tabel stmt_entry dengan kolom yang diperlukan. - Menyediakan relasi dengan model Account melalui kolom account_number. --- app/Models/StmtEntry.php | 59 +++++++++++++++++++ ...5_02_06_130156_create_stmt_entry_table.php | 48 +++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 app/Models/StmtEntry.php create mode 100644 database/migrations/2025_02_06_130156_create_stmt_entry_table.php diff --git a/app/Models/StmtEntry.php b/app/Models/StmtEntry.php new file mode 100644 index 0000000..773d03f --- /dev/null +++ b/app/Models/StmtEntry.php @@ -0,0 +1,59 @@ + 'datetime', + 'updated_at' => 'datetime', + ]; + + public function account() + { + return $this->belongsTo(Account::class, 'account_number', 'account_number'); + } +} diff --git a/database/migrations/2025_02_06_130156_create_stmt_entry_table.php b/database/migrations/2025_02_06_130156_create_stmt_entry_table.php new file mode 100644 index 0000000..b403199 --- /dev/null +++ b/database/migrations/2025_02_06_130156_create_stmt_entry_table.php @@ -0,0 +1,48 @@ +id(); + $table->string('stmt_entry_id')->nullable(); + $table->string('account_number')->nullable(); + $table->string('company_code')->nullable(); + $table->string('amount_lcy')->nullable(); + $table->string('transaction_code')->nullable(); + $table->string('narrative')->nullable(); + $table->string('product_category')->nullable(); + $table->string('value_date')->nullable(); + $table->string('amount_fcy')->nullable(); + $table->string('exchange_rate')->nullable(); + $table->string('trans_reference')->nullable(); + $table->string('booking_date')->nullable(); + $table->string('stmt_no')->nullable(); + $table->string('date_time')->nullable(); + $table->string('currency')->nullable(); + $table->string('crf_type')->nullable(); + $table->string('consol_key')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('stmt_entry'); + } + }