using System; using System.Collections.Generic; using System.Text; namespace NP.Model { /// /// 게시글 /// [Serializable] public class Board : BoardMaster { /// /// 글번호 /// public Int64 bno {get;set;} public Int64? pbno { get; set; } /// /// 말머리 boardmasteropening.opno /// public int? opno { get; set; } public String opname { get; set; } public String opname2 { get { return string.IsNullOrEmpty(opname) ? "" : string.Format("[{0}]", opname); } } /// /// 200 제목 /// public String subject {get;set;} public String psubject { get; set; } public String subject2 { get; set; } /// /// 내용 /// public String contents {get;set;} public String contentstext { get { return System.Text.RegularExpressions.Regex.Replace(contents, "<.*?>", String.Empty); } } /// /// fkboardfilegroup 첨부파일번호 FileGroup.FGNo /// public Int64? fgno {get;set;} /// /// fkboardfilegroup2 썸네일첨부파일번호 FileGroup.FGNo /// public Int64? fgnothumb { get; set; } /// /// 강좌번호 cm.cmno /// public int? cmno { get; set; } public String cname { get; set; } public int tyear { get; set; } public int tseq { get; set; } public int classno { get; set; } /// /// 읽은 수 본인은 제외 /// public int rcount {get;set;} /// /// 댓글 수 본인은 제외 /// public int rpcount { get; set; } public String rpcountname { get { return rpcount > 0 ? string.Format("({0})", rpcount) : ""; } } /// /// 상단고정여부 0: 일반, 1: 상단고정글 /// public int istop { get; set; } /// /// 비밀글여부 /// public int issecr { get; set; } public int usertype { get; set; } public int pcno { get; set; } } /// /// 게시판관리 /// [Serializable] public class BoardMaster : BaseModel { /// /// 게시판번호 /// public int bmno {get;set;} /// /// 게시판 코드 (unique) /// public String bmcode { get; set; } /// /// 게시판위치 0:홈페이지,1:강의실 /// public int bmposition {get;set;} public String bmpositionname { get { return bmposition == 0 ? "홈페이지" : bmposition == 1 ? "강의실" : "-"; } } /// /// 50 게시판이름 /// public String bmname {get;set;} /// /// 1000 게시판설명 /// public String bmdesc {get;set;} /// /// 게시판유형 0:공지형,1:공개형,2:Q&A형 /// public int bmtype {get;set;} public String bmtypename { get { return bmtype == 0 ? "공지형" : bmtype == 1 ? "공개형" : bmtype == 2 ? "Q&A형" : "-"; } } /// /// 출력방식 0:리스트형,1:FAQ형 /// public int disptype {get;set;} public String disptypename { get { return disptype == 0 ? "리스트형" : disptype == 1 ? "FAQ형" : "-"; } } /// /// 말머리사용여부 0:사용안함,1:사용함 /// public int isuseopening {get;set;} /// /// 댓글사용여부 /// public int isreply {get;set;} /// /// 공개여부 /// public int isopen { get; set; } /// /// 기본게시판여부(0: 아님, 1: 기본(시스템 최초 자동등록 게시판(공지사항, Q&A, 자료실) /// public int isdefault { get; set; } public IList BMOs { get; set; } public int? asno { get; set; } public String asname { get; set; } } /// /// 게시판말머리 /// [Serializable] public class BoardMasterOpening : BaseModel { /// /// 말머리번호 /// public int opno {get;set;} /// /// fkbmobm 게시판번호 boardmaster.bmno /// public int bmno {get;set;} /// /// 100 말머리이름 /// public String opname {get;set;} /// /// 순서 /// public int dsort { get; set; } } [Serializable] public class BoardCMT : BaseModel { /// /// 게시글댓글키 /// public Int64 bcno { get; set; } /// /// fkboardcmtboard 게시글키 board.bno /// public Int64 bno { get; set; } /// /// 500 댓글 /// public String ctext { get; set; } public int isdel { get; set; } public int usertype { get; set; } } }