P2-05/06 포장 단위 관리 CRUD + 이력 + 기간별 조회

- packaging_unit, packaging_unit_history 테이블 생성
- PackagingUnitModel, PackagingUnitHistoryModel
- PackagingUnit 컨트롤러 (목록/등록/수정/삭제/이력)
- 박스당팩수 x 팩당낱장수 = 총낱장수 자동 계산
- 변경 시 자동 이력 기록
- E2E 테스트 3개 전체 통과

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
javamon1174
2026-03-25 16:32:55 +09:00
parent 6949227592
commit acc9e4741e
10 changed files with 516 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class PackagingUnitHistoryModel extends Model
{
protected $table = 'packaging_unit_history';
protected $primaryKey = 'puh_idx';
protected $returnType = 'object';
protected $useTimestamps = false;
protected $allowedFields = [
'puh_pu_idx', 'puh_field', 'puh_old_value', 'puh_new_value',
'puh_changed_at', 'puh_changed_by',
];
}

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class PackagingUnitModel extends Model
{
protected $table = 'packaging_unit';
protected $primaryKey = 'pu_idx';
protected $returnType = 'object';
protected $useTimestamps = false;
protected $allowedFields = [
'pu_lg_idx', 'pu_bag_code', 'pu_bag_name',
'pu_box_per_pack', 'pu_pack_per_sheet', 'pu_total_per_box',
'pu_start_date', 'pu_end_date', 'pu_state',
'pu_regdate', 'pu_moddate', 'pu_reg_mb_idx',
];
}