package com.cool.store.vo;

import com.cool.store.entity.OpenNewShopRecordDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Objects;

/**
 * @author zhangchenbiao
 * @FileName: PartnerOpenNewShopDetailVO
 * @Description:加盟商开新店申请详情
 * @date 2024-05-10 10:04
 */
@Data
public class PartnerOpenNewShopDetailVO {

    @ApiModelProperty("记录id")
    private Long recordId;

    @ApiModelProperty("线索id")
    private Long lineId;

    @ApiModelProperty("新开意向店铺数量")
    private Integer newWantShopNum;

    @ApiModelProperty("现有资金")
    private Integer fund;

    @ApiModelProperty("审核结果 0通过,1拒绝")
    private Integer auditResult;

    public static PartnerOpenNewShopDetailVO convert(OpenNewShopRecordDO openNewShopRecord) {
        if(Objects.isNull(openNewShopRecord)){
            return null;
        }
        PartnerOpenNewShopDetailVO result = new PartnerOpenNewShopDetailVO();
        result.setRecordId(openNewShopRecord.getId());
        result.setLineId(openNewShopRecord.getLineId());
        result.setNewWantShopNum(openNewShopRecord.getNewWantShopNum());
        result.setFund(openNewShopRecord.getFund());
        result.setAuditResult(openNewShopRecord.getAuditResult());
        return result;
    }
}
