feat : 품목관리 API 추가

This commit is contained in:
2025-08-01 17:25:31 +09:00
parent 2a0f3471a8
commit 1aff3ab3ee
7 changed files with 310 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace App\Services;
use App\Helpers\ApiResponse;
use Illuminate\Support\Facades\DB;
use App\Models\Products\CommonCode;
use App\Models\Products\Bom;
class BomService
{
public static function getBoms()
{
$query = new Bom();
return ApiResponse::response('get', $query);
}
public static function setBom()
{
$query = DB::table('COM_CODE')
->select(['CODE_TP_ID', 'CODE_ID', 'CODE_VAL', 'CODE_DESC', 'USE_YN']);
return ApiResponse::response('get', $query);
}
public static function getBom(int $id)
{
$query = Bom::find($id);
return ApiResponse::response('get', $query);
}
public static function updateBom(int $id)
{
$query = DB::table('COM_CODE')
->select(['CODE_TP_ID', 'CODE_ID', 'CODE_VAL', 'CODE_DESC', 'USE_YN']);
return ApiResponse::response('get', $query);
}
public static function destoryBom(int $id)
{
$query = DB::table('COM_CODE')
->select(['CODE_TP_ID', 'CODE_ID', 'CODE_VAL', 'CODE_DESC', 'USE_YN']);
return ApiResponse::response('get', $query);
}
}