diff --git a/src/main/kotlin/anissia/domain/board/core/BoardTicker.kt b/src/main/kotlin/anissia/domain/board/core/BoardTicker.kt index aafee44..6bbabd7 100644 --- a/src/main/kotlin/anissia/domain/board/core/BoardTicker.kt +++ b/src/main/kotlin/anissia/domain/board/core/BoardTicker.kt @@ -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 = "" ) { } @@ -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', '문의 게시판', '', '', ''); */ diff --git a/src/main/kotlin/anissia/domain/board/core/model/BoardTickerItem.kt b/src/main/kotlin/anissia/domain/board/core/model/BoardTickerItem.kt index 837af17..b3aa2c4 100644 --- a/src/main/kotlin/anissia/domain/board/core/model/BoardTickerItem.kt +++ b/src/main/kotlin/anissia/domain/board/core/model/BoardTickerItem.kt @@ -7,11 +7,13 @@ class BoardTickerItem ( val name: String = "", val writeTopicRoles: List = listOf(), val writePostRoles: List = 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 ) }