package nlib.col.service;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import nlib.cmm.service.NlibProperty;
import nlib.cmm.service.PagingVO;
import nlib.util.StringUtil;

/**
 * <pre>
 * @Class Name : CollectionVO.java
 * 
 * @Description : 소장자료 관련 VO
 * 
 * 
 * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
 *
 * </pre>
 *
 * @ ------------    --------    ---------------------------
 * @ 수정일                     수정자             수정내용
 * @ ------------    --------    ---------------------------
 * @ 2021. 9. 23.    JSYOO       최초 생성
 * @ 2021.10. 06.    KKN         자료에 대한 세부 항목, 생성자 함수 추가 
 * 
 * 
 * @author 이씨플라자 * DIGITALSHIP JSYOO
 * @since 2021. 9. 28.
 * @version 1.0
 *
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class CollectionVO extends PagingVO {
	
	// 기본 썸네일 (썸네일 존재하지 않는 경우, default url)
	public final String THUMBNAIL_IMG_URL = NlibProperty.getString("item.thumbnail.image.url"); 
	
	//--------------------------------------------
	// 자료항목 
	//--------------------------------------------
	private String masterId;		/* 마스터id */
	private String title;			/* 제목 */
	private String rprsThumbUrl;	/* 대표썸네일URL   */
	private String useYn;			/* 사용여부 */
	private String regDd;			/* 등록일자 */
	private String mngOrgNm;		/* 관리처리과명 */
	private String mngOrgCd;		/* 관리처리과코드 */
	private String typeDivCd;       /* 자료유형코드 */ 
	private String typeCodeNm;      /* 자료유형명 (도서간행물/문서/도면 등) */
	private String subjectNm;       /* 주제분야명 */
	private String orgNm;           /* 생산기관명 */
	private String creatYyyy;       /* 생산년도 */
	private String interfaceId;     /* 지역N문화서비스ID */
	private String openDivCd;       /* 원문공개코드 */
	private String openDivNm;       /* 원문공개코드명 */
	private String operReadRangeCd; /* 열람가능코드 */
	private String operReadRangeNm; /* 열람가능코드명 */
	private String operOutRangeCd;  /* 대출가능코드 */
	private String operOutRangeNm;  /* 대출가능코드명 */
	private String useStatus;       /* 이용상태코드 */
	private String useStatusNm;     /* 이용상태코드명 */
	private String rtnExpctDd;      /* 반납예정일자 */
	private int    awaiterCnt;      /* 대출대기자수 */
	private String bookLentPsblYn;  /* 현재대출신청가능여부 */
	private String rsrvPsblYn;      /* 현재대출예약가능여부 */
	private String reqPsblYn;       /* 현재열람신청가능여부 */
	private String interestYn;      /* 사용자관심여부 */
	private String dtlsTypeDivCd;   /* 세부유형코드 */
	private String dtlsTypeDivNm;   /* 세부유형명 */
	private String mngtNo;          /* 관리번호 */
	private String bookAuthor;      /* 저자명 */
	private String bookPublisher;   /* 출판사명 */
	private String bookPlbcTypeNm;  /* 발간유형명 */
	private String bookPlbcMda;     /* 발간매채명 */
	private String bookCallNo;      /* 청구기호 */
	private String themeCodeNm;     /* 테마명 */
	private String ageCodeNm;       /* 시대 */
	private String chronologicalCodeStartNm;  /* 연대 start */
	private String chronologicalCodeEndNm;    /* 연대 end */
	private String keyword;         /* 키워드목록 */
	private String bookIndex;       /* 목차정보 */
	private String docNo;           /* (구)문서번호 */
	private String mapTypeCd;       /* 도면지도구분코드 */
	private String mapTypeNm;       /* 도면지도구분코드명 */
	private String mapLoc;          /* 도면지도위치주소 */
	private String photoMediaCd;         /* 사진필름미디어유형구분코드 */
	private String photoMediaNm;         /* 사진필름미디어매체 */
	private String photoSizeNm;          /* 사진필름미디어규격 */
	private String photoDescription;     /* 사진필름미디어설명 */
	private String photoAdditionalDescription;  /* 사진필름미디어부가설명 */
	private String videoMediaCd;         /* 녹음동영상미디어유형구분코드 */
	private String videoMediaNm;         /* 녹음동영상미디어유형구분코드명 */
	private String videoTime;            /* 녹음동영상미디어재생시간 */
	private String videoStat;            /* 녹음동영상미디어재생화질상태 */
	private String videoDescription;     /* 녹음동영상미디어설명 */
	private String videoAdditionalDescription;  /* 녹음동영상미디어부가설명 */
	private String museTypeCd;                  /* 박물유형구분코드 */
	private String museTypeNm;                  /* 박물유형구분코드명 */
	private String museKindCd;                  /* 박물형태 */
	private String museKindNm;                  /* 박물형태명 */
	private String museMeterialCd;              /* 박물재질 */
	private String museMeterialNm;              /* 박물재질명 */
	private String assetLink;                   /* 자산링크 */
	private String regId;                       /* 등록자ID */
	private String modId;                       /* 변경자ID */
	
	//--------------------------------------------
	// 기타 연관기능 항목 
	//--------------------------------------------
	private int    mbInterestId;	/*  관심 id */
	private String mbInfoId;		/*  회원 id */
	private String mbCartId;        /* 	카트ID */
	private String cartTypeCd;      /* 	카트유형코드 */
	private String rsrvId;          /* 	카트관련대출예약ID */
	private String reqId;           /* 	카트관련열람예약ID */
	private String cartProcDivCd;   /* 	카트처리구분코드 */
	
	//--------------------------------------------
	// 기타 및 처리결과 항목 
	//--------------------------------------------
	private String selItems;      /* 다건선택된 카트ID 목록 ","로 구분 */ 
	private String resultCode;    /* 결과코드 */
	private String resultMessage; /* 결과메시지 */

	// 생성자 
	public CollectionVO() {
		super();
	}
	
	public CollectionVO(String resultCode, String resultMessage) {
		super();
		setResult(resultCode, resultMessage);
	}
	
	public void setResult(String resultCode, String resultMessage) {
		this.resultCode = resultCode;
		this.resultMessage = resultMessage;
	}
	
	public static CollectionVO createWithMasterId(String cartTypeCd, String masterId) {
		CollectionVO vo = new CollectionVO();
		vo.setCartTypeCd(cartTypeCd);
		vo.setMasterId(masterId);
		return vo;
	}
	
	// GET & SET 
	
	public String getMasterId() {
		return masterId;
	}
	public void setMasterId(String masterId) {
		this.masterId = masterId;
	}
	public int getMbInterestId() {
		return mbInterestId;
	}
	public void setMbInterestId(int mbInterestId) {
		this.mbInterestId = mbInterestId;
	}
	public void setMbInterestId(String mbInterestId) {
		this.mbInterestId = Integer.parseInt(mbInterestId);
	}
	public String getMbInfoId() {
		return mbInfoId;
	}
	public void setMbInfoId(String mbInfoId) {
		this.mbInfoId = mbInfoId;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getRprsThumbUrl() {
		return rprsThumbUrl == null ? THUMBNAIL_IMG_URL : rprsThumbUrl;
	}
	public void setRprsThumbUrl(String rprsThumbUrl) {
		this.rprsThumbUrl = rprsThumbUrl;
	}
	public String getUseYn() {
		return useYn;
	}
	public void setUseYn(String useYn) {
		this.useYn = useYn;
	}
	public String getRegDd() {
		return regDd;
	}
	public void setRegDd(String regDd) {
		this.regDd = regDd;
	}
	public String getMngOrgNm() {
		return mngOrgNm;
	}
	public void setMngOrgNm(String mngOrgNm) {
		this.mngOrgNm = mngOrgNm;
	}
	public String getMngOrgCd() {
		return mngOrgCd;
	}
	public void setMngOrgCd(String mngOrgCd) {
		this.mngOrgCd = mngOrgCd;
	}
	public String getTypeDivCd() {
		return typeDivCd;
	}
	public void setTypeDivCd(String typeDivCd) {
		this.typeDivCd = typeDivCd;
	}
	public String getTypeCodeNm() {
		return typeCodeNm;
	}
	public void setTypeCodeNm(String typeCodeNm) {
		this.typeCodeNm = typeCodeNm;
	}
	public String getSubjectNm() {
		return subjectNm;
	}
	public void setSubjectNm(String subjectNm) {
		this.subjectNm = subjectNm;
	}
	public String getOrgNm() {
		return orgNm;
	}
	public void setOrgNm(String orgNm) {
		this.orgNm = orgNm;
	}
	public String getCreatYyyy() {
		return creatYyyy;
	}
	public void setCreatYyyy(String creatYyyy) {
		this.creatYyyy = creatYyyy;
	}
	public String getInterfaceId() {
		return interfaceId;
	}
	public void setInterfaceId(String interfaceId) {
		this.interfaceId = interfaceId;
	}
	public String getOpenDivCd() {
		return openDivCd;
	}
	public void setOpenDivCd(String openDivCd) {
		this.openDivCd = openDivCd;
	}
	public String getOpenDivNm() {
		return openDivNm;
	}
	public void setOpenDivNm(String openDivNm) {
		this.openDivNm = openDivNm;
	}
	public String getOperReadRangeCd() {
		return operReadRangeCd;
	}
	public void setOperReadRangeCd(String operReadRangeCd) {
		this.operReadRangeCd = operReadRangeCd;
	}
	public String getOperReadRangeNm() {
		/*  01:전체열람 02: 목록열람 03:열람불가 */
		if("01".equals(operReadRangeCd)) return "전체열람";
		else if("02".equals(operReadRangeCd)) return "목록열람";
		else if("03".equals(operReadRangeCd)) return "열람불가";
		
		return operReadRangeNm;
	}
	public void setOperReadRangeNm(String operReadRangeNm) {
		this.operReadRangeNm = operReadRangeNm;
	}
	public String getOperOutRangeCd() {
		return operOutRangeCd;
	}
	public void setOperOutRangeCd(String operOutRangeCd) {
		this.operOutRangeCd = operOutRangeCd;
	}
	public String getOperOutRangeNm() {
		/* 01:대출가능 02: 대출불가 */
		if("01".equals(operOutRangeCd)) return "대출가능";
		else if("02".equals(operOutRangeCd)) return "대출불가";
		
		return operOutRangeNm;
	}
	public void setOperOutRangeNm(String operOutRangeNm) {
		this.operOutRangeNm = operOutRangeNm;
	}
	public String getUseStatus() {
		return useStatus;
	}
	public void setUseStatus(String useStatus) {
		this.useStatus = useStatus;
	}
	public String getUseStatusNm() {
		
		/*  01 : 이용가능
			02 : 대출중 (대기자 0명)
			03 : 대출중 (대기자 1명)
			04 : 열람대기(대출가능)
			05 : 이용가능
			06 : 열람대기(대출불가능)
			07 : 온라인열람만"
		 */
		if("01".equals(useStatus)) return "이용가능";
		else if("02".equals(useStatus)) return String.format("대출중 (대기자 %s명)", awaiterCnt);
		else if("03".equals(useStatus)) return String.format("대출중 (대기자 %s명)", awaiterCnt);
		else if("04".equals(useStatus)) return "열람대기(대출가능)";
		else if("05".equals(useStatus)) return "이용가능";
		else if("06".equals(useStatus)) return "열람대기(대출불가능)";
		else if("07".equals(useStatus)) return "온라인열람만";
		
		return useStatusNm;
	}
	public void setUseStatusNm(String useStatusNm) {
		this.useStatusNm = useStatusNm;
	}
	public String getRtnExpctDd() {
		return rtnExpctDd;
	}
	public void setRtnExpctDd(String rtnExpctDd) {
		this.rtnExpctDd = rtnExpctDd;
	}
	public int getAwaiterCnt() {
		return awaiterCnt;
	}
	public void setAwaiterCnt(int awaiterCnt) {
		this.awaiterCnt = awaiterCnt;
	}
	public String getBookLentPsblYn() {
		return bookLentPsblYn;
	}
	public void setBookLentPsblYn(String bookLentPsblYn) {
		this.bookLentPsblYn = bookLentPsblYn;
	}
	public String getRsrvPsblYn() {
		return rsrvPsblYn;
	}
	public void setRsrvPsblYn(String rsrvPsblYn) {
		this.rsrvPsblYn = rsrvPsblYn;
	}
	public String getReqPsblYn() {
		return reqPsblYn;
	}
	public void setReqPsblYn(String reqPsblYn) {
		this.reqPsblYn = reqPsblYn;
	}
	public String getInterestYn() {
		return interestYn;
	}
	public void setInterestYn(String interestYn) {
		this.interestYn = interestYn;
	}
	public String getDtlsTypeDivCd() {
		return dtlsTypeDivCd;
	}
	public void setDtlsTypeDivCd(String dtlsTypeDivCd) {
		this.dtlsTypeDivCd = dtlsTypeDivCd;
	}
	public String getDtlsTypeDivNm() {
		return dtlsTypeDivNm;
	}
	public void setDtlsTypeDivNm(String dtlsTypeDivNm) {
		this.dtlsTypeDivNm = dtlsTypeDivNm;
	}
	public String getMngtNo() {
		return mngtNo;
	}
	public void setMngtNo(String mngtNo) {
		this.mngtNo = mngtNo;
	}
	public String getBookAuthor() {
		return bookAuthor;
	}
	public void setBookAuthor(String bookAuthor) {
		this.bookAuthor = bookAuthor;
	}
	public String getBookPublisher() {
		return bookPublisher;
	}
	public void setBookPublisher(String bookPublisher) {
		this.bookPublisher = bookPublisher;
	}
	public String getBookPlbcTypeNm() {
		return bookPlbcTypeNm;
	}
	public void setBookPlbcTypeNm(String bookPlbcTypeNm) {
		this.bookPlbcTypeNm = bookPlbcTypeNm;
	}
	public String getBookPlbcMda() {
		return bookPlbcMda;
	}
	public void setBookPlbcMda(String bookPlbcMda) {
		this.bookPlbcMda = bookPlbcMda;
	}
	public String getBookCallNo() {
		return bookCallNo;
	}
	public void setBookCallNo(String bookCallNo) {
		this.bookCallNo = bookCallNo;
	}
	public String getThemeCodeNm() {
		return themeCodeNm;
	}
	public void setThemeCodeNm(String themeCodeNm) {
		this.themeCodeNm = themeCodeNm;
	}
	public String getAgeCodeNm() {
		return ageCodeNm;
	}
	public void setAgeCodeNm(String ageCodeNm) {
		this.ageCodeNm = ageCodeNm;
	}
	public String getChronologicalCodeStartNm() {
		return chronologicalCodeStartNm;
	}
	public void setChronologicalCodeStartNm(String chronologicalCodeStartNm) {
		this.chronologicalCodeStartNm = chronologicalCodeStartNm;
	}
	public String getChronologicalCodeEndNm() {
		return chronologicalCodeEndNm;
	}
	public void setChronologicalCodeEndNm(String chronologicalCodeEndNm) {
		this.chronologicalCodeEndNm = chronologicalCodeEndNm;
	}
	public String getKeyword() {
		return keyword;
	}
	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	public String getBookIndex() {
		return bookIndex;
	}
	public void setBookIndex(String bookIndex) {
		this.bookIndex = bookIndex;
	}
	public String getDocNo() {
		return docNo;
	}
	public void setDocNo(String docNo) {
		this.docNo = docNo;
	}
	public String getMapTypeCd() {
		return mapTypeCd;
	}
	public void setMapTypeCd(String mapTypeCd) {
		this.mapTypeCd = mapTypeCd;
	}
	public String getMapTypeNm() {
		return mapTypeNm;
	}
	public void setMapTypeNm(String mapTypeNm) {
		this.mapTypeNm = mapTypeNm;
	}
	public String getMapLoc() {
		return mapLoc;
	}
	public void setMapLoc(String mapLoc) {
		this.mapLoc = mapLoc;
	}
	public String getPhotoMediaCd() {
		return photoMediaCd;
	}
	public void setPhotoMediaCd(String photoMediaCd) {
		this.photoMediaCd = photoMediaCd;
	}
	public String getPhotoMediaNm() {
		return photoMediaNm;
	}
	public void setPhotoMediaNm(String photoMediaNm) {
		this.photoMediaNm = photoMediaNm;
	}
	public String getPhotoSizeNm() {
		return photoSizeNm;
	}
	public void setPhotoSizeNm(String photoSizeNm) {
		this.photoSizeNm = photoSizeNm;
	}
	public String getPhotoDescription() {
		return photoDescription;
	}
	public void setPhotoDescription(String photoDescription) {
		this.photoDescription = photoDescription;
	}
	public String getPhotoAdditionalDescription() {
		return photoAdditionalDescription;
	}
	public void setPhotoAdditionalDescription(String photoAdditionalDescription) {
		this.photoAdditionalDescription = photoAdditionalDescription;
	}
	public String getVideoMediaCd() {
		return videoMediaCd;
	}
	public void setVideoMediaCd(String videoMediaCd) {
		this.videoMediaCd = videoMediaCd;
	}
	public String getVideoMediaNm() {
		return videoMediaNm;
	}
	public void setVideoMediaNm(String videoMediaNm) {
		this.videoMediaNm = videoMediaNm;
	}
	public String getVideoTime() {
		return videoTime;
	}
	public void setVideoTime(String videoTime) {
		this.videoTime = videoTime;
	}
	public String getVideoStat() {
		return videoStat;
	}
	public void setVideoStat(String videoStat) {
		this.videoStat = videoStat;
	}
	public String getVideoDescription() {
		return videoDescription;
	}
	public void setVideoDescription(String videoDescription) {
		this.videoDescription = videoDescription;
	}
	public String getVideoAdditionalDescription() {
		return videoAdditionalDescription;
	}
	public void setVideoAdditionalDescription(String videoAdditionalDescription) {
		this.videoAdditionalDescription = videoAdditionalDescription;
	}
	public String getMuseTypeCd() {
		return museTypeCd;
	}
	public void setMuseTypeCd(String museTypeCd) {
		this.museTypeCd = museTypeCd;
	}
	public String getMuseTypeNm() {
		return museTypeNm;
	}
	public void setMuseTypeNm(String museTypeNm) {
		this.museTypeNm = museTypeNm;
	}
	public String getMuseKindCd() {
		return museKindCd;
	}
	public void setMuseKindCd(String museKindCd) {
		this.museKindCd = museKindCd;
	}
	public String getMuseKindNm() {
		return museKindNm;
	}
	public void setMuseKindNm(String museKindNm) {
		this.museKindNm = museKindNm;
	}
	public String getMuseMeterialCd() {
		return museMeterialCd;
	}
	public void setMuseMeterialCd(String museMeterialCd) {
		this.museMeterialCd = museMeterialCd;
	}
	public String getMuseMeterialNm() {
		return museMeterialNm;
	}
	public void setMuseMeterialNm(String museMeterialNm) {
		this.museMeterialNm = museMeterialNm;
	}
	public String getAssetLink() {
		return assetLink;
	}
	public void setAssetLink(String assetLink) {
		this.assetLink = assetLink;
	}
	public String getResultCode() {
		return resultCode;
	}
	public void setResultCode(String resultCode) {
		this.resultCode = resultCode;
	}
	public String getResultMessage() {
		return resultMessage;
	}
	public void setResultMessage(String resultMessage) {
		this.resultMessage = resultMessage;
	}

	public String getMbCartId() {
		return mbCartId;
	}

	public void setMbCartId(String mbCartId) {
		this.mbCartId = mbCartId;
	}

	public String getCartTypeCd() {
		return cartTypeCd;
	}

	public void setCartTypeCd(String cartTypeCd) {
		this.cartTypeCd = cartTypeCd;
	}

	public String getRsrvId() {
		return rsrvId;
	}

	public void setRsrvId(String rsrvId) {
		this.rsrvId = rsrvId;
	}

	public String getReqId() {
		return reqId;
	}

	public void setReqId(String reqId) {
		this.reqId = reqId;
	}

	public String getCartProcDivCd() {
		return cartProcDivCd;
	}

	public void setCartProcDivCd(String cartProcDivCd) {
		this.cartProcDivCd = cartProcDivCd;
	}

	public String getRegId() {
		return regId;
	}

	public void setRegId(String regId) {
		this.regId = regId;
	}

	public String getModId() {
		return modId;
	}

	public void setModId(String modId) {
		this.modId = modId;
	}

	public String getSelItems() {
		return selItems;
	}

	public void setSelItems(String selItems) {
		this.selItems = selItems;
	}

}

