package com.oqpo.api.web.dto.response.loanmng;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.oqpo.api.entity.loanmng.LoanMgntDsptProcEntity;
import com.oqpo.api.entity.stockmng.WhsMgntBaseInfoEntity;
import com.oqpo.api.entity.stockmng.WhsMgntBaseLocEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.util.List;
import java.util.stream.Collectors;


@Getter
@Setter
@Builder
@AllArgsConstructor(access = AccessLevel.PROTECTED)
@JsonInclude(JsonInclude.Include.ALWAYS)
public class DsptMngInfoResponse {

    @ApiModelProperty(value = "입금관리번호")
    private String dsptMgntNo;
    @ApiModelProperty(value = "요청일자")
    private String reqDt;
    @ApiModelProperty(value = "요청시각")
    private String reqTm;
    @ApiModelProperty(value = "입금금액")
    private Long dpstAmt;
    @ApiModelProperty(value = "입금일자")
    private String dpstDt;
    @ApiModelProperty(value = "입금자명")
    private String dpstNm;
    @ApiModelProperty(value = "입금계좌번호")
    private String rcvAcctNo;
    @ApiModelProperty(value = "입금은행코드")
    private String dpstBnkCd;
    @ApiModelProperty(value = "입금은행명")
    private String dpstBnkNm;
    @ApiModelProperty(value = "입금상태코드")
    private String dpstStCd;
    @ApiModelProperty(value = "입금상태명")
    private String dpstStNm;
    @ApiModelProperty(value = "입금요청자아이디")
    private String dpstReqId;
    @ApiModelProperty(value = "입금요청자명")
    private String dpstReqNm;
    @ApiModelProperty(value = "입금승인자아이디")
    private String dpstAuthId;
    @ApiModelProperty(value = "입금승인자명")
    private String dpstAuthNm;
    @ApiModelProperty(value = "입금승인일자")
    private String dpstAuthDt;
    @ApiModelProperty(value = "입금승인시각")
    private String dpstAuthTm;
    @ApiModelProperty(value = "입금반려일자")
    private String dsptRjctDt;
    @ApiModelProperty(value = "입금반려시각")
    private String dsptRjctTm;
    @ApiModelProperty(value = "매장아이디")
    private String storeId;
    @ApiModelProperty(value = "매장명")
    private String storeNm;
    @ApiModelProperty(value = "브랜드아이디")
    private String brandId;
    @ApiModelProperty(value = "브랜드명")
    private String brandNm;
    @ApiModelProperty(value = "입금승인여부")
    private String dpstAuthYn;
    @ApiModelProperty(value = "입금반려사유")
    private String dsptRjctRsn;
    @ApiModelProperty(value = "시스템등록일시")
    private String sysRegDttm;
    @ApiModelProperty(value = "시스템등록아이디")
    private String sysRegId;
    @ApiModelProperty(value = "시스템변경일시")
    private String sysChgDttm;
    @ApiModelProperty(value = "시스템변경아이디")
    private String sysChgId;

    public static DsptMngInfoResponse toDTO(LoanMgntDsptProcEntity entity) {
        if (entity == null) return null;
        return DsptMngInfoResponse.builder()
                .dsptMgntNo(entity.getDsptMgntNo())
                .reqDt(entity.getReqDt())
                .reqTm(entity.getReqTm())
                .dpstAmt(entity.getDpstAmt())
                .dpstDt(entity.getDpstDt())
                .dpstNm(entity.getDpstNm())
                .rcvAcctNo(entity.getRcvAcctNo())
                .dpstBnkCd(entity.getDpstBnkCd())
                .dpstBnkNm(entity.getDpstBnkNm())
                .dpstStCd(entity.getDpstStCd())
                .dpstStNm(entity.getDpstStNm())
                .dpstReqId(entity.getDpstReqId())
                .dpstReqNm(entity.getDpstReqNm())
                .dpstAuthId(entity.getDpstAuthId())
                .dpstAuthNm(entity.getDpstAuthNm())
                .dpstAuthDt(entity.getDpstAuthDt())
                .dpstAuthTm(entity.getDpstAuthTm())
                .dsptRjctDt(entity.getDsptRjctDt())
                .dsptRjctTm(entity.getDsptRjctTm())
                .storeId(entity.getStoreId())
                .storeNm(entity.getStoreNm())
                .brandId(entity.getBrandId())
                .brandNm(entity.getBrandNm())
                .dpstAuthYn(entity.getDpstAuthYn())
                .dsptRjctRsn(entity.getDsptRjctRsn())
                .sysRegDttm(entity.getSysRegDttm())
                .sysRegId(entity.getSysRegId())
                .sysChgDttm(entity.getSysChgDttm())
                .sysChgId(entity.getSysChgId())
                .build();
    }

}
