diff --git a/server/src/main/java/com/talkka/server/review/enums/TimeSlot.java b/server/src/main/java/com/talkka/server/common/enums/TimeSlot.java similarity index 97% rename from server/src/main/java/com/talkka/server/review/enums/TimeSlot.java rename to server/src/main/java/com/talkka/server/common/enums/TimeSlot.java index 7b978932..523d24be 100644 --- a/server/src/main/java/com/talkka/server/review/enums/TimeSlot.java +++ b/server/src/main/java/com/talkka/server/common/enums/TimeSlot.java @@ -1,4 +1,4 @@ -package com.talkka.server.review.enums; +package com.talkka.server.common.enums; import com.talkka.server.common.util.EnumCodeInterface; diff --git a/server/src/main/java/com/talkka/server/review/util/TimeSlotConverter.java b/server/src/main/java/com/talkka/server/common/util/TimeSlotConverter.java similarity index 58% rename from server/src/main/java/com/talkka/server/review/util/TimeSlotConverter.java rename to server/src/main/java/com/talkka/server/common/util/TimeSlotConverter.java index c33a9e06..514e5360 100644 --- a/server/src/main/java/com/talkka/server/review/util/TimeSlotConverter.java +++ b/server/src/main/java/com/talkka/server/common/util/TimeSlotConverter.java @@ -1,7 +1,6 @@ -package com.talkka.server.review.util; +package com.talkka.server.common.util; -import com.talkka.server.common.util.EnumCodeConverter; -import com.talkka.server.review.enums.TimeSlot; +import com.talkka.server.common.enums.TimeSlot; import jakarta.persistence.Converter; diff --git a/server/src/main/java/com/talkka/server/review/dao/BusReviewEntity.java b/server/src/main/java/com/talkka/server/review/dao/BusReviewEntity.java index b712f023..51e858b9 100644 --- a/server/src/main/java/com/talkka/server/review/dao/BusReviewEntity.java +++ b/server/src/main/java/com/talkka/server/review/dao/BusReviewEntity.java @@ -9,8 +9,8 @@ import com.talkka.server.bus.dao.BusRouteEntity; import com.talkka.server.bus.dao.BusRouteStationEntity; -import com.talkka.server.review.enums.TimeSlot; -import com.talkka.server.review.util.TimeSlotConverter; +import com.talkka.server.common.enums.TimeSlot; +import com.talkka.server.common.util.TimeSlotConverter; import com.talkka.server.user.dao.UserEntity; import jakarta.persistence.Column; diff --git a/server/src/main/java/com/talkka/server/review/dao/BusReviewRepository.java b/server/src/main/java/com/talkka/server/review/dao/BusReviewRepository.java index 58a923a2..aa56ecd6 100644 --- a/server/src/main/java/com/talkka/server/review/dao/BusReviewRepository.java +++ b/server/src/main/java/com/talkka/server/review/dao/BusReviewRepository.java @@ -5,11 +5,10 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; -import com.talkka.server.review.enums.TimeSlot; +import com.talkka.server.common.enums.TimeSlot; @Repository public interface BusReviewRepository extends JpaRepository { - // 실제로 조회할 경우, 해당 쿼리를 항상 사용함. 따라서 네이밍을 findReviews로 변경 List findAllByWriterIdAndRouteIdAndStationIdAndTimeSlot( Long userId, Long routeId, diff --git a/server/src/main/java/com/talkka/server/review/dto/BusReviewReqDto.java b/server/src/main/java/com/talkka/server/review/dto/BusReviewReqDto.java index 5eadc8b3..1ed82f1c 100644 --- a/server/src/main/java/com/talkka/server/review/dto/BusReviewReqDto.java +++ b/server/src/main/java/com/talkka/server/review/dto/BusReviewReqDto.java @@ -2,8 +2,8 @@ import com.talkka.server.bus.dao.BusRouteEntity; import com.talkka.server.bus.dao.BusRouteStationEntity; +import com.talkka.server.common.enums.TimeSlot; import com.talkka.server.review.dao.BusReviewEntity; -import com.talkka.server.review.enums.TimeSlot; import com.talkka.server.user.dao.UserEntity; import jakarta.validation.constraints.Max; diff --git a/server/src/main/java/com/talkka/server/review/service/BusReviewService.java b/server/src/main/java/com/talkka/server/review/service/BusReviewService.java index d55aef81..84a80004 100644 --- a/server/src/main/java/com/talkka/server/review/service/BusReviewService.java +++ b/server/src/main/java/com/talkka/server/review/service/BusReviewService.java @@ -9,6 +9,7 @@ import com.talkka.server.bus.dao.BusRouteRepository; import com.talkka.server.bus.dao.BusRouteStationEntity; import com.talkka.server.bus.dao.BusRouteStationRepository; +import com.talkka.server.common.enums.TimeSlot; import com.talkka.server.common.exception.http.ForbiddenException; import com.talkka.server.common.exception.http.NotFoundException; import com.talkka.server.common.util.EnumCodeConverterUtils; @@ -16,7 +17,6 @@ import com.talkka.server.review.dao.BusReviewRepository; import com.talkka.server.review.dto.BusReviewReqDto; import com.talkka.server.review.dto.BusReviewRespDto; -import com.talkka.server.review.enums.TimeSlot; import com.talkka.server.user.dao.UserEntity; import com.talkka.server.user.dao.UserRepository; diff --git a/server/src/main/java/com/talkka/server/subway/dao/SubwayConfusionEntity.java b/server/src/main/java/com/talkka/server/subway/dao/SubwayConfusionEntity.java new file mode 100644 index 00000000..caa29038 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/dao/SubwayConfusionEntity.java @@ -0,0 +1,84 @@ +package com.talkka.server.subway.dao; + +import java.util.Objects; + +import com.talkka.server.common.enums.TimeSlot; +import com.talkka.server.common.util.TimeSlotConverter; +import com.talkka.server.subway.enums.DayType; +import com.talkka.server.subway.enums.Line; +import com.talkka.server.subway.enums.Updown; +import com.talkka.server.subway.util.DayTypeConverter; +import com.talkka.server.subway.util.LineConverter; +import com.talkka.server.subway.util.UpdownConverter; + +import jakarta.persistence.Column; +import jakarta.persistence.Convert; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.ToString; + +@Entity(name = "subway_confusion") +@Getter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class SubwayConfusionEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "subway_confusion_id") + private Long id; + + @ManyToOne + @JoinColumn(name = "station_id") + private SubwayStationEntity subwayStation; + + @Column(name = "day_type", nullable = false) + @Convert(converter = DayTypeConverter.class) + private DayType dayType; + + @Column(name = "line_cd", nullable = false) + @Convert(converter = LineConverter.class) + private Line line; + + @Column(name = "fr_code", nullable = false) + private String frCode; + + @Column(name = "station_name", nullable = false) + private String stationName; + + @Column(name = "updown", nullable = false) + @Convert(converter = UpdownConverter.class) + private Updown updown; + + @Column(name = "time_slot", nullable = false) + @Convert(converter = TimeSlotConverter.class) + private TimeSlot timeslot; + + @Column(name = "confusion") + private Double confusion; + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + SubwayConfusionEntity that = (SubwayConfusionEntity)o; + return Objects.equals(id, that.id); + } + + @Override + public int hashCode() { + return Objects.hashCode(id); + } +} diff --git a/server/src/main/java/com/talkka/server/subway/dao/SubwayConfusionRepository.java b/server/src/main/java/com/talkka/server/subway/dao/SubwayConfusionRepository.java new file mode 100644 index 00000000..8333c285 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/dao/SubwayConfusionRepository.java @@ -0,0 +1,8 @@ +package com.talkka.server.subway.dao; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface SubwayConfusionRepository extends JpaRepository { +} diff --git a/server/src/main/java/com/talkka/server/subway/dao/SubwayStationEntity.java b/server/src/main/java/com/talkka/server/subway/dao/SubwayStationEntity.java new file mode 100644 index 00000000..c46897c0 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/dao/SubwayStationEntity.java @@ -0,0 +1,71 @@ +package com.talkka.server.subway.dao; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import com.talkka.server.subway.enums.Line; +import com.talkka.server.subway.util.LineConverter; + +import jakarta.persistence.Column; +import jakarta.persistence.Convert; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.OneToMany; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.ToString; + +@Entity(name = "subway_station") +@Getter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class SubwayStationEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "station_id", nullable = false) + private Long id; + + @Column(name = "api_station_id") + private String apiStationId; + + @Column(name = "station_name", nullable = false) + private String stationName; + + @Column(name = "fr_code", nullable = false) + private String frCode; + + @Column(name = "line_code", nullable = false) + @Convert(converter = LineConverter.class) + private Line line; + + @OneToMany(mappedBy = "subwayStation") + @Builder.Default + private List timetables = new ArrayList<>(); + + @OneToMany(mappedBy = "subwayStation") + @Builder.Default + private List confusions = new ArrayList<>(); + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + SubwayStationEntity that = (SubwayStationEntity)o; + return Objects.equals(id, that.id); + } + + @Override + public int hashCode() { + return Objects.hashCode(id); + } +} diff --git a/server/src/main/java/com/talkka/server/subway/dao/SubwayStationRepository.java b/server/src/main/java/com/talkka/server/subway/dao/SubwayStationRepository.java new file mode 100644 index 00000000..5792b271 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/dao/SubwayStationRepository.java @@ -0,0 +1,11 @@ +package com.talkka.server.subway.dao; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface SubwayStationRepository extends JpaRepository { + List findByStationNameLikeOrderByStationNameAsc(String stationName); +} diff --git a/server/src/main/java/com/talkka/server/subway/dao/SubwayTimetableEntity.java b/server/src/main/java/com/talkka/server/subway/dao/SubwayTimetableEntity.java new file mode 100644 index 00000000..327a6187 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/dao/SubwayTimetableEntity.java @@ -0,0 +1,97 @@ +package com.talkka.server.subway.dao; + +import java.time.LocalTime; +import java.util.Objects; + +import com.talkka.server.subway.enums.DayType; +import com.talkka.server.subway.enums.Express; +import com.talkka.server.subway.enums.Line; +import com.talkka.server.subway.enums.Updown; +import com.talkka.server.subway.util.DayTypeConverter; +import com.talkka.server.subway.util.ExpressConverter; +import com.talkka.server.subway.util.LineConverter; +import com.talkka.server.subway.util.UpdownConverter; + +import jakarta.persistence.Column; +import jakarta.persistence.Convert; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.ToString; + +@Entity(name = "subway_timetable") +@Getter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class SubwayTimetableEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "subway_timetable_id") + private Long id; + + @ManyToOne + @JoinColumn(name = "station_id", nullable = false) + private SubwayStationEntity subwayStation; + + @Column(name = "line_code", nullable = false) + @Convert(converter = LineConverter.class) + private Line line; + + @Column(name = "fr_code", nullable = false) + private String frCode; + + @Column(name = "station_name", nullable = false) + private String stationName; + + @Column(name = "day_type", nullable = false) + @Convert(converter = DayTypeConverter.class) + private DayType dayType; + + @Column(name = "updown", nullable = false) + @Convert(converter = UpdownConverter.class) + private Updown updown; + + @Column(name = "is_express", nullable = false) + @Convert(converter = ExpressConverter.class) + private Express express; + + @Column(name = "train_code", nullable = false) + private String trainCode; + + @Column(name = "arrival_time", nullable = false) + private LocalTime arrivalTime; + + @Column(name = "depart_time", nullable = false) + private LocalTime departTime; + + @Column(name = "start_station_name", nullable = false) + private String startStationName; + + @Column(name = "end_station_name", nullable = false) + private String endStationName; + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + SubwayTimetableEntity that = (SubwayTimetableEntity)o; + return Objects.equals(id, that.id); + } + + @Override + public int hashCode() { + return Objects.hashCode(id); + } +} diff --git a/server/src/main/java/com/talkka/server/subway/dao/SubwayTimetableRepository.java b/server/src/main/java/com/talkka/server/subway/dao/SubwayTimetableRepository.java new file mode 100644 index 00000000..53f91b21 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/dao/SubwayTimetableRepository.java @@ -0,0 +1,8 @@ +package com.talkka.server.subway.dao; + +import org.hibernate.type.descriptor.converter.spi.JpaAttributeConverter; +import org.springframework.stereotype.Repository; + +@Repository +public interface SubwayTimetableRepository extends JpaAttributeConverter { +} diff --git a/server/src/main/java/com/talkka/server/subway/enums/DayType.java b/server/src/main/java/com/talkka/server/subway/enums/DayType.java new file mode 100644 index 00000000..d0654fad --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/enums/DayType.java @@ -0,0 +1,20 @@ +package com.talkka.server.subway.enums; + +import com.talkka.server.common.util.EnumCodeInterface; + +import lombok.Getter; + +@Getter +public enum DayType implements EnumCodeInterface { + DAY("평일", "DAY"), + SAT("토요일", "SAT"), + SUN("일요일", "SUN"); + + private String name; + private String code; + + DayType(String name, String code) { + this.name = name; + this.code = code; + } +} diff --git a/server/src/main/java/com/talkka/server/subway/enums/Express.java b/server/src/main/java/com/talkka/server/subway/enums/Express.java new file mode 100644 index 00000000..7b2bacdf --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/enums/Express.java @@ -0,0 +1,18 @@ +package com.talkka.server.subway.enums; + +import com.talkka.server.common.util.EnumCodeInterface; + +import lombok.Getter; + +@Getter +public enum Express implements EnumCodeInterface { + EXPRESS("급행", "0"), NORMAL("일반", "1"); + + private final String type; + private final String code; + + Express(String type, String code) { + this.type = type; + this.code = code; + } +} diff --git a/server/src/main/java/com/talkka/server/subway/enums/Line.java b/server/src/main/java/com/talkka/server/subway/enums/Line.java new file mode 100644 index 00000000..aecadf31 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/enums/Line.java @@ -0,0 +1,35 @@ +package com.talkka.server.subway.enums; + +import com.talkka.server.common.util.EnumCodeInterface; + +import lombok.Getter; + +@Getter +public enum Line implements EnumCodeInterface { + LINE_ONE("1호선", "1001"), + LINE_TWO("2호선", "1002"), + LINE_THREE("3호선", "1003"), + LINE_FOUR("4호선", "1004"), + LINE_FIVE("5호선", "1005"), + LINE_SIX("6호선", "1006"), + LINE_SEVEN("7호선", "1007"), + LINE_EIGHT("8호선", "1008"), + LINE_NINE("9호선", "1009"), + LINE_UI("우이신설선", "1092"), + LINE_GYEONGCHUN("경춘선", "1067"), + LINE_GYEONGUI_JUNGANG("경의중앙선", "1063"), + LINE_SUIN_BUNDANG("수인분당선", "1075"), + LINE_SINBUNDANG("신분당선", "1077"), + LINE_AIRPORT("공항철도", "1065"), + LINE_GYEONGGANG("경강선", "1081"), + LINE_SEOHAE("서해선", "1093"), + LINE_GTX_A("GTX-A", "1032"); + + private final String line; + private final String code; + + Line(String line, String code) { + this.line = line; + this.code = code; + } +} diff --git a/server/src/main/java/com/talkka/server/subway/enums/SubwayTimeSlot.java b/server/src/main/java/com/talkka/server/subway/enums/SubwayTimeSlot.java new file mode 100644 index 00000000..0b80a466 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/enums/SubwayTimeSlot.java @@ -0,0 +1,56 @@ +package com.talkka.server.subway.enums; + +import com.talkka.server.common.util.EnumCodeInterface; + +import lombok.Getter; + +@Getter +public enum SubwayTimeSlot implements EnumCodeInterface { + T_05_30("05:30", "0530"), + T_06_00("06:00", "0600"), + T_06_30("06:30", "0630"), + T_07_00("07:00", "0700"), + T_07_30("07:30", "0730"), + T_08_00("08:00", "0800"), + T_08_30("08:30", "0830"), + T_09_00("09:00", "0900"), + T_09_30("09:30", "0930"), + T_10_00("10:00", "1000"), + T_10_30("10:30", "1030"), + T_11_00("11:00", "1100"), + T_11_30("11:30", "1130"), + T_12_00("12:00", "1200"), + T_12_30("12:30", "1230"), + T_13_00("13:00", "1300"), + T_13_30("13:30", "1330"), + T_14_00("14:00", "1400"), + T_14_30("14:30", "1430"), + T_15_00("15:00", "1500"), + T_15_30("15:30", "1530"), + T_16_00("16:00", "1600"), + T_16_30("16:30", "1630"), + T_17_00("17:00", "1700"), + T_17_30("17:30", "1730"), + T_18_00("18:00", "1800"), + T_18_30("18:30", "1830"), + T_19_00("19:00", "1900"), + T_19_30("19:30", "1930"), + T_20_00("20:00", "2000"), + T_20_30("20:30", "2030"), + T_21_00("21:00", "2100"), + T_21_30("21:30", "2130"), + T_22_00("22:00", "2200"), + T_22_30("22:30", "2230"), + T_23_00("23:00", "2300"), + T_23_30("23:30", "2330"), + T_00_00("00:00", "0000"), + T_00_30("00:30", "0030"); + + private final String timeSlot; + private final String code; + + SubwayTimeSlot(String timeSlot, String code) { + this.timeSlot = timeSlot; + this.code = code; + } +} diff --git a/server/src/main/java/com/talkka/server/subway/enums/Updown.java b/server/src/main/java/com/talkka/server/subway/enums/Updown.java new file mode 100644 index 00000000..6b28171c --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/enums/Updown.java @@ -0,0 +1,18 @@ +package com.talkka.server.subway.enums; + +import com.talkka.server.common.util.EnumCodeInterface; + +import lombok.Getter; + +@Getter +public enum Updown implements EnumCodeInterface { + UP("상행(내선)", "0"), DOWN("하행(외선)", "1"); + + private final String direction; + private final String code; + + Updown(String direction, String code) { + this.direction = direction; + this.code = code; + } +} diff --git a/server/src/main/java/com/talkka/server/subway/util/DayTypeConverter.java b/server/src/main/java/com/talkka/server/subway/util/DayTypeConverter.java new file mode 100644 index 00000000..8b1f3096 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/util/DayTypeConverter.java @@ -0,0 +1,13 @@ +package com.talkka.server.subway.util; + +import com.talkka.server.common.util.EnumCodeConverter; +import com.talkka.server.subway.enums.DayType; + +import jakarta.persistence.Converter; + +@Converter(autoApply = true) +public class DayTypeConverter extends EnumCodeConverter { + public DayTypeConverter() { + super(DayType.class); + } +} diff --git a/server/src/main/java/com/talkka/server/subway/util/ExpressConverter.java b/server/src/main/java/com/talkka/server/subway/util/ExpressConverter.java new file mode 100644 index 00000000..458d591f --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/util/ExpressConverter.java @@ -0,0 +1,13 @@ +package com.talkka.server.subway.util; + +import com.talkka.server.common.util.EnumCodeConverter; +import com.talkka.server.subway.enums.Express; + +import jakarta.persistence.Converter; + +@Converter(autoApply = true) +public class ExpressConverter extends EnumCodeConverter { + public ExpressConverter() { + super(Express.class); + } +} diff --git a/server/src/main/java/com/talkka/server/subway/util/LineConverter.java b/server/src/main/java/com/talkka/server/subway/util/LineConverter.java new file mode 100644 index 00000000..e655a1d0 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/util/LineConverter.java @@ -0,0 +1,13 @@ +package com.talkka.server.subway.util; + +import com.talkka.server.common.util.EnumCodeConverter; +import com.talkka.server.subway.enums.Line; + +import jakarta.persistence.Converter; + +@Converter(autoApply = true) +public class LineConverter extends EnumCodeConverter { + public LineConverter() { + super(Line.class); + } +} diff --git a/server/src/main/java/com/talkka/server/subway/util/SubwayTimeSlotConverter.java b/server/src/main/java/com/talkka/server/subway/util/SubwayTimeSlotConverter.java new file mode 100644 index 00000000..a41412b1 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/util/SubwayTimeSlotConverter.java @@ -0,0 +1,13 @@ +package com.talkka.server.subway.util; + +import com.talkka.server.common.util.EnumCodeConverter; +import com.talkka.server.subway.enums.SubwayTimeSlot; + +import jakarta.persistence.Converter; + +@Converter(autoApply = true) +public class SubwayTimeSlotConverter extends EnumCodeConverter { + public SubwayTimeSlotConverter() { + super(SubwayTimeSlot.class); + } +} diff --git a/server/src/main/java/com/talkka/server/subway/util/UpdownConverter.java b/server/src/main/java/com/talkka/server/subway/util/UpdownConverter.java new file mode 100644 index 00000000..3aeccb87 --- /dev/null +++ b/server/src/main/java/com/talkka/server/subway/util/UpdownConverter.java @@ -0,0 +1,13 @@ +package com.talkka.server.subway.util; + +import com.talkka.server.common.util.EnumCodeConverter; +import com.talkka.server.subway.enums.Updown; + +import jakarta.persistence.Converter; + +@Converter(autoApply = true) +public class UpdownConverter extends EnumCodeConverter { + public UpdownConverter() { + super(Updown.class); + } +} diff --git a/server/src/test/java/com/talkka/server/review/service/BusReviewServiceTest.java b/server/src/test/java/com/talkka/server/review/service/BusReviewServiceTest.java index 1ffcc3aa..ce66357f 100644 --- a/server/src/test/java/com/talkka/server/review/service/BusReviewServiceTest.java +++ b/server/src/test/java/com/talkka/server/review/service/BusReviewServiceTest.java @@ -17,6 +17,7 @@ import com.talkka.server.bus.dao.BusRouteRepository; import com.talkka.server.bus.dao.BusRouteStationEntity; import com.talkka.server.bus.dao.BusRouteStationRepository; +import com.talkka.server.common.enums.TimeSlot; import com.talkka.server.common.exception.http.ForbiddenException; import com.talkka.server.common.exception.http.NotFoundException; import com.talkka.server.common.util.EnumCodeConverterUtils; @@ -24,7 +25,6 @@ import com.talkka.server.review.dao.BusReviewRepository; import com.talkka.server.review.dto.BusReviewReqDto; import com.talkka.server.review.dto.BusReviewRespDto; -import com.talkka.server.review.enums.TimeSlot; import com.talkka.server.user.dao.UserEntity; import com.talkka.server.user.dao.UserRepository; @@ -85,7 +85,8 @@ public class CreateBusReviewTest { UserEntity user = getUserFixture(1L); BusRouteStationEntity station = getBusRouteStationFixture(1L); BusRouteEntity route = getBusRouteFixture(236000050L); - TimeSlot timeSlot = EnumCodeConverterUtils.fromCode(TimeSlot.class, TimeSlot.T_00_00.getCode()); + TimeSlot timeSlot = EnumCodeConverterUtils.fromCode(TimeSlot.class, + TimeSlot.T_00_00.getCode()); BusReviewReqDto busReviewReqDto = BusReviewReqDto.builder() .busRouteStationId(1L) .routeId(236000050L)