BoardMeta.cs 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. using Domain.Entities.Forum.Constants;
  2. using Domain.Entities.Forum.ValueObject;
  3. using System.ComponentModel;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. using Microsoft.EntityFrameworkCore;
  7. namespace Domain.Entities.Forum.Boards
  8. {
  9. [Table(nameof(BoardMeta))]
  10. [Index(nameof(BoardID), IsUnique = true)]
  11. public class BoardMeta
  12. {
  13. [Key]
  14. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  15. [DisplayName("PK")]
  16. [Comment("PK")]
  17. public int ID { get; set; }
  18. [DisplayName("게시판 ID")]
  19. [Comment("게시판 ID")]
  20. [Required(ErrorMessage = "{0}는 필수입니다.")]
  21. public int BoardID { get; set; }
  22. // 목록
  23. public BoardMetaList List { get; set; } = new BoardMetaList();
  24. // 열람
  25. public BoardMetaView View { get; set; } = new BoardMetaView();
  26. // 작성
  27. public BoardMetaWrite Write { get; set; } = new BoardMetaWrite();
  28. // 댓글
  29. public BoardMetaComment Comment { get; set; } = new BoardMetaComment();
  30. // 일반
  31. public BoardMetaGeneral General { get; set; } = new BoardMetaGeneral();
  32. // 권한
  33. public BoardMetaPermission Permission { get; set; } = new BoardMetaPermission();
  34. // 알람
  35. public BoardMetaNotify Notify { get; set; } = new BoardMetaNotify();
  36. // 알람 양식
  37. public BoardMetaNotifyTemplate NotifyTemplate { get; set; } = new BoardMetaNotifyTemplate();
  38. // 경험치
  39. public BoardMetaExp Exp { get; set; } = new BoardMetaExp();
  40. }
  41. /// <summary>
  42. /// 게시판 목록 설정
  43. /// </summary>
  44. [Owned]
  45. public class BoardMetaList
  46. {
  47. [DisplayName("상단 내용 출력 여부")]
  48. [Comment("상단 내용 출력 여부")]
  49. public bool ShowHeader { get; set; } = false;
  50. [DisplayName("상단 내용")]
  51. [Comment("상단 내용")]
  52. public string? HeaderContent { get; set; } = null;
  53. [DisplayName("하단 내용 출력 여부")]
  54. [Comment("하단 내용 출력 여부")]
  55. public bool ShowFooter { get; set; } = false;
  56. [DisplayName("하단 내용")]
  57. [Comment("하단 내용")]
  58. public string? FooterContent { get; set; } = null;
  59. [DisplayName("게시판 종류")]
  60. [Comment("게시판 종류")]
  61. public BoardLayout? Layout { get; set; }
  62. [DisplayName("기본 정렬")]
  63. [Comment("기본 정렬")]
  64. public BoardSort? Sort { get; set; }
  65. [DisplayName("목록 표시")]
  66. [Comment("목록 표시")]
  67. [Range(0, 100, ErrorMessage = "값은 0 ~ 100 사이를 입력합니다.")]
  68. public byte PerPage { get; set; } = 0;
  69. [DisplayName("글쓰기 버튼 보이기")]
  70. [Comment("글쓰기 버튼 보이기")]
  71. public bool AlwaysShowWriteButton { get; set; } = false;
  72. [DisplayName("하단 목록 보이기")]
  73. [Comment("하단 목록 보이기")]
  74. public bool ShowFooterListView { get; set; } = false;
  75. [DisplayName("NEW 사용 여부")]
  76. [Comment("NEW 사용 여부")]
  77. public bool IsNewIcon { get; set; } = false;
  78. [DisplayName("HOT 사용 여부")]
  79. [Comment("HOT 사용 여부")]
  80. public bool IsHotIcon { get; set; } = false;
  81. [DisplayName("공지사항 제외 여부")]
  82. [Comment("공지사항 제외 여부")]
  83. public bool ExceptNotice { get; set; } = false;
  84. [DisplayName("전체공지 제외 여부")]
  85. [Comment("전체공지 제외 여부")]
  86. public bool ExceptSpeaker { get; set; } = false;
  87. }
  88. /// <summary>
  89. /// 게시판 열람 설정
  90. /// </summary>
  91. [Owned]
  92. public class BoardMetaView
  93. {
  94. [DisplayName("즐겨찾기 기능")]
  95. [Comment("즐겨찾기 기능")]
  96. public bool AllowBookmark { get; set; } = false;
  97. [DisplayName("공감 기능")]
  98. [Comment("공감 기능")]
  99. public bool AllowLike { get; set; } = false;
  100. [DisplayName("비공감 기능")]
  101. [Comment("비공감 기능")]
  102. public bool AllowDislike { get; set; } = false;
  103. [DisplayName("본문 인쇄 기능")]
  104. [Comment("본문 인쇄 기능")]
  105. public bool AllowPrint { get; set; } = false;
  106. [DisplayName("SNS 보내기 기능")]
  107. [Comment("SNS 보내기 기능")]
  108. public bool AllowSnsShare { get; set; } = false;
  109. [DisplayName("이전글, 다음글 버튼")]
  110. [Comment("이전글, 다음글 버튼")]
  111. public bool AllowPrevNextBotton { get; set; } = false;
  112. [DisplayName("신고 기능")]
  113. [Comment("신고 기능")]
  114. public bool AllowBlame { get; set; } = false;
  115. [DisplayName("신고 시 숨김")]
  116. [Comment("신고 시 숨김")]
  117. public ushort BlameHideCount { get; set; } = 0;
  118. [DisplayName("URL Link 새창")]
  119. [Comment("URL Link 새창")]
  120. public bool AllowContentLinkTargetBlank { get; set; } = false;
  121. [DisplayName("주소 복사 버튼")]
  122. [Comment("주소 복사 버튼")]
  123. public bool AllowPostUrlCopy { get; set; } = false;
  124. [DisplayName("글 주소 QR 코드")]
  125. [Comment("글 주소 QR 코드")]
  126. public bool AllowPostUrlQrCode { get; set; } = false;
  127. [DisplayName("회원 사진 공개")]
  128. [Comment("회원 사진 공개")]
  129. public bool ShowMemberPhoto { get; set; } = false;
  130. [DisplayName("회원 아이콘 공개")]
  131. [Comment("회원 아이콘 공개")]
  132. public bool ShowMemberIcon { get; set; } = false;
  133. [DisplayName("회원 가입일 공개")]
  134. [Comment("회원 가입일 공개")]
  135. public bool ShowMemberRegDate { get; set; } = false;
  136. [DisplayName("오늘의 한마디 공개")]
  137. [Comment("오늘의 한마디 공개")]
  138. public bool ShowMemberSummary { get; set; } = false;
  139. }
  140. /// <summary>
  141. /// 게시판 작성 설정
  142. /// </summary>
  143. [Owned]
  144. public class BoardMetaWrite
  145. {
  146. [DisplayName("상단 내용 출력 여부")]
  147. [Comment("상단 내용 출력 여부")]
  148. public bool ShowHeader { get; set; } = false;
  149. [DisplayName("상단 내용")]
  150. [Comment("상단 내용")]
  151. public string? HeaderContent { get; set; } = null;
  152. [DisplayName("하단 내용 출력 여부")]
  153. [Comment("하단 내용 출력 여부")]
  154. public bool ShowFooter { get; set; } = false;
  155. [DisplayName("하단 내용")]
  156. [Comment("하단 내용")]
  157. public string? FooterContent { get; set; } = null;
  158. [DisplayName("기본 제목")]
  159. [Comment("기본 제목")]
  160. [StringLength(PostConstant.MaxAllowedSubjectLength, ErrorMessage = "{0}은(는) {1}자 이내로 입력해주세요.")]
  161. public string? DefaultSubject { get; set; } = null;
  162. [DisplayName("기본 내용")]
  163. [Comment("기본 내용")]
  164. [StringLength(PostConstant.MaxAllowedContentLength, ErrorMessage = "{0}은(는) {1}자 이내로 입력해주세요.")]
  165. public string? DefaultContent { get; set; } = null;
  166. [DisplayName("웹 에디터 사용")]
  167. [Comment("웹 에디터 사용")]
  168. public bool AllowEditor { get; set; } = false;
  169. [DisplayName("말머리 사용")]
  170. [Comment("말머리 사용")]
  171. public bool AllowPrefix { get; set; } = false;
  172. [DisplayName("말머리 필수 선택")]
  173. [Comment("말머리 필수 선택")]
  174. public bool RequiredPrefix { get; set; } = false;
  175. [DisplayName("비밀글 사용")]
  176. [Comment("비밀글 사용")]
  177. public bool AllowSecret { get; set; } = false;
  178. [DisplayName("태그 사용")]
  179. [Comment("태그 사용")]
  180. public bool AllowTag { get; set; } = false;
  181. [DisplayName("태그 개수 제한")]
  182. [Comment("태그 개수 제한")]
  183. [Range(0, PostConstant.MaxAllowedTags, ErrorMessage = "{0}은(는) {1} ~ {2} 사이여야 합니다.")]
  184. public byte TagLimit { get; set; } = PostConstant.MaxAllowedTags;
  185. [DisplayName("이미지 사용")]
  186. [Comment("이미지 사용")]
  187. public bool AllowImage { get; set; } = false;
  188. [DisplayName("이미지 개수 제한")]
  189. [Comment("이미지 개수 제한")]
  190. [Range(0, PostConstant.MaxAllowedImages, ErrorMessage = "{0}은(는) {1} ~ {2} 사이여야 합니다.")]
  191. public byte ImageUploadLimit { get; set; } = PostConstant.MaxAllowedImages;
  192. [DisplayName("이미지 용량 제한(KB)")]
  193. [Comment("이미지 용량 제한(KB)")]
  194. [Range(0, PostConstant.MaxAllowedImageSize, ErrorMessage = "{0}은(는) {1} ~ {2} 사이여야 합니다.")]
  195. public int ImageUploadMaxSize { get; set; } = PostConstant.MaxAllowedImageSize;
  196. [DisplayName("미디어 사용")]
  197. [Comment("미디어 사용")]
  198. public bool AllowMedia { get; set; } = false;
  199. [DisplayName("미디어 개수 제한")]
  200. [Comment("미디어 개수 제한")]
  201. [Range(0, PostConstant.MaxAllowedMedias, ErrorMessage = "{0}은(는) {1} ~ {2} 사이여야 합니다.")]
  202. public byte MediaUploadLimit { get; set; } = PostConstant.MaxAllowedMedias;
  203. [DisplayName("파일 사용")]
  204. [Comment("파일 사용")]
  205. public bool AllowFile { get; set; } = false;
  206. [DisplayName("파일 개수 제한")]
  207. [Comment("파일 개수 제한")]
  208. [Range(0, PostConstant.MaxAllowedFiles, ErrorMessage = "{0}은(는) {1} ~ {2} 사이여야 합니다.")]
  209. public byte FileUploadLimit { get; set; } = PostConstant.MaxAllowedFiles;
  210. [DisplayName("파일 용량 제한(KB)")]
  211. [Comment("파일 용량 제한(KB)")]
  212. [Range(0, PostConstant.MaxAllowedFileSize, ErrorMessage = "{0}은(는) {1} ~ {2} 사이여야 합니다.")]
  213. public int FileUploadMaxSize { get; set; } = PostConstant.MaxAllowedFileSize;
  214. [DisplayName("파일 허용 확장자")]
  215. [Comment("파일 허용 확장자")]
  216. [StringLength(200, ErrorMessage = "{0}은(는) {1}자 이내로 입력해주세요.")]
  217. public string? FileUploadExtension { get; set; } = null;
  218. }
  219. /// <summary>
  220. /// 게시판 일반 설정
  221. /// </summary>
  222. [Owned]
  223. public class BoardMetaGeneral
  224. {
  225. [DisplayName("게시글 삭제 금지 기간")]
  226. [Comment("게시글 삭제 금지 기간")]
  227. [Range(0, 365, ErrorMessage = "{0}은(는) 0 ~ 365 사이를 입력합니다.")]
  228. public ushort DeleteProtectionDays { get; set; } = 0;
  229. [DisplayName("게시글 수정 금지 기간")]
  230. [Comment("게시글 수정 금지 기간")]
  231. [Range(0, 365, ErrorMessage = "{0}은(는) 0 ~ 365 사이를 입력합니다.")]
  232. public ushort UpdateProtectionDays { get; set; } = 0;
  233. [DisplayName("게시글 보호 기능 (삭제 시)")]
  234. [Comment("게시글 보호 기능 (삭제 시)")]
  235. public bool AllowDeleteProtection { get; set; } = false;
  236. [DisplayName("게시글 보호 기능 (수정 시)")]
  237. [Comment("게시글 보호 기능 (수정 시)")]
  238. public bool AllowUpdateProtection { get; set; } = false;
  239. [DisplayName("다운로드 기록")]
  240. [Comment("다운로드 기록")]
  241. public bool EnableFileDownLog { get; set; } = false;
  242. [DisplayName("링크 클릭 기록")]
  243. [Comment("링크 클릭 기록")]
  244. public bool EnableLinkClickLog { get; set; } = false;
  245. [DisplayName("게시글 변경 기록")]
  246. [Comment("게시글 변경 기록")]
  247. public bool EnablePostUpdateLog { get; set; } = false;
  248. }
  249. /// <summary>
  250. /// 게시판 권한 설정
  251. /// </summary>
  252. [Owned]
  253. public class BoardMetaPermission
  254. {
  255. [DisplayName("게시판 접근")]
  256. [Comment("게시판 접근")]
  257. public short BoardAccess { get; set; } = (short)BoardPermission.Guest;
  258. [DisplayName("글 열람")]
  259. [Comment("글 열람")]
  260. public short PostView { get; set; } = (short)BoardPermission.Guest;
  261. [DisplayName("글 작성")]
  262. [Comment("글 작성")]
  263. public short PostWrite { get; set; } = (short)BoardPermission.Guest;
  264. [DisplayName("댓글 목록")]
  265. [Comment("댓글 목록")]
  266. public short CommentView { get; set; } = (short)BoardPermission.Guest;
  267. [DisplayName("댓글 작성")]
  268. [Comment("댓글 작성")]
  269. public short CommentWrite { get; set; } = (short)BoardPermission.Guest;
  270. [DisplayName("답글 작성")]
  271. [Comment("답글 작성")]
  272. public short ReplyWrite { get; set; } = (short)BoardPermission.Guest;
  273. [DisplayName("파일 업로드")]
  274. [Comment("파일 업로드")]
  275. public short FileUpload { get; set; } = (short)BoardPermission.Guest;
  276. [DisplayName("파일 다운로드")]
  277. [Comment("파일 다운로드")]
  278. public short FileDownload { get; set; } = (short)BoardPermission.Guest;
  279. }
  280. /// <summary>
  281. /// 게시판 알림 설정
  282. /// </summary>
  283. [Owned]
  284. public class BoardMetaNotify
  285. {
  286. [DisplayName("게시글 작성 시")]
  287. [Comment("게시글 작성 시")]
  288. public byte? PostWriteNotify { get; set; } = null;
  289. [DisplayName("댓글 작성 시")]
  290. [Comment("댓글 작성 시")]
  291. public byte? CommentWriteNotify { get; set; } = null;
  292. [DisplayName("답글 작성 시")]
  293. [Comment("답글 작성 시")]
  294. public byte? ReplyWriteNotify { get; set; } = null;
  295. public BoardNotify PostWriteNotifyEnum => (BoardNotify)(PostWriteNotify ?? 0);
  296. public BoardNotify CommentWriteNotifyEnum => (BoardNotify)(CommentWriteNotify ?? 0);
  297. public BoardNotify ReplyWriteNotifyEnum => (BoardNotify)(ReplyWriteNotify ?? 0);
  298. }
  299. /// <summary>
  300. /// 게시판 경험치 설정
  301. /// </summary>
  302. [Owned]
  303. public class BoardMetaExp
  304. {
  305. [DisplayName("경험치 기능")]
  306. [Comment("경험치 기능")]
  307. public bool EnableExp { get; set; } = false;
  308. [DisplayName("경험치 안내")]
  309. [Comment("경험치 안내")]
  310. public bool ShowExpGuide { get; set; } = false;
  311. /*
  312. * 경험치 지급량 조절
  313. */
  314. [DisplayName("게시글 작성")]
  315. [Comment("게시글 작성")]
  316. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  317. public ushort PostWriteExp { get; set; } = 0;
  318. [DisplayName("댓글 작성")]
  319. [Comment("댓글 작성")]
  320. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  321. public ushort CommentWriteExp { get; set; } = 0;
  322. [DisplayName("파일 업로드")]
  323. [Comment("파일 업로드")]
  324. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  325. public ushort FileUploadExp { get; set; } = 0;
  326. [DisplayName("파일 다운로드")]
  327. [Comment("파일 다운로드")]
  328. [Range(-10000, 10000, ErrorMessage = "값은 -10,000 ~ 10,000 사이를 입력합니다.")]
  329. public short FileDownloadExp { get; set; } = 0;
  330. [DisplayName("게시글 읽기")]
  331. [Comment("게시글 읽기")]
  332. [Range(-10000, 10000, ErrorMessage = "값은 -10,000 ~ 10,000 사이를 입력합니다.")]
  333. public short OtherPostReadExp { get; set; } = 0;
  334. [DisplayName("게시글 좋아요")]
  335. [Comment("게시글 좋아요")]
  336. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  337. public ushort OtherPostLikeExp { get; set; } = 0;
  338. [DisplayName("게시글 싫어요")]
  339. [Comment("게시글 싫어요")]
  340. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  341. public ushort OtherPostDisLikeExp { get; set; } = 0;
  342. [DisplayName("댓글 좋아요")]
  343. [Comment("댓글 좋아요")]
  344. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  345. public ushort OtherCommentLikeExp { get; set; } = 0;
  346. [DisplayName("댓글 싫어요")]
  347. [Comment("댓글 싫어요")]
  348. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  349. public ushort OtherCommentDisLikeExp { get; set; } = 0;
  350. [DisplayName("내 게시글 읽힘")]
  351. [Comment("내 게시글 읽힘")]
  352. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  353. public ushort OwnPostReadExp { get; set; } = 0;
  354. [DisplayName("내 게시글 좋아요")]
  355. [Comment("내 게시글 좋아요")]
  356. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  357. public ushort OwnPostLikeExp { get; set; } = 0;
  358. [DisplayName("내 게시글 싫어요")]
  359. [Comment("내 게시글 싫어요")]
  360. [Range(-10000, 10000, ErrorMessage = "값은 -10,000 ~ 10,000 사이를 입력합니다.")]
  361. public short OwnPostDisLikeExp { get; set; } = 0;
  362. [DisplayName("내 댓글 좋아요")]
  363. [Comment("내 댓글 좋아요")]
  364. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  365. public ushort OwnCommentLikeExp { get; set; } = 0;
  366. [DisplayName("내 댓글 싫어요")]
  367. [Comment("내 댓글 싫어요")]
  368. [Range(-10000, 10000, ErrorMessage = "값은 -10,000 ~ 10,000 사이를 입력합니다.")]
  369. public short OwnCommentDisLikeExp { get; set; } = 0;
  370. /*
  371. * 경험치 회수량 조절 (항상 음수 계산)
  372. */
  373. [DisplayName("게시글 작성 취소")]
  374. [Comment("게시글 작성 취소")]
  375. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  376. public ushort PostWriteUndoExp { get; set; } = 0;
  377. [DisplayName("댓글 작성 취소")]
  378. [Comment("댓글 작성 취소")]
  379. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  380. public ushort CommentWriteUndoExp { get; set; } = 0;
  381. [DisplayName("파일 업로드 취소")]
  382. [Comment("파일 업로드 취소")]
  383. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  384. public ushort FileUploadUndoExp { get; set; } = 0;
  385. [DisplayName("게시글 읽기 취소")]
  386. [Comment("게시글 읽기 취소")]
  387. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  388. public ushort OtherPostReadUndoExp { get; set; } = 0;
  389. [DisplayName("게시글 좋아요 취소")]
  390. [Comment("게시글 좋아요 취소")]
  391. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  392. public ushort OtherPostLikeUndoExp { get; set; } = 0;
  393. [DisplayName("게시글 싫어요 취소")]
  394. [Comment("게시글 싫어요 취소")]
  395. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  396. public ushort OtherPostDisLikeUndoExp { get; set; } = 0;
  397. [DisplayName("댓글 좋아요 취소")]
  398. [Comment("댓글 좋아요 취소")]
  399. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  400. public ushort OtherCommentLikeUndoExp { get; set; } = 0;
  401. [DisplayName("댓글 싫어요 취소")]
  402. [Comment("댓글 싫어요 취소")]
  403. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  404. public ushort OtherCommentDisLikeUndoExp { get; set; } = 0;
  405. [DisplayName("내 게시글 읽힘 취소")]
  406. [Comment("내 게시글 읽힘 취소")]
  407. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  408. public ushort OwnPostReadUndoExp { get; set; } = 0;
  409. [DisplayName("내 게시글 좋아요 취소")]
  410. [Comment("내 게시글 좋아요 취소")]
  411. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  412. public ushort OwnPostLikeUndoExp { get; set; } = 0;
  413. [DisplayName("내 게시글 싫어요 취소")]
  414. [Comment("내 게시글 싫어요 취소")]
  415. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  416. public ushort OwnPostDisLikeUndoExp { get; set; } = 0;
  417. [DisplayName("내 댓글 좋아요 취소")]
  418. [Comment("내 댓글 좋아요 취소")]
  419. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  420. public ushort OwnCommentLikeUndoExp { get; set; } = 0;
  421. [DisplayName("내 댓글 싫어요 취소")]
  422. [Comment("내 댓글 싫어요 취소")]
  423. [Range(0, 10000, ErrorMessage = "값은 0 ~ 10,000 사이를 입력합니다.")]
  424. public ushort OwnCommentDisLikeUndoExp { get; set; } = 0;
  425. /*
  426. * 경험치 지급 기한
  427. */
  428. [DisplayName("게시글 작성 기한")]
  429. [Comment("게시글 작성 기한")]
  430. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  431. public ushort PostWriteExpWithinDays { get; set; } = 0;
  432. [DisplayName("댓글 작성 기한")]
  433. [Comment("댓글 작성 기한")]
  434. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  435. public ushort CommentWriteExpWithinDays { get; set; } = 0;
  436. [DisplayName("파일 업로드 기한")]
  437. [Comment("파일 업로드 기한")]
  438. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  439. public ushort FileUploadExpWithinDays { get; set; } = 0;
  440. [DisplayName("게시글 읽기 기한")]
  441. [Comment("게시글 읽기 기한")]
  442. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  443. public ushort OtherPostReadExpWithinDays { get; set; } = 0;
  444. [DisplayName("게시글 좋아요 기한")]
  445. [Comment("게시글 좋아요 기한")]
  446. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  447. public ushort OtherPostLikeExpWithinDays { get; set; } = 0;
  448. [DisplayName("게시글 싫어요 기한")]
  449. [Comment("게시글 싫어요 기한")]
  450. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  451. public ushort OtherPostDisLikeExpWithinDays { get; set; } = 0;
  452. [DisplayName("댓글 좋아요 기한")]
  453. [Comment("댓글 좋아요 기한")]
  454. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  455. public ushort OtherCommentLikeExpWithinDays { get; set; } = 0;
  456. [DisplayName("댓글 싫어요 기한")]
  457. [Comment("댓글 싫어요 기한")]
  458. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  459. public ushort OtherCommentDisLikeExpWithinDays { get; set; } = 0;
  460. [DisplayName("내 게시글 읽힘 기한")]
  461. [Comment("내 게시글 읽힘 기한")]
  462. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  463. public ushort OwnPostReadExpWithinDays { get; set; } = 0;
  464. [DisplayName("내 게시글 좋아요 기한")]
  465. [Comment("내 게시글 좋아요 기한")]
  466. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  467. public ushort OwnPostLikeExpWithinDays { get; set; } = 0;
  468. [DisplayName("내 게시글 싫어요 기한")]
  469. [Comment("내 게시글 싫어요 기한")]
  470. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  471. public ushort OwnPostDisLikeExpWithinDays { get; set; } = 0;
  472. [DisplayName("내 댓글 좋아요 기한")]
  473. [Comment("내 댓글 좋아요 기한")]
  474. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  475. public ushort OwnCommentLikeExpWithinDays { get; set; } = 0;
  476. [DisplayName("내 댓글 싫어요 기한")]
  477. [Comment("내 댓글 싫어요 기한")]
  478. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  479. public ushort OwnCommentDisLikeExpWithinDays { get; set; } = 0;
  480. }
  481. /// <summary>
  482. /// 게시판 알림 양식
  483. /// </summary>
  484. [Owned]
  485. public class BoardMetaNotifyTemplate
  486. {
  487. [DisplayName("이메일 제목 - 게시글 작성 시")]
  488. [Comment("이메일 제목 - 게시글 작성 시")]
  489. public string? PostWriteEmailNotifySubject { get; set; } = null;
  490. [DisplayName("이메일 내용 - 게시글 작성 시")]
  491. [Comment("이메일 내용 - 게시글 작성 시")]
  492. public string? PostWriteEmailNotifyContent { get; set; } = null;
  493. [DisplayName("이메일 제목 - 댓글 작성 시")]
  494. [Comment("이메일 제목 - 댓글 작성 시")]
  495. public string? CommentWriteEmailNotifySubject { get; set; } = null;
  496. [DisplayName("이메일 내용 - 댓글 작성 시")]
  497. [Comment("이메일 내용 - 댓글 작성 시")]
  498. public string? CommentWriteEmailNotifyContent { get; set; } = null;
  499. [DisplayName("이메일 제목 - 답글 작성 시")]
  500. [Comment("이메일 제목 - 답글 작성 시")]
  501. public string? ReplyWriteEmailNotifySubject { get; set; } = null;
  502. [DisplayName("이메일 내용 - 답글 작성 시")]
  503. [Comment("이메일 내용 - 답글 작성 시")]
  504. public string? ReplyWriteEmailNotifyContent { get; set; } = null;
  505. }
  506. /// <summary>
  507. /// 게시판 댓글 설정
  508. /// </summary>
  509. [Owned]
  510. public class BoardMetaComment
  511. {
  512. [DisplayName("댓글 사용")]
  513. [Comment("댓글 사용")]
  514. public bool EnableComment { get; set; } = false;
  515. [DisplayName("목록 표시")]
  516. [Comment("목록 표시")]
  517. [Range(0, 100, ErrorMessage = "값은 0 ~ 100 사이를 입력합니다.")]
  518. public ushort PerPage { get; set; } = 0;
  519. [DisplayName("댓글 공감 사용")]
  520. [Comment("댓글 공감 사용")]
  521. public bool AllowLike { get; set; } = false;
  522. [DisplayName("댓글 비공감 사용")]
  523. [Comment("댓글 비공감 사용")]
  524. public bool AllowDisLike { get; set; } = false;
  525. [DisplayName("회원 사진 공개")]
  526. [Comment("회원 사진 공개")]
  527. public bool ShowMemberPhoto { get; set; } = false;
  528. [DisplayName("회원 아이콘 공개")]
  529. [Comment("회원 아이콘 공개")]
  530. public bool ShowMemberIcon { get; set; } = false;
  531. [DisplayName("안내 문구")]
  532. [Comment("안내 문구")]
  533. [StringLength(1000)]
  534. public string? ContentPlaceholder { get; set; } = null;
  535. [DisplayName("최소 입력 글자")]
  536. [Comment("최소 입력 글자")]
  537. public ushort MinContentLength { get; set; } = 0;
  538. [DisplayName("최대 입력 글자")]
  539. [Comment("최대 입력 글자")]
  540. public ushort MaxContentLength { get; set; } = 0;
  541. [DisplayName("웹 에디터 사용")]
  542. [Comment("웹 에디터 사용")]
  543. public bool EnableEditor { get; set; } = false;
  544. [DisplayName("비밀글 사용")]
  545. [Comment("비밀글 사용")]
  546. public bool AllowSecret { get; set; } = false;
  547. [DisplayName("댓글 신고 시 숨김")]
  548. [Comment("댓글 신고 시 숨김")]
  549. public ushort BlameHideCount { get; set; } = 0;
  550. [DisplayName("댓글 삭제 금지 기간")]
  551. [Comment("댓글 삭제 금지 기간")]
  552. public ushort DeleteProtectionDays { get; set; } = 0;
  553. [DisplayName("댓글 수정 금지 기간")]
  554. [Comment("댓글 수정 금지 기간")]
  555. public ushort UpdateProtectionDays { get; set; } = 0;
  556. [DisplayName("댓글 보호 기능 (삭제 시)")]
  557. [Comment("댓글 보호 기능 (삭제 시)")]
  558. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  559. public bool AllowDeleteProtection { get; set; } = false;
  560. [DisplayName("댓글 보호 기능 (수정 시)")]
  561. [Comment("댓글 보호 기능 (수정 시)")]
  562. [Range(0, 365, ErrorMessage = "값은 0 ~ 365 사이를 입력합니다.")]
  563. public bool AllowUpdateProtection { get; set; } = false;
  564. [DisplayName("댓글 변경 기록")]
  565. [Comment("댓글 변경 기록")]
  566. public bool EnableCommentUpdateLog { get; set; } = false;
  567. }
  568. }