-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ♻️ 엔티티 및 SQL 파일 수정 (#190) * ♻️ 열차 실시간 및 혼잡도 조회 수정 (#190) * ♻️ 전체 노선 및 역 정보 조회 수정 (#190) * ♻️ 피드백 반영 (#190) * ♻️ 지하철 노선 ID로 Key 변경 (#190) * ♻️ 클래스 네이밍 수정 및 SQL 구문 수정 (#190)
- Loading branch information
1 parent
75b118f
commit b96db9f
Showing
22 changed files
with
198 additions
and
84 deletions.
There are no files selected for viewing
Submodule ahachul_secret
updated
from a30733 to 71bd71
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...kend/team/ahachul_backend/api/common/application/port/out/SubwayLineStationPersistence.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package backend.team.ahachul_backend.api.common.application.port.out | ||
|
||
import backend.team.ahachul_backend.api.common.domain.entity.SubwayLineStationEntity | ||
import org.springframework.stereotype.Component | ||
|
||
@Component | ||
class SubwayLineStationPersistence( | ||
private val subwayLineStationRepository: SubwayLineStationRepository | ||
): SubwayLineStationReader { | ||
|
||
override fun findAll(): List<SubwayLineStationEntity> { | ||
return subwayLineStationRepository.findAll() | ||
} | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
...n/backend/team/ahachul_backend/api/common/application/port/out/SubwayLineStationReader.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package backend.team.ahachul_backend.api.common.application.port.out | ||
|
||
import backend.team.ahachul_backend.api.common.domain.entity.SubwayLineStationEntity | ||
|
||
interface SubwayLineStationReader { | ||
|
||
fun findAll(): List<SubwayLineStationEntity> | ||
} |
11 changes: 11 additions & 0 deletions
11
...ckend/team/ahachul_backend/api/common/application/port/out/SubwayLineStationRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package backend.team.ahachul_backend.api.common.application.port.out | ||
|
||
import backend.team.ahachul_backend.api.common.domain.entity.SubwayLineStationEntity | ||
import org.springframework.data.jpa.repository.EntityGraph | ||
import org.springframework.data.jpa.repository.JpaRepository | ||
|
||
interface SubwayLineStationRepository: JpaRepository<SubwayLineStationEntity, Long> { | ||
|
||
@EntityGraph(attributePaths = ["station", "subwayLine"]) | ||
override fun findAll(): List<SubwayLineStationEntity> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...n/kotlin/backend/team/ahachul_backend/api/common/domain/entity/SubwayLineStationEntity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package backend.team.ahachul_backend.api.common.domain.entity | ||
|
||
import backend.team.ahachul_backend.common.domain.entity.SubwayLineEntity | ||
import backend.team.ahachul_backend.common.entity.BaseEntity | ||
import jakarta.persistence.* | ||
|
||
@Entity | ||
class SubwayLineStationEntity( | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "subway_line_station_id") | ||
var id: Long = 0, | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "station_id") | ||
val station: StationEntity, | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "subway_line_id") | ||
val subwayLine: SubwayLineEntity, | ||
|
||
): BaseEntity() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 11 additions & 1 deletion
12
...src/main/kotlin/backend/team/ahachul_backend/api/train/adapter/in/dto/GetCongestionDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ class GetTrainRealTimesDto { | |
|
||
data class Request( | ||
val stationId: Long, | ||
val subwayLineId: Long | ||
) { | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...ackend/team/ahachul_backend/api/train/application/port/in/command/GetCongestionCommand.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package backend.team.ahachul_backend.api.train.application.port.`in`.command | ||
|
||
import backend.team.ahachul_backend.api.train.domain.model.UpDownType | ||
|
||
class GetCongestionCommand( | ||
val stationId: Long, | ||
val subwayLineId: Long, | ||
val upDownType: UpDownType | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.