- bending_item_mappings 테이블 마이그레이션 - BendingCodeService: 코드 체계, 품목 매핑, LOT 일련번호 생성 - BendingController: code-map, resolve-item, generate-lot 엔드포인트 - StoreOrderRequest/UpdateOrderRequest: bending_lot validation 추가
34 lines
638 B
PHP
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);
|
|
}
|
|
}
|