diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/AlarmProvider.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/AlarmProvider.java index db88dee4..15810359 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/AlarmProvider.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/AlarmProvider.java @@ -1,5 +1,8 @@ package com.wakeUpTogetUp.togetUp.api.alarm; +import static com.wakeUpTogetUp.togetUp.common.Constant.GET_ALARM_MODE_GROUP; +import static com.wakeUpTogetUp.togetUp.common.Constant.GET_ALARM_MODE_PERSONAL; + import com.wakeUpTogetUp.togetUp.api.alarm.dto.response.GetAlarmRes; import com.wakeUpTogetUp.togetUp.api.alarm.model.Alarm; import com.wakeUpTogetUp.togetUp.exception.BaseException; @@ -27,10 +30,10 @@ public List getAlarmsByUserId(Integer userId, String type) { userRepository.findById(userId).orElseThrow( () -> new BaseException(Status.USER_NOT_FOUND)); - if (type.equals("personal")) { + if (type.equals(GET_ALARM_MODE_PERSONAL)) { List alarmList = alarmRepository.findAllByUser_IdAndRoom_IdIsNull(userId); return EntityDtoMapper.INSTANCE.toAlarmResList(alarmList); - } else if (type.equals("group")) { + } else if (type.equals(GET_ALARM_MODE_GROUP)) { List alarmList = alarmRepository.findAllByUser_IdAndRoom_IdIsNotNull(userId); return EntityDtoMapper.INSTANCE.toAlarmResList(alarmList); } else diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/dto/request/PostAlarmReq.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/dto/request/PostAlarmReq.java index bb906ce2..f964efb5 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/dto/request/PostAlarmReq.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/dto/request/PostAlarmReq.java @@ -1,6 +1,7 @@ package com.wakeUpTogetUp.togetUp.api.alarm.dto.request; import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema.RequiredMode; import javax.validation.constraints.Pattern; import lombok.*; @@ -13,57 +14,57 @@ @NoArgsConstructor @AllArgsConstructor(access = AccessLevel.PRIVATE) public class PostAlarmReq { - @Schema(description = "알람 이름", example = "기상") + @Schema(description = "알람 이름", requiredMode = RequiredMode.REQUIRED, example = "기상") @NotBlank(message = "알람 이름은 공백일 수 없습니다.") private String name; - @Schema(description = "아이콘", example = "⏰") + @Schema(description = "아이콘", defaultValue = "⏰", example = "⏰") private String icon; - @Schema(description = "다시울림 간격", example = "5") + @Schema(description = "다시울림 간격", defaultValue = "5", example = "5") private Integer snoozeInterval; - @Schema(description = "다시울림 횟수", example = "3") + @Schema(description = "다시울림 횟수", defaultValue = "3", example = "3") private Integer snoozeCnt; - @Schema(description = "알람 시간", example = "06:00") + @Schema(description = "알람 시간", requiredMode = RequiredMode.REQUIRED, example = "06:00") @NotNull(message = "알람 시간은 공백일 수 없습니다.") @Pattern(regexp = "^([01]?[0-9]|2[0-3]):[0-5][0-9]$", message = "HH:mm 형식이 아닙니다.") private String alarmTime; - @Schema(description = "월요일 울림 여부", example = "false") + @Schema(description = "월요일 울림 여부", defaultValue = "false", example = "false") private Boolean monday; - @Schema(description = "화요일 울림 여부", example = "false") + @Schema(description = "화요일 울림 여부", defaultValue = "false", example = "false") private Boolean tuesday; - @Schema(description = "수요일 울림 여부", example = "false") + @Schema(description = "수요일 울림 여부", defaultValue = "false", example = "false") private Boolean wednesday; - @Schema(description = "목요일 울림 여부", example = "false") + @Schema(description = "목요일 울림 여부", defaultValue = "false", example = "false") private Boolean thursday; - @Schema(description = "금요일 울림 여부", example = "false") + @Schema(description = "금요일 울림 여부", defaultValue = "false", example = "false") private Boolean friday; - @Schema(description = "토요일 울림 여부", example = "false") + @Schema(description = "토요일 울림 여부", defaultValue = "false", example = "false") private Boolean saturday; - @Schema(description = "일요일 울림 여부", example = "false") + @Schema(description = "일요일 울림 여부", defaultValue = "false", example = "false") private Boolean sunday; - @Schema(description = "다시울림 활성화 여부", example = "true", defaultValue = "true") + @Schema(description = "다시울림 활성화 여부", defaultValue = "true", example = "true") private Boolean isSnoozeActivated; - @Schema(description = "진동 활성화 여부", example = "true") + @Schema(description = "진동 활성화 여부", defaultValue = "true", example = "true") private Boolean isVibrate; - @Schema(description = "미션 id", example = "2") + @Schema(description = "미션 id", requiredMode = RequiredMode.REQUIRED, example = "2") private Integer missionId; - @Schema(description = "미션 객체 id", example = "1") + @Schema(description = "미션 객체 id", requiredMode = RequiredMode.REQUIRED, example = "1") private Integer missionObjectId; - @Schema(description = "그룹 id", example = "1") + @Schema(description = "그룹 id", requiredMode = RequiredMode.REQUIRED, example = "1") private Integer roomId; } diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionController.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionController.java index 93c01748..3ec5e3c2 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionController.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionController.java @@ -6,8 +6,8 @@ import com.wakeUpTogetUp.togetUp.api.file.FileService; import com.wakeUpTogetUp.togetUp.api.mission.dto.request.PostMissionLogReq; import com.wakeUpTogetUp.togetUp.api.mission.dto.response.GetMissionWithObjectListRes; -import com.wakeUpTogetUp.togetUp.api.mission.dto.response.MissionLogRes; -import com.wakeUpTogetUp.togetUp.api.mission.dto.response.PostObjectRecognitionRes; +import com.wakeUpTogetUp.togetUp.api.mission.dto.response.GetMissionLogRes; +import com.wakeUpTogetUp.togetUp.api.mission.dto.response.PostPerformMissionRes; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -30,10 +30,10 @@ public class MissionController { private final MissionService missionService; private final FileService fileService; - @Operation(summary = "미션 목록 가져오기", description = "missionId\n- 객체인식 : 2\n- 표정인식 : 3") + @Operation(summary = "미션 목록 가져오기") @GetMapping("/{missionId}") BaseResponse getObjectDetectionMissions( - @PathVariable(value = "missionId") int missionId + @Parameter(required = true, description = "- 객체인식 : 2\n- 표정인식 : 3") @PathVariable(value = "missionId") int missionId ) { return new BaseResponse(Status.SUCCESS, missionProvider.getMission(missionId)); } @@ -41,13 +41,14 @@ BaseResponse getObjectDetectionMissions( @Operation(summary = "객체 탐지 미션") @PostMapping(value = "/object-detection/{objectName}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.CREATED) - public BaseResponse recognizeObject( + public BaseResponse recognizeObject( @Parameter(hidden = true) @AuthUser Integer userId, - @Parameter(description = "미션 수행 사진") @RequestPart MultipartFile missionImage, - @Parameter(description = "탐지할 객체") @PathVariable String objectName + @Parameter(required = true, description = "미션 수행 사진") @RequestPart MultipartFile missionImage, + @Parameter(required = true, description = "탐지할 객체") @PathVariable String objectName ) throws Exception { long startTime = System.currentTimeMillis(); + System.out.println("missionImage = " + missionImage.getOriginalFilename()); missionService.recognizeObject(objectName, missionImage); String filePath = fileService.uploadFile(missionImage, "mission"); @@ -56,13 +57,34 @@ public BaseResponse recognizeObject( long timeElapsed = endTime - startTime; System.out.println("Execution time in milliseconds: " + timeElapsed); - return new BaseResponse(Status.MISSION_SUCCESS, new PostObjectRecognitionRes(filePath)); + return new BaseResponse(Status.MISSION_SUCCESS, new PostPerformMissionRes(filePath)); + } + + @Operation(summary = "표정 인식 미션") + @PostMapping(value = "/face-recognition/{objectName}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseStatus(HttpStatus.CREATED) + public BaseResponse recognizeFaceExpression( + @Parameter(hidden = true) @AuthUser Integer userId, + @Parameter(required = true, description = "미션 수행 사진") @RequestPart MultipartFile missionImage, + @Parameter(required = true, description = "탐지할 객체") @PathVariable String objectName + ) throws Exception { + long startTime = System.currentTimeMillis(); + + missionService.recognizeEmotion(objectName, missionImage); + String filePath = fileService.uploadFile(missionImage, "mission"); + + // 걸린 시간 계산 + long endTime = System.currentTimeMillis(); + long timeElapsed = endTime - startTime; + System.out.println("Execution time in milliseconds: " + timeElapsed); + + return new BaseResponse(Status.MISSION_SUCCESS, new PostPerformMissionRes(filePath)); } @Operation(summary = "미션 수행 기록 생성") @PostMapping("/complete") @ResponseStatus(HttpStatus.CREATED) - public BaseResponse postMissionLog( + public BaseResponse postMissionLog( @Parameter(hidden = true) @AuthUser Integer userId, @RequestBody @Valid PostMissionLogReq postMissionLogReq ) { @@ -76,7 +98,7 @@ public BaseResponse postMissionLog( @Operation(summary = "미션 수행 기록 가져오기") @GetMapping("/logs") @ResponseStatus(HttpStatus.OK) - public BaseResponse> getMissionCompleteLogsByUserId( + public BaseResponse> getMissionCompleteLogsByUserId( @Parameter(hidden = true) @AuthUser Integer userId ) { return new BaseResponse(Status.SUCCESS, diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionProvider.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionProvider.java index ded2ceb0..b098e289 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionProvider.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionProvider.java @@ -5,7 +5,7 @@ import com.wakeUpTogetUp.togetUp.common.Status; import com.wakeUpTogetUp.togetUp.exception.BaseException; import com.wakeUpTogetUp.togetUp.api.mission.dto.response.GetMissionWithObjectListRes; -import com.wakeUpTogetUp.togetUp.api.mission.dto.response.MissionLogRes; +import com.wakeUpTogetUp.togetUp.api.mission.dto.response.GetMissionLogRes; import com.wakeUpTogetUp.togetUp.utils.mapper.EntityDtoMapper; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -23,7 +23,7 @@ public GetMissionWithObjectListRes getMission(int missionId) { return EntityDtoMapper.INSTANCE.toGetMissionRes(mission); } - public MissionLogRes getMissionLog(Integer missionCompleteLogId){ + public GetMissionLogRes getMissionLog(Integer missionCompleteLogId){ MissionLog missionLog = missionLogRepository.findById(missionCompleteLogId) .orElseThrow( () -> new BaseException(Status.INTERNAL_SERVER_ERROR)); @@ -31,7 +31,7 @@ public MissionLogRes getMissionLog(Integer missionCompleteLogId){ return EntityDtoMapper.INSTANCE.toMissionLogRes(missionLog); } - public List getMissionCompleteLogsByUserId(Integer userId) { + public List getMissionCompleteLogsByUserId(Integer userId) { List missionLogList = missionLogRepository.findAllByUserId(userId); return EntityDtoMapper.INSTANCE.toMissionLogResList(missionLogList); diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionService.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionService.java index a1e05590..388f053c 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionService.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/MissionService.java @@ -1,7 +1,11 @@ package com.wakeUpTogetUp.togetUp.api.mission; -import com.wakeUpTogetUp.togetUp.api.mission.objectDetection.NaverObjectDetectionService; +import com.wakeUpTogetUp.togetUp.api.mission.objectDetection.NaverAiService; import com.wakeUpTogetUp.togetUp.api.mission.objectDetection.ObjectDetectionService; +import com.wakeUpTogetUp.togetUp.api.mission.objectDetection.dto.response.FaceRecognitionRes; +import com.wakeUpTogetUp.togetUp.api.mission.objectDetection.dto.response.FaceRecognitionRes.Face; +import com.wakeUpTogetUp.togetUp.api.mission.objectDetection.dto.response.FaceRecognitionRes.Face.EmotionValue; +import com.wakeUpTogetUp.togetUp.api.mission.objectDetection.dto.response.ObjectDetectionRes; import com.wakeUpTogetUp.togetUp.api.room.RoomRepository; import com.wakeUpTogetUp.togetUp.api.room.model.Room; import com.wakeUpTogetUp.togetUp.api.mission.model.Mission; @@ -21,7 +25,7 @@ @RequiredArgsConstructor public class MissionService { private final ObjectDetectionService objectDetectionService; - private final NaverObjectDetectionService naverObjectDetectionService; + private final NaverAiService naverAiService; private final MissionRepository missionRepository; private final MissionLogRepository missionLogRepository; private final UserRepository userRepository; @@ -29,44 +33,47 @@ public class MissionService { // 객체 인식 public boolean recognizeObject(String object, MultipartFile missionImage) { - // 일치 여부 확인 - boolean isConsistent = false; - for(String objectDetected : naverObjectDetectionService.detectObject(missionImage) - .getPredictions().get(0) - .getDetection_names()){ + ObjectDetectionRes objectDetectionRes = naverAiService.detectObject(missionImage); + + if(objectDetectionRes.getPredictions().get(0).getNum_detections() == 0) + throw new BaseException(Status.MISSION_OBJECT_NOT_FOUND); + + for(String objectDetected : objectDetectionRes.getPredictions().get(0).getDetection_names()){ System.out.println("objectDetected = " + objectDetected); - if (objectDetected.equals(object)) { - isConsistent = true; - break; - } + if (objectDetected.equals(object)) + return true; } - // 일치하지 않으면 - if(!isConsistent) - throw new BaseException(Status.MISSION_FAILURE); - else - return isConsistent; + throw new BaseException(Status.MISSION_FAILURE); } public boolean recognizeObjectByModel(String object, MultipartFile missionImage) { - // 일치 여부 확인 - boolean isConsistent = false; for(String objectDetected : objectDetectionService.detectObject(missionImage)){ - System.out.println("objectDetected = " + objectDetected); - if (objectDetected.equals(object)) { - isConsistent = true; - break; - } + if (objectDetected.equals(object)) + return true; + } + + throw new BaseException(Status.MISSION_FAILURE); + } + + // 표정 인식 + public boolean recognizeEmotion(String object, MultipartFile missionImage) { + FaceRecognitionRes faceRecognitionRes = naverAiService.recognizeFace(missionImage); + + if(faceRecognitionRes.getInfo().getFaceCount() == 0) + throw new BaseException(Status.MISSION_OBJECT_NOT_FOUND); + + for(Face face : faceRecognitionRes.getFaces()) { + System.out.println("face.getEmotion().getValue() = " + face.getEmotion().getValue()); + + if(face.getEmotion().getValue().equals(EmotionValue.valueOf(object))) + return true; } - // 일치하지 않으면 - if(!isConsistent) - throw new BaseException(Status.MISSION_FAILURE); - else - return isConsistent; + throw new BaseException(Status.MISSION_FAILURE); } // 미션 수행 기록하기 diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/MissionLogRes.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/GetMissionLogRes.java similarity index 96% rename from src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/MissionLogRes.java rename to src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/GetMissionLogRes.java index 837c7c13..5b99b133 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/MissionLogRes.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/GetMissionLogRes.java @@ -8,7 +8,7 @@ @Getter @Setter @NoArgsConstructor -public class MissionLogRes { +public class GetMissionLogRes { @Schema(description = "미션 수행 기록 id") private Integer id; diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/PostObjectRecognitionRes.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/PostPerformMissionRes.java similarity index 86% rename from src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/PostObjectRecognitionRes.java rename to src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/PostPerformMissionRes.java index 6178e66e..abf01358 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/PostObjectRecognitionRes.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/dto/response/PostPerformMissionRes.java @@ -9,6 +9,6 @@ @Setter @NoArgsConstructor @AllArgsConstructor -public class PostObjectRecognitionRes { +public class PostPerformMissionRes { private String filePath; } diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/NaverObjectDetectionService.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/NaverAiService.java similarity index 55% rename from src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/NaverObjectDetectionService.java rename to src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/NaverAiService.java index 00f245a4..759c49bb 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/NaverObjectDetectionService.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/NaverAiService.java @@ -1,5 +1,6 @@ package com.wakeUpTogetUp.togetUp.api.mission.objectDetection; +import com.wakeUpTogetUp.togetUp.api.mission.objectDetection.dto.response.FaceRecognitionRes; import com.wakeUpTogetUp.togetUp.api.mission.objectDetection.dto.response.ObjectDetectionRes; import com.wakeUpTogetUp.togetUp.common.Status; import com.wakeUpTogetUp.togetUp.exception.BaseException; @@ -16,7 +17,7 @@ @Service @RequiredArgsConstructor -public class NaverObjectDetectionService { +public class NaverAiService { @Value("${naver.application.client-id}") private String clientId; @@ -85,6 +86,80 @@ public ObjectDetectionRes detectObject(MultipartFile image) { br = new BufferedReader(new InputStreamReader(con.getInputStream())); } + String inputLine; + if(br != null) { + StringBuffer response = new StringBuffer(); + while ((inputLine = br.readLine()) != null) { + response.append(inputLine); + } + br.close(); + System.out.println(response.toString()); + + return mapper.readValue(response.toString(), ObjectDetectionRes.class); + } else { + throw new BaseException(Status.INTERNAL_SERVER_ERROR); + } + + } catch (Exception e) { + System.out.println(e); + throw new BaseException(Status.INTERNAL_SERVER_ERROR); + } + } + + public FaceRecognitionRes recognizeFace(MultipartFile image) { + try { + String paramName = "image"; // 파라미터명은 image로 지정 +// String imgFile = "이미지 파일 경로 "; +// File uploadFile = new File(imgFile); + + String apiURL = "https://naveropenapi.apigw.ntruss.com/vision/v1/face"; // 얼굴 감지 + URL url = new URL(apiURL); + HttpURLConnection con = (HttpURLConnection)url.openConnection(); + con.setUseCaches(false); + con.setDoOutput(true); + con.setDoInput(true); + + // multipart request + String boundary = "---" + System.currentTimeMillis() + "---"; + con.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary); + con.setRequestProperty("X-NCP-APIGW-API-KEY-ID", clientId); + con.setRequestProperty("X-NCP-APIGW-API-KEY", clientSecret); + OutputStream outputStream = con.getOutputStream(); + PrintWriter writer = new PrintWriter(new OutputStreamWriter(outputStream, "UTF-8"), true); + String LINE_FEED = "\r\n"; + + // file 추가 + String fileName = image.getOriginalFilename(); + writer.append("--" + boundary).append(LINE_FEED); + writer.append("Content-Disposition: form-data; name=\"" + paramName + "\"; filename=\"" + fileName + "\"").append(LINE_FEED); + writer.append("Content-Type: " + URLConnection.guessContentTypeFromName(fileName)).append(LINE_FEED); + writer.append(LINE_FEED); + writer.flush(); + +// FileInputStream inputStream = new FileInputStream(uploadFile); +// byte[] buffer = new byte[4096]; +// int bytesRead = -1; +// while ((bytesRead = inputStream.read(buffer)) != -1) { +// outputStream.write(buffer, 0, bytesRead); +// } + + outputStream.write(imageCompressor.compressImage(image, 0.5f)); + outputStream.flush(); +// inputStream.close(); + + writer.append(LINE_FEED).flush(); + writer.append("--" + boundary + "--").append(LINE_FEED); + writer.close(); + BufferedReader br = null; + int responseCode = con.getResponseCode(); + + if(responseCode==200) { // 정상 호출 + br = new BufferedReader(new InputStreamReader(con.getInputStream())); + } else { // 오류 발생 + System.out.println("error!!!!!!! responseCode= " + responseCode); + br = new BufferedReader(new InputStreamReader(con.getInputStream())); + } + String inputLine; if(br != null) { StringBuffer response = new StringBuffer(); @@ -94,12 +169,12 @@ public ObjectDetectionRes detectObject(MultipartFile image) { br.close(); System.out.println(response.toString()); - return mapper.readValue(response.toString(), ObjectDetectionRes.class); + return mapper.readValue(response.toString(), FaceRecognitionRes.class); } else { throw new BaseException(Status.INTERNAL_SERVER_ERROR); } - } catch (Exception e) { + System.out.println(e); throw new BaseException(Status.INTERNAL_SERVER_ERROR); } } diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/dto/response/FaceRecognitionRes.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/dto/response/FaceRecognitionRes.java new file mode 100644 index 00000000..64e847a2 --- /dev/null +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/dto/response/FaceRecognitionRes.java @@ -0,0 +1,88 @@ +package com.wakeUpTogetUp.togetUp.api.mission.objectDetection.dto.response; + +import java.util.List; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Getter +@NoArgsConstructor +public class FaceRecognitionRes { + private Info info; + private List faces; + + @Getter + public static class Info { + private Size size; + private int faceCount; + + @Getter + public static class Size { + private int width; + private int height; + } + } + @Getter + public static class Face { + private Roi roi; + private Landmark landmark; + private Attribute gender; + private Attribute age; + private Attribute emotion; + private Attribute pose; + + @Getter + public static class Roi { + private int x; + private int y; + private int width; + private int height; + } + + @Getter + public static class Landmark { + private Point leftEye; + private Point rightEye; + private Point nose; + private Point leftMouth; + private Point rightMouth; + + @Getter + public static class Point { + private int x; + private int y; + } + } + + @Getter + public static class Attribute { + private T value; + private double confidence; + } + + public enum GenderValue { + male, female // Add other potential gender values if necessary + } + + public enum EmotionValue { + angry, + disgust, + fear, + laugh, + neutral, + sad, + suprise, + smile, + talking + } + + public enum PoseValue { + part_face, + false_face, + sunglasses, + frontal_face, + left_face, + right_face, + rotate_face, + } + } +} diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/dto/response/ObjectDetectionRes.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/dto/response/ObjectDetectionRes.java index 4a8ad789..c48db131 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/dto/response/ObjectDetectionRes.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/objectDetection/dto/response/ObjectDetectionRes.java @@ -9,7 +9,6 @@ public class ObjectDetectionRes { private List predictions; - // getters, setters 및 기타 필요한 메서드를 추가합니다. @Getter public static class Prediction { private int num_detections; diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/common/Constant.java b/src/main/java/com/wakeUpTogetUp/togetUp/common/Constant.java index 59a36262..b47ffd67 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/common/Constant.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/common/Constant.java @@ -7,8 +7,8 @@ public class Constant { public static final String API_DESCRIPTION = "TOGEPUP API DESCRIPTION"; public static final String BEARER= "jwt"; public static final String JWT_PREFIX= "Bearer"; - public static final Integer INVITATION_CODE_LENGTH =5; - public static final String AUTHORIZATION_CODE= "authorization_code" ; + public static final String GET_ALARM_MODE_PERSONAL = "personal"; + public static final String GET_ALARM_MODE_GROUP = "group"; } \ No newline at end of file diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/config/ODConfig.java b/src/main/java/com/wakeUpTogetUp/togetUp/config/ODConfig.java index d7798992..b2e0d7ea 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/config/ODConfig.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/config/ODConfig.java @@ -17,18 +17,17 @@ public class ODConfig { private final Integer lineThicknessRatio = 333; private final Double fontSizeRatio = 1145.14; private final List names = new ArrayList<>(Arrays.asList( - "person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", - "truck", "boat", "traffic light", "fire hydrant", "stop sign", "parking meter", - "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear", - "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", - "frisbee", "skis", "snowboard", "sports ball", "kite", "baseball bat", - "baseball glove", "skateboard", "surfboard", "tennis racket", "bottle", - "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple", - "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", - "cake", "chair", "couch", "potted plant", "bed", "dining table", "toilet", - "tv", "laptop", "mouse", "remote", "keyboard", "cell phone", "microwave", - "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", - "teddy bear", "hair drier", "toothbrush")); + "person", "bicycle", "car", "motorcycle", "airplane", "bus", + "train", "boat", "traffic light", "bird", "cat", "dog", + "horse", "backpack", "umbrella", "handbag", "tie", "suitcase", + "frisbee", "skis", "surfboard", "snowboard", "sports ball", + "baseball bat", "baseball glove", "skateboard", "tennis racket", + "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", + "banana", "apple", "sandwich", "orange", "broccoli", "carrot", + "hot dog", "pizza", "donut", "cake", "chair", "couch", + "potted plant", "bed", "tv", "laptop", "mouse", "keyboard", + "cell phone", "oven", "toaster", "refrigerator", "book", "clock", + "vase", "scissors", "teddy bear", "hair drier", "toothbrush")); private Map colors; diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/exception/GlobalExceptionHandler.java b/src/main/java/com/wakeUpTogetUp/togetUp/exception/GlobalExceptionHandler.java index 04999649..0c3a68e8 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/exception/GlobalExceptionHandler.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/exception/GlobalExceptionHandler.java @@ -24,6 +24,7 @@ public class GlobalExceptionHandler { @ExceptionHandler({ BaseException.class }) protected ResponseEntity> handleCustomException(BaseException exception) { logger.debug("BaseResponse exception occurred: {}", exception.getMessage(), exception); + exception.printStackTrace(); Status status = exception.getStatus(); ResponseEntity> responseEntity = ResponseEntity.status(status.getHttpStatus()) @@ -47,6 +48,7 @@ protected BaseResponse handleBadRequestException(Exception exception) { logger.debug("Bad request exception occurred: {}", exception.getMessage(), exception); + exception.printStackTrace(); return new BaseResponse<>(Status.BAD_REQUEST); } @@ -56,6 +58,7 @@ protected BaseResponse handleNotSupportedMediaTypeException(HttpMediaTypeNotSupp logger.debug("Bad request exception occurred: {}", exception.getMessage(), exception); + exception.printStackTrace(); return new BaseResponse<>(Status.UNSUPPORTED_MEDIA_TYPE); } @@ -64,6 +67,7 @@ protected BaseResponse handleNotSupportedMediaTypeException(HttpMediaTypeNotSupp @ExceptionHandler(MethodArgumentNotValidException.class) protected BaseResponse validException(MethodArgumentNotValidException exception) { String msg = "유효성 검사 실패 : " + exception.getBindingResult().getAllErrors().get(0).getDefaultMessage(); + exception.printStackTrace(); return new BaseResponse(Status.BAD_REQUEST, msg); } @@ -74,6 +78,7 @@ protected BaseResponse handleServerException(Exception exception) { logger.error("Unexpected exception occurred: {}", exception.getMessage(), exception); + exception.printStackTrace(); return new BaseResponse<>(Status.INTERNAL_SERVER_ERROR); } diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/utils/mapper/EntityDtoMapper.java b/src/main/java/com/wakeUpTogetUp/togetUp/utils/mapper/EntityDtoMapper.java index 855693ab..28425f20 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/utils/mapper/EntityDtoMapper.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/utils/mapper/EntityDtoMapper.java @@ -7,7 +7,7 @@ import com.wakeUpTogetUp.togetUp.api.notification.dto.response.NotificationRes; import com.wakeUpTogetUp.togetUp.api.notification.entity.Notification; import com.wakeUpTogetUp.togetUp.api.mission.dto.response.GetMissionWithObjectListRes; -import com.wakeUpTogetUp.togetUp.api.mission.dto.response.MissionLogRes; +import com.wakeUpTogetUp.togetUp.api.mission.dto.response.GetMissionLogRes; import com.wakeUpTogetUp.togetUp.api.mission.model.Mission; import com.wakeUpTogetUp.togetUp.api.mission.model.MissionLog; import org.mapstruct.Mapping; @@ -42,8 +42,8 @@ public interface EntityDtoMapper { @Mapping(target = "userId", source = "user.id") @Mapping(target = "roomId", source = "room.id") @Mapping(target = "missionId", source = "mission.id") - MissionLogRes toMissionLogRes(MissionLog missionLog); - List toMissionLogResList(List missionLogList); + GetMissionLogRes toMissionLogRes(MissionLog missionLog); + List toMissionLogResList(List missionLogList); // notification @Mapping(target = "roomId", source = "room.id") diff --git a/src/main/resources/migration/data.sql b/src/main/resources/migration/data.sql index af5effec..5c19ffdb 100644 --- a/src/main/resources/migration/data.sql +++ b/src/main/resources/migration/data.sql @@ -5,68 +5,68 @@ INSERT INTO mission (id, name, created_at, is_active) VALUES (2, 'object recogni INSERT INTO mission (id, name, created_at, is_active) VALUES (3, 'expression recognition', '2023-09-09 22:29:21', 1); -- 미션 오브젝트 -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (1, 'person', '사람', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (1, 'person', '사람', '? ', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (2, 'bicycle', '자전거', '?', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (3, 'car', '자동차', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (4, 'motorcycle', '오토바이', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (5, 'airplane', '비행기', '✈️', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (4, 'motorcycle', '오토바이', '?️ ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (5, 'airplane', '비행기', '✈️ ', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (6, 'bus', '버스', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (7, 'train', '기차', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (8, 'boat', '보트', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (7, 'train', '기차', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (8, 'boat', '보트', '?️ ', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (9, 'traffic light', '교통 신호등', '?', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (10, 'bird', '새', '?', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (11, 'cat', '고양이', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (12, 'dog', '개', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (13, 'horse', '말', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (14, 'backpack', '책가방', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (15, 'umbrella', '우산', '☂️', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (12, 'dog', '개', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (13, 'horse', '말', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (14, 'backpack', '책가방', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (15, 'umbrella', '우산', '☂️ ', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (16, 'handbag', '핸드백', '?', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (17, 'tie', '넥타이', '?', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (18, 'suitcase', '캐리어', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (19, 'frisbee', '프리스비', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (20, 'skis', '스키', '⛷️', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (21, 'surfboard', '서핑보드', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (19, 'frisbee', '프리스비', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (20, 'skis', '스키', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (21, 'surfboard', '서핑보드', '??‍♀️', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (22, 'snowboard', '스노보드', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (23, 'sports ball', '스포츠 볼', '⚽', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (23, 'sports ball', '스포츠 볼', '⚽️', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (24, 'baseball bat', '야구 방망이', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (25, 'baseball glove', '야구 글러브', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (25, 'baseball glove', '야구 글러브', '⚾', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (26, 'skateboard', '스케이트보드', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (27, 'tennis racket', '테니스 라켓', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (28, 'bottle', '병', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (29, 'wine glass', '와인 글라스', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (30, 'cup', '컵', '☕', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (27, 'tennis racket', '테니스 라켓', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (28, 'bottle', '병', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (29, 'wine glass', '와인 글라스', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (30, 'cup', '컵', '☕️', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (31, 'fork', '포크', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (32, 'knife', '나이프', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (33, 'spoon', '숟가락', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (34, 'bowl', '그릇', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (32, 'knife', '나이프', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (33, 'spoon', '숟가락', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (34, 'bowl', '그릇', '? ', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (35, 'banana', '바나나', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (36, 'apple', '사과', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (37, 'sandwich', '샌드위치', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (38, 'orange', '오렌지', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (36, 'apple', '사과', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (37, 'sandwich', '샌드위치', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (38, 'orange', '오렌지', '? ', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (39, 'broccoli', '브로콜리', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (40, 'carrot', '당근', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (40, 'carrot', '당근', '? ', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (41, 'hot dog', '핫도그', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (42, 'pizza', '피자', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (43, 'donut', '도넛', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (42, 'pizza', '피자', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (43, 'donut', '도넛', '? ', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (44, 'cake', '케이크', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (45, 'chair', '의자', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (46, 'couch', '소파', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (45, 'chair', '의자', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (46, 'couch', '소파', '?️', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (47, 'potted plant', '화분', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (48, 'bed', '침대', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (49, 'tv', '텔레비전', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (50, 'laptop', '노트북', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (51, 'mouse', '마우스', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (48, 'bed', '침대', '?️ ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (49, 'tv', '텔레비전', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (50, 'laptop', '노트북', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (51, 'mouse', '마우스', '?️ ', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (52, 'keyboard', '키보드', '⌨️', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (53, 'cell phone', '휴대폰', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (53, 'cell phone', '휴대폰', '? ', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (54, 'oven', '오븐', '?', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (55, 'toaster', '토스터', '?', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (56, 'refrigerator', '냉장고', '?', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (57, 'book', '책', '?', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (58, 'clock', '시계', '⏰', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (59, 'vase', '꽃병', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (60, 'scissors', '가위', '??‍♀️', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (61, 'teddy bear', '테디 베어', '?', 1, 2); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (62, 'hair drier', '헤어 드라이어', '?', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (60, 'scissors', '가위', '✂️ ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (61, 'teddy bear', '테디 베어', '? ', 1, 2); +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (62, 'hair drier', '헤어 드라이어', '?‍♀️', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (63, 'toothbrush', '칫솔', '?', 1, 2); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (64, 'angry', '화난 표정', '?', 1, 3); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (65, 'disgust', '역겨워하는 표정', '?', 1, 3); @@ -75,4 +75,4 @@ INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (6 INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (68, 'neutral', '평온한 표정', '?', 1, 3); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (69, 'sad', '슬픈 표정', '?', 1, 3); INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (70, 'suprise', '놀란 표정', '?', 1, 3); -INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (71, 'smile', '미소짓는 표정', '?', 1, 3); \ No newline at end of file +INSERT INTO mission_object (id, name, kr, icon, is_active, mission_id) VALUES (71, 'smile', '미소짓는 표정', '?', 1, 3);