feat : 품목관리 API 추가
This commit is contained in:
46
app/Services/ModelService.php
Normal file
46
app/Services/ModelService.php
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user