fix: [items] 품목 규격 accessor + 감사로그 + bom_category 마이그레이션
- Item 모델에 specification accessor 추가 (attributes.spec 조회) - ItemService.update()에 AuditLogger 감사 로그 추가 - items.options에 bom_category 추가 마이그레이션
This commit is contained in:
@@ -51,6 +51,24 @@ class Item extends Model
|
||||
'deleted_at',
|
||||
];
|
||||
|
||||
protected $appends = [
|
||||
'specification',
|
||||
];
|
||||
|
||||
/**
|
||||
* 규격 accessor — attributes JSON 내 spec/specification 값을 최상위 필드로 노출
|
||||
*/
|
||||
public function getSpecificationAttribute(): ?string
|
||||
{
|
||||
$attrs = $this->getAttributeValue('attributes');
|
||||
|
||||
if (is_array($attrs)) {
|
||||
return $attrs['spec'] ?? $attrs['specification'] ?? null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* item_type 상수
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user