From 4de908b9ad63826c9ac32873e446668ccd7f3615 Mon Sep 17 00:00:00 2001 From: hye-on Date: Thu, 21 Sep 2023 11:08:24 +0900 Subject: [PATCH] =?UTF-8?q?#49=20[CHORE]=20:=20=EB=A6=AC=EB=B7=B0=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../togetUp/api/alarm/AlarmService.java | 8 +---- .../api/auth/dto/request/SocialLoginReq.java | 2 +- .../togetUp/api/mission/model/MissionLog.java | 4 +-- .../api/notification/entity/Notification.java | 4 +-- .../togetUp/api/room/RoomController.java | 8 ++--- .../togetUp/api/room/RoomService.java | 34 ++++++++++--------- ...LogReq.java => RoomUserLogMissionReq.java} | 2 +- .../api/room/dto/response/RoomRes.java | 3 +- ...LogRes.java => RoomUserMissionLogRes.java} | 2 +- .../togetUp/utils/TimeFormatter.java | 26 ++++++++++++++ .../togetUp/utils/TimestampFormatter.java | 11 ------ .../togetUp/utils/mapper/EntityDtoMapper.java | 6 ++-- src/main/resources/migration/mock.sql | 22 ++++++------ 13 files changed, 71 insertions(+), 61 deletions(-) rename src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/request/{RoomUserLogReq.java => RoomUserLogMissionReq.java} (96%) rename src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/response/{RoomUserLogRes.java => RoomUserMissionLogRes.java} (97%) create mode 100644 src/main/java/com/wakeUpTogetUp/togetUp/utils/TimeFormatter.java delete mode 100644 src/main/java/com/wakeUpTogetUp/togetUp/utils/TimestampFormatter.java diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/AlarmService.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/AlarmService.java index 61643c47..f507a263 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/AlarmService.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/alarm/AlarmService.java @@ -132,12 +132,6 @@ public int deleteAlarm(Integer alarmId) { return alarm.getId(); } - //String 인 alarmTime을 LocalTime으로 변경 - public LocalTime alarmTimeStringToLocalTime(String alarmTime) - { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss"); - LocalTime localTime = LocalTime.parse(alarmTime, formatter); - return localTime; - } + } diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/auth/dto/request/SocialLoginReq.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/auth/dto/request/SocialLoginReq.java index 57d35de1..a3f1ad0b 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/auth/dto/request/SocialLoginReq.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/auth/dto/request/SocialLoginReq.java @@ -9,7 +9,7 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; -@Schema(description = "소셜로그인 요펑") +@Schema(description = "소셜로그인 요청") @Setter @Getter @NoArgsConstructor diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/model/MissionLog.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/model/MissionLog.java index 61f80d26..2fbd7a53 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/model/MissionLog.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/mission/model/MissionLog.java @@ -2,7 +2,7 @@ import com.wakeUpTogetUp.togetUp.api.room.model.Room; import com.wakeUpTogetUp.togetUp.api.users.model.User; -import com.wakeUpTogetUp.togetUp.utils.TimestampFormatter; +import com.wakeUpTogetUp.togetUp.utils.TimeFormatter; import lombok.*; import org.hibernate.annotations.DynamicInsert; @@ -35,7 +35,7 @@ public class MissionLog { private String missionPicLink; @Column(name = "created_at",columnDefinition = "Timestamp") - private String createdAt = TimestampFormatter.format(new Timestamp(System.currentTimeMillis())); + private String createdAt = TimeFormatter.timestampFormat(new Timestamp(System.currentTimeMillis())); @Column(name = "is_deleted") private Boolean isDeleted = false; diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/notification/entity/Notification.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/notification/entity/Notification.java index 606bb4f4..a5fe0e21 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/notification/entity/Notification.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/notification/entity/Notification.java @@ -2,7 +2,7 @@ import com.wakeUpTogetUp.togetUp.api.room.model.Room; import com.wakeUpTogetUp.togetUp.api.users.fcmToken.FcmToken; -import com.wakeUpTogetUp.togetUp.utils.TimestampFormatter; +import com.wakeUpTogetUp.togetUp.utils.TimeFormatter; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; @@ -41,7 +41,7 @@ public Notification(String title, String content, Room room, FcmToken fcmToken) private String content; @Column(columnDefinition = "timestamp") - private String createdAt = TimestampFormatter.format(new Timestamp(System.currentTimeMillis())); + private String createdAt = TimeFormatter.timestampFormat(new Timestamp(System.currentTimeMillis())); @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "roomId",columnDefinition = "INT UNSIGNED") diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/room/RoomController.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/room/RoomController.java index 496b0d5b..7acdf945 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/room/RoomController.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/room/RoomController.java @@ -2,9 +2,9 @@ import com.wakeUpTogetUp.togetUp.api.auth.AuthUser; import com.wakeUpTogetUp.togetUp.api.mission.MissionLogRepository; -import com.wakeUpTogetUp.togetUp.api.room.dto.request.RoomUserLogReq; +import com.wakeUpTogetUp.togetUp.api.room.dto.request.RoomUserLogMissionReq; import com.wakeUpTogetUp.togetUp.api.room.dto.request.RoomReq; -import com.wakeUpTogetUp.togetUp.api.room.dto.response.RoomUserLogRes; +import com.wakeUpTogetUp.togetUp.api.room.dto.response.RoomUserMissionLogRes; import com.wakeUpTogetUp.togetUp.api.room.dto.response.RoomRes; import com.wakeUpTogetUp.togetUp.common.dto.BaseResponse; import com.wakeUpTogetUp.togetUp.common.Status; @@ -58,11 +58,11 @@ public BaseResponse> getList(@Parameter(hidden = true) @AuthUser I @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "요청에 성공하였습니다.", - content = @Content(schema = @Schema(implementation = RoomUserLogRes.class))), + content = @Content(schema = @Schema(implementation = RoomUserMissionLogRes.class))), @ApiResponse(responseCode = "404", description = "그룹의 멤버가 없습니다.")}) @Operation(description = "그룹의 멤버의 미션기록 보기") @GetMapping("/user/mission-log") - public BaseResponse getRoomDetailByDate(@Parameter(hidden = true) @AuthUser Integer userId, @RequestBody RoomUserLogReq roomLogReq) { + public BaseResponse getRoomDetailByDate(@Parameter(hidden = true) @AuthUser Integer userId, @RequestBody RoomUserLogMissionReq roomLogReq) { return new BaseResponse(Status.SUCCESS,roomService.getRoomUserLogList(userId,roomLogReq)); diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/room/RoomService.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/room/RoomService.java index 281d3387..0498eb13 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/room/RoomService.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/room/RoomService.java @@ -5,8 +5,8 @@ import com.wakeUpTogetUp.togetUp.api.alarm.model.Alarm; import com.wakeUpTogetUp.togetUp.api.mission.MissionLogRepository; import com.wakeUpTogetUp.togetUp.api.mission.model.MissionLog; -import com.wakeUpTogetUp.togetUp.api.room.dto.request.RoomUserLogReq; -import com.wakeUpTogetUp.togetUp.api.room.dto.response.RoomUserLogRes; +import com.wakeUpTogetUp.togetUp.api.room.dto.request.RoomUserLogMissionReq; +import com.wakeUpTogetUp.togetUp.api.room.dto.response.RoomUserMissionLogRes; import com.wakeUpTogetUp.togetUp.api.room.dto.response.RoomRes; import com.wakeUpTogetUp.togetUp.api.room.model.Room; import com.wakeUpTogetUp.togetUp.api.room.model.RoomUser; @@ -16,6 +16,7 @@ import com.wakeUpTogetUp.togetUp.common.Status; import com.wakeUpTogetUp.togetUp.exception.BaseException; import com.wakeUpTogetUp.togetUp.api.room.dto.request.RoomReq; +import com.wakeUpTogetUp.togetUp.utils.TimeFormatter; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -39,6 +40,7 @@ public class RoomService { private final RoomUserRepository roomUserRepository; private final AlarmRepository alarmRepository; private final MissionLogRepository missionLogRepository; + private final TimeFormatter timeFormatter; @Transactional public void createRoom(Integer userId, RoomReq roomReq){ @@ -78,29 +80,29 @@ public List getRoomList(Integer userId) { } - public RoomUserLogRes getRoomUserLogList(Integer userId, RoomUserLogReq roomUserLogReq){ - Integer roomId = roomUserLogReq.getRoomId(); - LocalDateTime localDateTime = roomUserLogReq.getLocalDateTime(); - boolean isAlarmActive = roomUserLogReq.getIsAlarmActive(); + public RoomUserMissionLogRes getRoomUserLogList(Integer userId, RoomUserLogMissionReq roomUserLogMissionReq){ + Integer roomId = roomUserLogMissionReq.getRoomId(); + LocalDateTime localDateTime = roomUserLogMissionReq.getLocalDateTime(); + boolean isAlarmActive = roomUserLogMissionReq.getIsAlarmActive(); List roomUserList = roomUserRepository.findAllByRoom_Id(roomId); //크기가 0이면 예외처리 if(roomUserList.isEmpty()) throw new BaseException(Status.ROOM_USER_NOT_FOUND); //룸이름, userId,userName 매핑 (항상 반환하는 정보) - RoomUserLogRes roomUserLogRes =new RoomUserLogRes(); - roomUserLogRes.setName(roomUserList.get(0).getRoom().getName()); - roomUserLogRes.setUserLogList(EntityDtoMapper.INSTANCE.toUserLogDataList(roomUserList)); + RoomUserMissionLogRes roomUserMissionLogRes =new RoomUserMissionLogRes(); + roomUserMissionLogRes.setName(roomUserList.get(0).getRoom().getName()); + roomUserMissionLogRes.setUserLogList(EntityDtoMapper.INSTANCE.toUserLogDataList(roomUserList)); //isMyLog, missionPicLink, userCompleteType 는 각케이스에 맞게 설정 - return setUserLogData(roomUserLogRes, userId, roomId, isAlarmActive, localDateTime); + return setUserLogData(roomUserMissionLogRes, userId, roomId, isAlarmActive, localDateTime); } - public RoomUserLogRes setUserLogData(RoomUserLogRes roomUserLogRes,Integer userId,Integer roomId,boolean isAlarmActive,LocalDateTime localDateTime){ + public RoomUserMissionLogRes setUserLogData(RoomUserMissionLogRes roomUserMissionLogRes, Integer userId, Integer roomId, boolean isAlarmActive, LocalDateTime localDateTime){ if(!isAlarmActive) { - for (RoomUserLogRes.UserLogData userLogData : roomUserLogRes.getUserLogList()) { + for (RoomUserMissionLogRes.UserLogData userLogData : roomUserMissionLogRes.getUserLogList()) { userLogData.setUserCompleteType(UserCompleteType.NOT_MISSION); userLogData.setMissionPicLink(Constant.ROOM_USER_MISSION_IMG_NOT_MISSION); if(userLogData.getUserId()==userId) @@ -109,7 +111,7 @@ public RoomUserLogRes setUserLogData(RoomUserLogRes roomUserLogRes,Integer userI } } - return roomUserLogRes; + return roomUserMissionLogRes; } //missionLog에서 날짜로 가져옴 . List missionLogList = missionLogRepository.findAllByRoom_IdAndCreatedAtContaining(roomId,localDateTime.toLocalDate()); @@ -117,7 +119,7 @@ public RoomUserLogRes setUserLogData(RoomUserLogRes roomUserLogRes,Integer userI boolean isToday = localDateTime.toLocalDate().isEqual(LocalDate.now()); // for 문돌면서 : 유저 Id로 비교 : - for (RoomUserLogRes.UserLogData userLogData : roomUserLogRes.getUserLogList()) { + for (RoomUserMissionLogRes.UserLogData userLogData : roomUserMissionLogRes.getUserLogList()) { // 유저 Id가 있으면 (미션 수행한 기록이 있으면) -> 미션 수행사진 매핑 if(userLogData.getUserId()==userId) { @@ -138,7 +140,7 @@ public RoomUserLogRes setUserLogData(RoomUserLogRes roomUserLogRes,Integer userI { //알람의 다시 울림 시간을 계산함. Alarm alarm = alarmRepository.findFirstByRoom_Id(roomId); - LocalTime alarmLocalTime = alarmService.alarmTimeStringToLocalTime(alarm.getAlarmTime()); + LocalTime alarmLocalTime = timeFormatter.stringToLocalTime(alarm.getAlarmTime()); LocalTime alarmOffTime = alarmLocalTime.withMinute(alarmLocalTime.getMinute() + alarm.getSnoozeCnt()*alarm.getSnoozeInterval()); //알람이 끝나기 전인지 여부 boolean isBeforeAlarmEnd = localDateTime.toLocalTime().isBefore(alarmOffTime); @@ -163,7 +165,7 @@ public RoomUserLogRes setUserLogData(RoomUserLogRes roomUserLogRes,Integer userI - return roomUserLogRes; + return roomUserMissionLogRes; } diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/request/RoomUserLogReq.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/request/RoomUserLogMissionReq.java similarity index 96% rename from src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/request/RoomUserLogReq.java rename to src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/request/RoomUserLogMissionReq.java index 642e2a99..efcf0d02 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/request/RoomUserLogReq.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/request/RoomUserLogMissionReq.java @@ -13,7 +13,7 @@ @Setter @AllArgsConstructor @NoArgsConstructor -public class RoomUserLogReq { +public class RoomUserLogMissionReq { @Schema( description = "룸 id",requiredMode = Schema.RequiredMode.REQUIRED ,example = "1") @NotBlank(message = "룸 id는 공백일 수 없습니다.") diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/response/RoomRes.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/response/RoomRes.java index 17425a18..5ce104a0 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/response/RoomRes.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/response/RoomRes.java @@ -3,7 +3,6 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import javax.validation.constraints.NotBlank; @Schema(description = "룸리스트 요청 api 응답") @Getter @@ -16,7 +15,7 @@ public class RoomRes { @Schema( description = "룸 id" ,example = "1") private Integer roomId; - @Schema( description = "룸 이름",example = "⏰") + @Schema( description = "룸이 가이고 있는 알람의 아이콘",example = "⏰") private String icon; @Schema( description = "룸 이름",example = "일찍 일어나는 새들의 방") diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/response/RoomUserLogRes.java b/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/response/RoomUserMissionLogRes.java similarity index 97% rename from src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/response/RoomUserLogRes.java rename to src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/response/RoomUserMissionLogRes.java index 5ed5e4a1..449fd7aa 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/response/RoomUserLogRes.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/api/room/dto/response/RoomUserMissionLogRes.java @@ -10,7 +10,7 @@ @Data @AllArgsConstructor @NoArgsConstructor -public class RoomUserLogRes { +public class RoomUserMissionLogRes { @Schema(description = "room name",example = "설여대 기상방") private String name; diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/utils/TimeFormatter.java b/src/main/java/com/wakeUpTogetUp/togetUp/utils/TimeFormatter.java new file mode 100644 index 00000000..07c164b9 --- /dev/null +++ b/src/main/java/com/wakeUpTogetUp/togetUp/utils/TimeFormatter.java @@ -0,0 +1,26 @@ +package com.wakeUpTogetUp.togetUp.utils; + + +import org.springframework.stereotype.Component; + +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; + +@Component +public class TimeFormatter { + public static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + public static String timestampFormat(Timestamp timestamp) { + return simpleDateFormat.format(timestamp); + } + + + public LocalTime stringToLocalTime(String timeString) + { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss"); + LocalTime localTime = LocalTime.parse(timeString, formatter); + return localTime; + + } +} diff --git a/src/main/java/com/wakeUpTogetUp/togetUp/utils/TimestampFormatter.java b/src/main/java/com/wakeUpTogetUp/togetUp/utils/TimestampFormatter.java deleted file mode 100644 index 66c80099..00000000 --- a/src/main/java/com/wakeUpTogetUp/togetUp/utils/TimestampFormatter.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.wakeUpTogetUp.togetUp.utils; - -import java.sql.Timestamp; -import java.text.SimpleDateFormat; - -public class TimestampFormatter { - public static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - public static String format(Timestamp timestamp) { - return simpleDateFormat.format(timestamp); - } -} 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 427410b3..7329d00c 100644 --- a/src/main/java/com/wakeUpTogetUp/togetUp/utils/mapper/EntityDtoMapper.java +++ b/src/main/java/com/wakeUpTogetUp/togetUp/utils/mapper/EntityDtoMapper.java @@ -10,7 +10,7 @@ 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 com.wakeUpTogetUp.togetUp.api.room.dto.response.RoomUserLogRes; +import com.wakeUpTogetUp.togetUp.api.room.dto.response.RoomUserMissionLogRes; import com.wakeUpTogetUp.togetUp.api.room.dto.response.RoomRes; import com.wakeUpTogetUp.togetUp.api.room.model.RoomUser; import org.mapstruct.Mapper; @@ -71,11 +71,11 @@ public interface EntityDtoMapper { @Mapping(target = "userId", source = "user.id") @Mapping(target = "userName",source = "user.name") - RoomUserLogRes.UserLogData toUserLogData(RoomUser roomUser); + RoomUserMissionLogRes.UserLogData toUserLogData(RoomUser roomUser); @Mapping(target = "userId", source = "user.id") @Mapping(target = "userName",source = "user.name") - List toUserLogDataList(List roomUser); + List toUserLogDataList(List roomUser); diff --git a/src/main/resources/migration/mock.sql b/src/main/resources/migration/mock.sql index 27b822ad..1cdbbc21 100644 --- a/src/main/resources/migration/mock.sql +++ b/src/main/resources/migration/mock.sql @@ -2,18 +2,18 @@ -INSERT INTO togetUp_local.room (id, name, intro, topic, invitation_code, created_at, updated_at, is_deleted) VALUES (1, 'test room1', 'test room 1 입니다', 'kdfja39r83', 'dfjasdlf', '2023-09-19 11:01:11', '2023-09-19 11:02:24', 0); -INSERT INTO togetUp_local.room (id, name, intro, topic, invitation_code, created_at, updated_at, is_deleted) VALUES (2, 'test room2', 'test room 2 입니다', 'adsfadf', 'asdfade', '2023-09-19 11:03:15', '2023-09-19 11:03:15', 0); -INSERT INTO togetUp_local.room (id, name, intro, topic, invitation_code, created_at, updated_at, is_deleted) VALUES (3, 'test room3', 'test room 3입니다', 'egaaegg', 'egageg', '2023-09-19 11:03:45', '2023-09-19 11:03:48', 0); +INSERT INTO room (id, name, intro, topic, invitation_code, created_at, updated_at, is_deleted) VALUES (1, 'test room1', 'test room 1 입니다', 'kdfja39r83', 'dfjasdlf', '2023-09-19 11:01:11', '2023-09-19 11:02:24', 0); +INSERT INTO room (id, name, intro, topic, invitation_code, created_at, updated_at, is_deleted) VALUES (2, 'test room2', 'test room 2 입니다', 'adsfadf', 'asdfade', '2023-09-19 11:03:15', '2023-09-19 11:03:15', 0); +INSERT INTO room (id, name, intro, topic, invitation_code, created_at, updated_at, is_deleted) VALUES (3, 'test room3', 'test room 3입니다', 'egaaegg', 'egageg', '2023-09-19 11:03:45', '2023-09-19 11:03:48', 0); -INSERT INTO togetUp_local.alarm (id, name, icon, snooze_interval, snooze_cnt, alarm_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, is_snooze_activated, is_vibrate, is_activated, user_id, mission_id, mission_object_id, room_id) VALUES (1, 'room 1알람', '⏰', 5, 3, '11:10:23', 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1); -INSERT INTO togetUp_local.alarm (id, name, icon, snooze_interval, snooze_cnt, alarm_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, is_snooze_activated, is_vibrate, is_activated, user_id, mission_id, mission_object_id, room_id) VALUES (2, 'room 2알람', '⏰', 5, 3, '12:10:23', 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2); -INSERT INTO togetUp_local.alarm (id, name, icon, snooze_interval, snooze_cnt, alarm_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, is_snooze_activated, is_vibrate, is_activated, user_id, mission_id, mission_object_id, room_id) VALUES (3, 'room 3알람', '⏰', 5, 3, '10:10:23', 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3); +INSERT INTO alarm (id, name, icon, snooze_interval, snooze_cnt, alarm_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, is_snooze_activated, is_vibrate, is_activated, user_id, mission_id, mission_object_id, room_id) VALUES (1, 'room 1알람', '⏰', 5, 3, '11:10:23', 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1); +INSERT INTO alarm (id, name, icon, snooze_interval, snooze_cnt, alarm_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, is_snooze_activated, is_vibrate, is_activated, user_id, mission_id, mission_object_id, room_id) VALUES (2, 'room 2알람', '⏰', 5, 3, '12:10:23', 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2); +INSERT INTO alarm (id, name, icon, snooze_interval, snooze_cnt, alarm_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, is_snooze_activated, is_vibrate, is_activated, user_id, mission_id, mission_object_id, room_id) VALUES (3, 'room 3알람', '⏰', 5, 3, '10:10:23', 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3); -INSERT INTO togetUp_local.room_user (id, created_at, room_id, user_id) VALUES (1, '2023-09-16 11:08:38', 1, 1); -INSERT INTO togetUp_local.room_user (id, created_at, room_id, user_id) VALUES (2, '2023-09-17 11:08:38', 1, 2); -INSERT INTO togetUp_local.room_user (id, created_at, room_id, user_id) VALUES (3, '2023-09-18 11:08:38', 2, 1); -INSERT INTO togetUp_local.room_user (id, created_at, room_id, user_id) VALUES (4, '2023-09-19 11:08:38', 2, 2); -INSERT INTO togetUp_local.room_user (id, created_at, room_id, user_id) VALUES (5, '2023-09-19 11:08:38', 3, 1); +INSERT INTO room_user (id, created_at, room_id, user_id) VALUES (1, '2023-09-16 11:08:38', 1, 1); +INSERT INTO room_user (id, created_at, room_id, user_id) VALUES (2, '2023-09-17 11:08:38', 1, 2); +INSERT INTO room_user (id, created_at, room_id, user_id) VALUES (3, '2023-09-18 11:08:38', 2, 1); +INSERT INTO room_user (id, created_at, room_id, user_id) VALUES (4, '2023-09-19 11:08:38', 2, 2); +INSERT INTO room_user (id, created_at, room_id, user_id) VALUES (5, '2023-09-19 11:08:38', 3, 1);