-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feature: board file upload * refactor: 불필요한 import 제거 * fix: conflict 해결후에 빌드 실패 해결 * 고정 게시글 관련 이슈 해결 (#169) * fix: 고정 게시글 관련 이슈들을 해결 * refactor: 메서드로 분리 * fix: 게시글 파일 업로드 문제 해결 * 게시글 파일 조회 문제 해결 및 게시글 파일 삭제 api 추가 * remove: 사용하지 않는 dto 제거 * refactor: 게시글 수정시 로직 변경, 파일 업로드 변경 * refactor: 개행 추가 * refactor: 파일 끝 개행
- Loading branch information
Showing
14 changed files
with
193 additions
and
88 deletions.
There are no files selected for viewing
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
17 changes: 17 additions & 0 deletions
17
src/main/kotlin/team/themoment/gsmNetworking/domain/board/domain/File.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,17 @@ | ||
package team.themoment.gsmNetworking.domain.board.domain | ||
|
||
import team.themoment.gsmNetworking.common.domain.BaseIdTimestampEntity | ||
import javax.persistence.Entity | ||
import javax.persistence.JoinColumn | ||
import javax.persistence.ManyToOne | ||
import javax.persistence.Table | ||
|
||
@Entity | ||
@Table(name = "file") | ||
class File ( | ||
val fileUrl: String, | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "board_id") | ||
val board: Board, | ||
): BaseIdTimestampEntity() |
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
6 changes: 6 additions & 0 deletions
6
src/main/kotlin/team/themoment/gsmNetworking/domain/board/dto/FileInfoDto.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,6 @@ | ||
package team.themoment.gsmNetworking.domain.board.dto | ||
|
||
data class FileInfoDto ( | ||
val id: Long?, | ||
val fileUrls: String? | ||
) |
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: 12 additions & 0 deletions
12
src/main/kotlin/team/themoment/gsmNetworking/domain/board/repository/FileRepository.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,12 @@ | ||
package team.themoment.gsmNetworking.domain.board.repository | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository | ||
import team.themoment.gsmNetworking.domain.board.domain.Board | ||
import team.themoment.gsmNetworking.domain.board.domain.File | ||
|
||
interface FileRepository : JpaRepository<File, Long>{ | ||
|
||
fun findFilesByBoard(board: Board): List<File> | ||
|
||
fun deleteAllByBoard(board: Board) | ||
} |
Oops, something went wrong.