Files
webstatement/app/Models/FtTxnTypeCondition.php
Daeng Deni Mardaeni 24700c5bd8 feat(webstatement): tambahkan proses pengolahan data FtTxnTypeCondition
- Menambahkan method `ProcessFtTxnTypeConditioData` pada `MigrasiController` untuk memproses data FtTxnTypeCondition melalui dispatching job baru.
- Menambahkan job baru `ProcessFtTxnTypeConditionJob` untuk mengelola dan memproses data TxnTypeCondition dari file `TXN_TYPE_CONDITION.csv`:
  - Membaca file CSV melalui SFTP dengan validasi header dan struktur kolom.
  - Menggunakan model `FtTxnTypeCondition` untuk menyimpan atau memperbarui data ke database.
  - Menambahkan logging untuk memberikan informasi dan menangani pengecualian/error selama proses.
- Menambahkan model `FtTxnTypeCondition` untuk representasi data `ft_txn_type_condition` di database:
  - Tabel memiliki atribut seperti `id`, `date_time`, `transaction_type`, `short_descr`, `txn_code_cr`, dan `txn_code_dr`.
  - Mengatur primary key pada atribut `id` dengan tipe string dan non-incremental.
- Menambahkan migrasi untuk tabel `ft_txn_type_condition`:
  - Menyediakan kolom utama yang diperlukan dengan tipe data sesuai kebutuhan, termasuk `softDelete`.
  - Kolom primary key `id` dengan tipe `string`.
- Memodifikasi proses migrasi utama untuk memanggil method `ProcessFtTxnTypeConditioData`.
- Menangani folder `_parameter` sebagai folder yang diabaikan dalam proses.

Signed-off-by: Daeng Deni Mardaeni <ddeni05@gmail.com>
2025-05-20 21:38:27 +07:00

62 lines
1.4 KiB
PHP

<?php
namespace Modules\Webstatement\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
// use Modules\Webstatement\Database\Factories\FtTxnTypeConditionFactory;
class FtTxnTypeCondition extends Model
{
use HasFactory;
/**
* Indicates if the IDs are auto-incrementing.
*
* @var bool
*/
public $incrementing = false;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'ft_txn_type_condition';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The data type of the auto-incrementing ID.
*
* @var string
*/
protected $keyType = 'string';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'id',
'date_time',
'transaction_type',
'short_descr',
'txn_code_cr',
'txn_code_dr',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'date_time' => 'datetime',
];
}