Skip to content

Commit 186e697

Browse files
Merge pull request #23 from EntryDSM/feature/22-modify-entity-column-type
Feature/22 modify column type
2 parents 829a16f + dc6bcd2 commit 186e697

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

src/main/kotlin/entry/dsm/gitauth/equusgithubauth/domain/notice/command/dto/request/CreateNoticeCommand.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ data class CreateNoticeCommand(
1010
@Size(min = 5, max = 100, message = "제목은 최소 5글자, 최대 100글자까지 가능합니다")
1111
val title: String,
1212
@Size(min = 2, max = 50, message = "키워드는 최소 2글자, 최대 50글자까지 가능합니다.")
13-
val keyWord: String,
13+
val keyWord: List<String>,
1414
val titleImageUrl: String,
1515
@NotBlank(message = "설명은 비워둘 수 없습니다")
16-
val description: String,
16+
val description: List<String>,
1717
@NotBlank(message = "모집 중요도는 비워둘 수 없습니다")
1818
val importanceOfRecruit: ImportanceOfRecruit,
1919
)

src/main/kotlin/entry/dsm/gitauth/equusgithubauth/domain/notice/command/dto/request/UpdateNoticeCommand.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ data class UpdateNoticeCommand(
99
@Size(min = 5, max = 100, message = "제목은 최소 5글자, 최대 100글자까지 가능합니다")
1010
val title: String,
1111
@Size(min = 2, max = 50, message = "키워드는 최소 2글자, 최대 50글자까지 가능합니다.")
12-
val keyWord: String,
12+
val keyWord: List<String>,
1313
val titleImageUrl: String,
1414
@NotBlank(message = "설명은 비워둘 수 없습니다")
15-
val description: String,
15+
val description: List<String>,
1616
@NotBlank(message = "모집 중요도는 비워둘 수 없습니다")
1717
val importanceOfRecruit: ImportanceOfRecruit,
1818
)

src/main/kotlin/entry/dsm/gitauth/equusgithubauth/domain/notice/entity/Notice.kt

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ package entry.dsm.gitauth.equusgithubauth.domain.notice.entity
33
import entry.dsm.gitauth.equusgithubauth.domain.notice.command.dto.request.UpdateNoticeCommand
44
import entry.dsm.gitauth.equusgithubauth.domain.notice.entity.enums.ImportanceOfRecruit
55
import entry.dsm.gitauth.equusgithubauth.domain.report.entity.Report
6+
import jakarta.persistence.CollectionTable
67
import jakarta.persistence.Column
8+
import jakarta.persistence.ElementCollection
79
import jakarta.persistence.Entity
810
import jakarta.persistence.EnumType
911
import jakarta.persistence.Enumerated
1012
import jakarta.persistence.FetchType
1113
import jakarta.persistence.GeneratedValue
1214
import jakarta.persistence.Id
15+
import jakarta.persistence.JoinColumn
1316
import jakarta.persistence.OneToMany
1417

1518
@Entity(name = "notice")
@@ -20,12 +23,16 @@ class Notice(
2023
val noticeId: Long,
2124
@Column(name = "title", nullable = false)
2225
var title: String,
26+
@ElementCollection
27+
@CollectionTable(name = "notice_keywords", joinColumns = [JoinColumn(name = "notice_id")])
2328
@Column(name = "key_word", nullable = false)
24-
var keyWord: String,
29+
var keyWord: List<String>,
2530
@Column(name = "title_image_url", nullable = false)
2631
var titleImageUrl: String,
32+
@ElementCollection
33+
@CollectionTable(name = "notice_descriptions", joinColumns = [JoinColumn(name = "notice_id")])
2734
@Column(name = "description", nullable = false)
28-
var description: String,
35+
var description: List<String>,
2936
@Enumerated(EnumType.STRING)
3037
@Column(name = "importance_of_recruit", nullable = false)
3138
var importanceOfRecruit: ImportanceOfRecruit,

src/main/kotlin/entry/dsm/gitauth/equusgithubauth/domain/notice/query/dto/response/NoticeQueryResponse.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import entry.dsm.gitauth.equusgithubauth.domain.notice.entity.enums.ImportanceOf
66
data class NoticeQueryResponse(
77
val noticeId: Long,
88
val title: String,
9-
val keyWord: String,
9+
val keyWord: List<String>,
1010
val titleImageUrl: String,
11-
val description: String,
11+
val description: List<String>,
1212
val importanceOfRecruit: ImportanceOfRecruit,
1313
) {
1414
companion object {

0 commit comments

Comments
 (0)