| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- using Microsoft.EntityFrameworkCore;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations.Schema;
- namespace bitforum.Models.BBS
- {
- [Table("PostMeta")]
- public class PostMeta
- {
- [ForeignKey("BoardID")]
- public Board Board { get; set; } = null!;
- [Key]
- [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- [DisplayName("PK")]
- [Comment("PK")]
- public int ID { get; set; }
- [Required]
- [DisplayName("게시판 ID")]
- [Comment("게시판 ID")]
- public int BoardID { get; set; }
- public PostViewMeta List { get; set; } = new PostViewMeta();
- public PostWriteMeta Write { get; set; } = new PostWriteMeta();
- public PostGeneralMeta General { get; set; } = new PostGeneralMeta();
- }
- [Owned]
- public class PostViewMeta
- {
- [DisplayName("즐겨찾기 기능")]
- [Comment("즐겨찾기 기능")]
- public bool AllowBookmark { get; set; } = false;
- [DisplayName("공감 기능")]
- [Comment("공감 기능")]
- public bool AllowLike { get; set; } = false;
- [DisplayName("비공감 기능")]
- [Comment("비공감 기능")]
- public bool AllowDislike { get; set; } = false;
- [DisplayName("본문 인쇄 기능")]
- [Comment("본문 인쇄 기능")]
- public bool AllowPrint { get; set; } = false;
- [DisplayName("SNS 보내기 기능")]
- [Comment("SNS 보내기 기능")]
- public bool AllowSnsShare { get; set; } = false;
- [DisplayName("이전글, 다음글 버튼")]
- [Comment("이전글, 다음글 버튼")]
- public bool AllowPrevNextBotton { get; set; } = false;
- [DisplayName("신고 기능")]
- [Comment("신고 기능")]
- public bool AllowBlame { get; set; } = false;
- [DisplayName("신고 시 숨김")]
- [Comment("신고 시 숨김")]
- public ushort BlameHideCount { get; set; } = 0;
- [DisplayName("전체공지 제외 여부")]
- [Comment("전체공지 제외 여부")]
- public bool AllowContentLinkTargetBlank { get; set; } = false;
- [DisplayName("주소 복사 버튼")]
- [Comment("주소 복사 버튼")]
- public bool AllowPostUrlCopy { get; set; } = false;
- [DisplayName("글 주소 QR 코드")]
- [Comment("글 주소 QR 코드")]
- public bool AllowPostUrlQrCode { get; set; } = false;
- [DisplayName("회원 사진 공개")]
- [Comment("회원 사진 공개")]
- public bool ShowMemberPhoto { get; set; } = false;
- [DisplayName("회원 아이콘 공개")]
- [Comment("회원 아이콘 공개")]
- public bool ShowMemberIcon { get; set; } = false;
- [DisplayName("회원 가입일 공개")]
- [Comment("회원 가입일 공개")]
- public bool ShowMemberRegDate { get; set; } = false;
- }
- [Owned]
- public class PostWriteMeta
- {
- [DisplayName("작성란 상단 내용")]
- [Comment("작성란 상단 내용")]
- [StringLength(4000)]
- public string? HeaderContent { get; set; } = null;
- [DisplayName("작성란 하단 내용")]
- [Comment("작성란 하단 내용")]
- [StringLength(4000)]
- public string? FooterContent { get; set; } = null;
- [DisplayName("기본 제목")]
- [Comment("기본 제목")]
- [StringLength(255)]
- public string? DefaultSubject { get; set; } = null;
- [DisplayName("기본 내용")]
- [Comment("기본 내용")]
- [StringLength(4000)]
- public string? DefaultContent { get; set; } = null;
- [DisplayName("웹 에디터 사용")]
- [Comment("웹 에디터 사용")]
- public bool AllowEditor { get; set; } = false;
- [DisplayName("외부 이미지 수집")]
- [Comment("외부 이미지 수집")]
- public bool AllowSaveExternalImage { get; set; } = false;
- [DisplayName("비밀글 사용")]
- [Comment("비밀글 사용")]
- public bool AllowSecret { get; set; } = false;
- [DisplayName("Tag 사용")]
- [Comment("Tag 사용")]
- public bool AllowTag { get; set; } = false;
- [DisplayName("파일 사용")]
- [Comment("파일 사용")]
- public bool EnableUploadFile { get; set; } = false;
- [DisplayName("파일 개수 제한")]
- [Comment("파일 개수 제한")]
- public byte UploadFilesLimit { get; set; } = 0;
- [DisplayName("파일 용량 제한")]
- [Comment("파일 용량 제한")]
- public ushort UploadFileMaxSize { get; set; } = 0;
- [DisplayName("파일 허용 확장자")]
- [Comment("파일 허용 확장자")]
- [StringLength(200)]
- public string? UploadFileExtension { get; set; } = null;
- }
- [Owned]
- public class PostGeneralMeta
- {
- [DisplayName("게시글 삭제 금지 기간")]
- [Comment("게시글 삭제 금지 기간")]
- public ushort DeleteProtectionDays { get; set; } = 0;
- [DisplayName("게시글 수정/삭제 금지 기간")]
- [Comment("게시글 수정/삭제 금지 기간")]
- public ushort UpdateProtectionDays { get; set; } = 0;
- [DisplayName("게시글 보호 기능 (삭제 시)")]
- [Comment("게시글 보호 기능 (삭제 시)")]
- public bool AllowDeleteProtection { get; set; } = false;
- [DisplayName("게시글 보호 기능 (수정 시)")]
- [Comment("게시글 보호 기능 (수정 시)")]
- public bool AllowUpdateProtection { get; set; } = false;
- [DisplayName("다운로드 기록")]
- [Comment("다운로드 기록")]
- public bool EnableFileDownLog { get; set; } = false;
- [DisplayName("게시글 변경 기록")]
- [Comment("게시글 변경 기록")]
- public bool EnablePostUpdateLog { get; set; } = false;
- }
- }
|