feat(content-comment): 콘텐츠 댓글/후원 시 언어 코드를 입력 받을 수 있는 기능 추가

This commit is contained in:
2025-11-25 15:54:01 +09:00
parent ae2c699748
commit 5ee5107364
6 changed files with 11 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ import javax.persistence.Table
data class AudioContentComment(
@Column(columnDefinition = "TEXT", nullable = false)
var comment: String,
var languageCode: String?,
@Column(nullable = true)
var donationCan: Int? = null,
val isSecret: Boolean = false,

View File

@@ -32,7 +32,8 @@ class AudioContentCommentController(
audioContentId = request.contentId,
parentId = request.parentId,
isSecret = request.isSecret,
member = member
member = member,
languageCode = request.languageCode
)
try {

View File

@@ -32,7 +32,8 @@ class AudioContentCommentService(
comment: String,
audioContentId: Long,
parentId: Long? = null,
isSecret: Boolean = false
isSecret: Boolean = false,
languageCode: String?
): Long {
val audioContent = audioContentRepository.findByIdOrNull(id = audioContentId)
?: throw SodaException("잘못된 콘텐츠 입니다.\n다시 시도해 주세요.")
@@ -50,7 +51,7 @@ class AudioContentCommentService(
throw SodaException("콘텐츠 구매 후 비밀댓글을 등록할 수 있습니다.")
}
val audioContentComment = AudioContentComment(comment = comment, isSecret = isSecret)
val audioContentComment = AudioContentComment(comment = comment, languageCode = languageCode, isSecret = isSecret)
audioContentComment.audioContent = audioContent
audioContentComment.member = member

View File

@@ -4,5 +4,6 @@ data class RegisterCommentRequest(
val comment: String,
val contentId: Long,
val parentId: Long?,
val isSecret: Boolean = false
val isSecret: Boolean = false,
val languageCode: String? = null
)

View File

@@ -4,5 +4,6 @@ data class AudioContentDonationRequest(
val contentId: Long,
val donationCan: Int,
val comment: String,
val container: String
val container: String,
val languageCode: String? = null
)

View File

@@ -34,6 +34,7 @@ class AudioContentDonationService(
val audioContentComment = AudioContentComment(
comment = request.comment,
languageCode = request.languageCode,
donationCan = request.donationCan
)
audioContentComment.audioContent = audioContent