Files
sam-api/app/Models/Production/BendingItemMapping.php
김보곤 c11ac7867c feat: [bending] 절곡품 코드맵/품목매핑/LOT 채번 API 추가
- bending_item_mappings 테이블 마이그레이션
- BendingCodeService: 코드 체계, 품목 매핑, LOT 일련번호 생성
- BendingController: code-map, resolve-item, generate-lot 엔드포인트
- StoreOrderRequest/UpdateOrderRequest: bending_lot validation 추가
2026-03-17 13:06:29 +09:00

34 lines
638 B
PHP

<?php
namespace App\Models\Production;
use App\Models\Items\Item;
use App\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class BendingItemMapping extends Model
{
use BelongsToTenant;
protected $table = 'bending_item_mappings';
protected $fillable = [
'tenant_id',
'prod_code',
'spec_code',
'length_code',
'item_id',
'is_active',
];
protected $casts = [
'is_active' => 'boolean',
];
public function item(): BelongsTo
{
return $this->belongsTo(Item::class);
}
}