package com.style24.persistence.domain;

import com.style24.core.support.session.TscSession;
import com.style24.core.support.util.MaskingUtils;
import com.style24.persistence.TscBaseDomain;
import com.style24.persistence.TscPageRequest;

import lombok.Data;

/**
 * 회수 Domain
 * 
 * @author moon
 * @since 2020. 11. 16
 */
@SuppressWarnings("serial")
@Data
public class Withdraw extends TscBaseDomain {

	// 페이징 
	private String pageingYn;
	private int startRow;
	private int endRow;
	private TscPageRequest pageable;
	private int pageNo = 1;
	private int pageSize = 50;
	private int pageUnit = 10;
	private int rnum;
	

	
	// 회수 

	private String wdInvoiceNo; 
	private String rfndStat; 
	private String wdGb;
	private String ordNm;
	private String ordPhnno;
	private String senderNm;
	private String senderPhnno;
	private String arrivalDt;
	private String wdEddt;
	private String wdMemo;
	private String goodsCd;
	private String optCd1;
	private String optCd2;
	private String chgMemo;
	private String chgReason;
	private String completeDt;
	private String chgGbNm;
	private String chgReasonNm;
	private String wdShipStateNm;
	private String wdReasonCdNm;
	private String chgStatNm; 
	private String chgGb;                               // 변경구분 g680
	private String wdShipState;                         // 배송업체회수상태 g320
	private String wdStateDt;                           // 회수상태 수신일시 
	private String wdReasonCd;                          // 미회수사유 g321 g322
	private String wdBfSendYn;                          // 교환 선발송 여부 
	private String sendYn;         					    // 전송여부
	private String chgStat;                             // 변경상태 g685
	private String goodsNm;                             // 상품명
	private String wdStdt;  							// 배송시작일시
	private String recipNm;        					  	// 수취인명
	private String chgerNm;                             // 변경자명
	private String chgerPhnno;                          // 변경자휴대전화번호
	private String chgerTelno;                          // 변경자전화번호
	private String chgerZipcode;                        // 변경자우편번호
	private String chgerBaseAddr;                       // 변경자기본주소
	private String chgerDtlAddr;                        // 변경자상세주소
	private String ordTelno;                            // 주문자전화번호
	private String ordEmail;                            // 주문자이메일	
	private String wdRegDt;
	private String rcRegDt;
	private String wdStat;  		// 환불컨펌상태 
	private String chgReasonText; 	// 귀책사유 
	private String wdGbNm; 			// 회수구분 
	private String mallGb;					// 몰구분(G011_10:자사몰, G011_20:외부몰)
	private String wdStatYn;
	private String addDeliveryFeeYn;
	private String pgTid;					// PG거래 ID
	private String payMeans;				// 결제수단(공통코드G014)
	private String payMeansNm;				// 결제수단명
	private String cardNm;					// 카드명
	private String pgGb;					// PG구분
	private String delvExpnYn;		// 확정후 품절,불량 여부
	private String accountNm;
	private String accountNo;
	private String bankCd;	
	private String invoiceNo;
	private String delvFeeCd;
	private String delvFeeCdGrp;
	private String refundConfirm;
	private String shipCompCd;
	private String gubun;
	
	
	private Integer ordNo;
	private Integer ordDtlNo; 
	private Integer ordChgSq;
	private Integer userNo;
	private Integer custNo;
	private Integer delvAddrSq;
	private Integer delvFeeSq;
	
	private int chgQty;
	private int wdQty;
	private int encloseFee;  	// 동봉비 
	private int codFee;      	// 착불비
	private int addPayCost; 	// 추가결제비용 
	private int totalOrdQty;    // 주문총수량 
	private int addDeliveryFee;
	private int refundAmt; 
	private int goodsCnt;
	
	private String stDate;					// 조회 시작 기간
	private String edDate;					// 조회 종료 기간
	private String searchType;
	private String withdrawType;

	
	// Masking

	public String getMaskingRecipNm() {
		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.name(this.recipNm) : this.recipNm;
	}
	
	public String getMaskingChgerNm() {
		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.name(this.chgerNm) : this.chgerNm;
	}
	
	public String getMaskingChgerPhnno() {
		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.phoneNo(this.chgerPhnno) : this.chgerPhnno;
	}
	
	public String getMaskingChgerDtlAddr() {
		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.address(this.chgerDtlAddr) : this.chgerDtlAddr;
	}
	
	public String getMaskingOrdNm() {
		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.name(this.ordNm) : this.ordNm;
	}
	
	public String getMaskingOrdPhnno() {
		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.phoneNo(this.ordPhnno) : this.ordPhnno;
	}

	public String getMaskingOrdEmail() {
		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.email(this.ordEmail) : this.ordEmail;
	}

	public String getMaskingSenderNm() {
		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.name(this.senderNm) : this.senderNm;
	}
	
	public String getMaskingSenderPhnno() {
		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.phoneNo(this.senderPhnno) : this.senderPhnno;
	}	

}
