feat: clients.is_active CHAR(1) → TINYINT(1) Boolean 마이그레이션
- DB: CHAR(1) 'Y'/'N' → TINYINT(1) 0/1 컬럼 타입 변경 - Model: boolean 캐스트 추가, scopeActive() 수정 - Service: toggle(), index() Boolean 로직 적용 - FormRequest: 'in:Y,N' → 'boolean' 검증 규칙 변경 - Swagger: is_active type string → boolean 변경
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
* @OA\Property(property="bad_debt_end_date", type="string", format="date", nullable=true, example="2025-06-01", description="채권 만료일"),
|
||||
* @OA\Property(property="bad_debt_progress", type="string", enum={"협의중", "소송중", "회수완료", "대손처리"}, nullable=true, description="진행 상태"),
|
||||
* @OA\Property(property="memo", type="string", nullable=true, example="특이사항 메모", description="메모"),
|
||||
* @OA\Property(property="is_active", type="string", enum={"Y", "N"}, example="Y"),
|
||||
* @OA\Property(property="is_active", type="boolean", example=true, description="활성 여부"),
|
||||
* @OA\Property(property="created_at", type="string", example="2025-10-01 12:00:00"),
|
||||
* @OA\Property(property="updated_at", type="string", example="2025-10-01 12:00:00")
|
||||
* )
|
||||
@@ -116,7 +116,7 @@
|
||||
* @OA\Property(property="bad_debt_end_date", type="string", format="date", nullable=true, example="2025-06-01", description="채권 만료일"),
|
||||
* @OA\Property(property="bad_debt_progress", type="string", enum={"협의중", "소송중", "회수완료", "대손처리"}, nullable=true, description="진행 상태"),
|
||||
* @OA\Property(property="memo", type="string", nullable=true, example="특이사항 메모", description="메모"),
|
||||
* @OA\Property(property="is_active", type="string", enum={"Y", "N"}, example="Y")
|
||||
* @OA\Property(property="is_active", type="boolean", example=true, description="활성 여부")
|
||||
* )
|
||||
*
|
||||
* @OA\Schema(
|
||||
@@ -153,7 +153,7 @@
|
||||
* @OA\Property(property="bad_debt_end_date", type="string", format="date", nullable=true, description="채권 만료일"),
|
||||
* @OA\Property(property="bad_debt_progress", type="string", enum={"협의중", "소송중", "회수완료", "대손처리"}, nullable=true, description="진행 상태"),
|
||||
* @OA\Property(property="memo", type="string", nullable=true, description="메모"),
|
||||
* @OA\Property(property="is_active", type="string", enum={"Y", "N"})
|
||||
* @OA\Property(property="is_active", type="boolean", description="활성 여부")
|
||||
* )
|
||||
*/
|
||||
class ClientApi
|
||||
@@ -257,12 +257,15 @@ public function update() {}
|
||||
* @OA\Delete(
|
||||
* path="/api/v1/clients/{id}",
|
||||
* tags={"Client"},
|
||||
* summary="거래처 삭제(soft)",
|
||||
* summary="거래처 삭제",
|
||||
* description="주문이 존재하는 거래처는 삭제할 수 없습니다.",
|
||||
* security={{"ApiKeyAuth":{}},{"BearerAuth":{}}},
|
||||
*
|
||||
* @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")),
|
||||
*
|
||||
* @OA\Response(response=200, description="삭제 성공", @OA\JsonContent(ref="#/components/schemas/ApiResponse"))
|
||||
* @OA\Response(response=200, description="삭제 성공", @OA\JsonContent(ref="#/components/schemas/ApiResponse")),
|
||||
* @OA\Response(response=400, description="주문 존재로 삭제 불가", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
|
||||
* @OA\Response(response=404, description="데이터 없음", @OA\JsonContent(ref="#/components/schemas/ErrorResponse"))
|
||||
* )
|
||||
*/
|
||||
public function destroy() {}
|
||||
|
||||
Reference in New Issue
Block a user