feat : 자재관리, 수입관리, 로트관리 모델링 추가

This commit is contained in:
2025-07-28 18:47:00 +09:00
parent 1233058eda
commit d9d01c2aaf
13 changed files with 366 additions and 0 deletions

35
app/Models/Material.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Material extends Model
{
use SoftDeletes;
// 자재(품목) 마스터
protected $fillable = [
'name', // 자재명(품명)
'specification', // 규격
'material_code', // 자재코드
'unit', // 단위
'is_inspection', // 검사대상 여부(Y/N)
'search_tag', // 검색 태그
'remarks', // 비고
];
// 자재 입고 내역
public function receipts()
{
return $this->hasMany(MaterialReceipt::class, 'material_id');
}
// 로트 관리
public function lots()
{
return $this->hasMany(Lot::class, 'material_id');
}
}