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,46 @@
<?php
namespace App\Services;
use App\Helpers\ApiResponse;
use App\Models\Products\Bom;
use Illuminate\Support\Facades\DB;
use App\Models\Products\CommonCode;
use App\Models\Products\Product;
class ModelService
{
public static function getModels()
{
$query = new Product();
return ApiResponse::response('get', $query);
}
public static function setModel()
{
$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 getModel(int $id)
{
$query = Bom::find($id);
return ApiResponse::response('get', $query);
}
public static function updateModel(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 destoryModel(int $id)
{
$query = DB::table('COM_CODE')
->select(['CODE_TP_ID', 'CODE_ID', 'CODE_VAL', 'CODE_DESC', 'USE_YN']);
return ApiResponse::response('get', $query);
}
}