package com.cool.store.response;

import com.cool.store.entity.SigningBaseInfoDO;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;

import java.util.Date;

@Data
public class SigningBaseInfoResponse {
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("加盟商id")
    private String partnerId;
    @ApiModelProperty("线索id")
    private Long lineId;
    @ApiModelProperty("签名")
    private String signName;
    @ApiModelProperty("手机号")
    private String mobile;
    @ApiModelProperty("性别 1男 2女")
    private Integer sex;
    @ApiModelProperty("身份证正面url")
    private String idCardFront;
    @ApiModelProperty("身份证反面url")
    private String idCardReverse;
    @ApiModelProperty("身份证号")
    private String idCardNo;
    @ApiModelProperty("身份证地址")
    private String idCardAddress;
    @ApiModelProperty("当前地址")
    private String currentResidence;
    @ApiModelProperty("地址详情")
    private String addressDetail;
    @ApiModelProperty("证照url")
    private String businessLicense;
    @ApiModelProperty("证照码")
    private String businessLicenseCode;
    @ApiModelProperty("证照地址")
    private String businessLicenseAddress;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("加盟身份 1个人加盟 2企业加盟")
    private Integer type;

    @ApiModelProperty("公开拒绝原因")
    private String rejectPublicReason;

    public static SigningBaseInfoResponse from(SigningBaseInfoDO signingBaseInfoDO) {
        if (signingBaseInfoDO == null) {
            return null;
        }
        SigningBaseInfoResponse signingBaseInfoResponse = new SigningBaseInfoResponse();
        signingBaseInfoResponse.setId(signingBaseInfoDO.getId());
        signingBaseInfoResponse.setPartnerId(signingBaseInfoDO.getPartnerId());
        signingBaseInfoResponse.setLineId(signingBaseInfoDO.getLineId());
        signingBaseInfoResponse.setSignName(signingBaseInfoDO.getSignName());
        signingBaseInfoResponse.setMobile(signingBaseInfoDO.getMobile());
        signingBaseInfoResponse.setSex(signingBaseInfoDO.getSex());
        signingBaseInfoResponse.setIdCardFront(signingBaseInfoDO.getIdCardFront());
        signingBaseInfoResponse.setIdCardReverse(signingBaseInfoDO.getIdCardReverse());
        signingBaseInfoResponse.setIdCardNo(signingBaseInfoDO.getIdCardNo());
        signingBaseInfoResponse.setIdCardAddress(signingBaseInfoDO.getIdCardAddress());
        signingBaseInfoResponse.setCurrentResidence(signingBaseInfoDO.getCurrentResidence());
        signingBaseInfoResponse.setAddressDetail(signingBaseInfoDO.getAddressDetail());
        signingBaseInfoResponse.setBusinessLicense(signingBaseInfoDO.getBusinessLicense());
        signingBaseInfoResponse.setBusinessLicenseCode(signingBaseInfoDO.getBusinessLicenseCode());
        signingBaseInfoResponse.setBusinessLicenseAddress(signingBaseInfoDO.getBusinessLicenseAddress());
        signingBaseInfoResponse.setCreateTime(signingBaseInfoDO.getCreateTime());
        signingBaseInfoResponse.setUpdateTime(signingBaseInfoDO.getUpdateTime());
        return signingBaseInfoResponse;
    }
}
