Skip to content

Commit

Permalink
문의 게시판 개선 - 알림문구.
Browse files Browse the repository at this point in the history
  • Loading branch information
ac-saro committed Jun 30, 2024
1 parent 8335d38 commit fd2414d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/main/kotlin/anissia/domain/board/core/BoardTicker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ class BoardTicker (
val writeTopicRoles: String = "",

@Column(nullable = false, length = 100)
val writePostRoles: String = ""
val writePostRoles: String = "",

@Column(nullable = false, length = 1024)
val placeholder: String = ""
) {

}
Expand All @@ -30,9 +33,10 @@ CREATE TABLE `board_ticker` (
`name` varchar(20) NOT NULL,
`write_topic_roles` varchar(100) NOT NULL,
`write_post_roles` varchar(100) NOT NULL,
`placeholder` varchar(1024) NOT NULL,
PRIMARY KEY (`ticker`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO anissia.board_ticker (ticker, name, write_topic_roles, write_post_roles) VALUES ('notice', '공지사항', 'ROOT,TRANSLATOR', '');
INSERT INTO anissia.board_ticker (ticker, name, write_topic_roles, write_post_roles) VALUES ('inquiry', '문의 게시판', '', '');
INSERT INTO anissia.board_ticker (ticker, name, write_topic_roles, write_post_roles) VALUES ('notice', '공지사항', 'ROOT,TRANSLATOR', '', '');
INSERT INTO anissia.board_ticker (ticker, name, write_topic_roles, write_post_roles) VALUES ('inquiry', '문의 게시판', '', '', '');
*/
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ class BoardTickerItem (
val name: String = "",
val writeTopicRoles: List<String> = listOf(),
val writePostRoles: List<String> = listOf(),
val placeholder: String = "내용",
) {
constructor(boardTicker: BoardTicker): this(
ticker = boardTicker.ticker,
name = boardTicker.name,
writeTopicRoles = boardTicker.writeTopicRoles.run { split(",".toRegex()) } .filter { it != "" },
writePostRoles = boardTicker.writePostRoles.run { split(",".toRegex()) } .filter { it != "" }
writePostRoles = boardTicker.writePostRoles.run { split(",".toRegex()) } .filter { it != "" },
placeholder = boardTicker.placeholder
)
}

0 comments on commit fd2414d

Please sign in to comment.