package com.cool.store.vo;

import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.MemberQuestionDO;
import com.cool.store.entity.QualificationsInfoDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.Objects;

@Data
public class PartnerBaseInfoVO {

    private Long id;

    private String partnerId;

    private Long lineId;

    @ApiModelProperty("加盟身份 1个人加盟 2企业加盟")
    private Integer joinType;
    @ApiModelProperty("姓名")
    private String userName;
    @ApiModelProperty("手机号")
    private String mobile;
    @ApiModelProperty("1男 2女")
    private Integer sex;
    @ApiModelProperty("意向加盟区域")
    private String area;
    @ApiModelProperty("意向区域编码")
    private String areaCode;
    @ApiModelProperty("常驻区域详细地址(居住地址)")
    private String liveAddress;

    @ApiModelProperty("线索审核信息id")
    private Long auditId;
    @ApiModelProperty("身份证号码/统一社会信用代码")
    private String idCardNo;
    @ApiModelProperty("身份证正面")
    private String frontOfIdCard;
    @ApiModelProperty("身份证反面")
    private String backOfIdCard;
    @ApiModelProperty("婚姻状态 1-未婚 2-已婚 3-离婚 4-丧偶")
    private Integer maritalStatus;
    @ApiModelProperty("学历 1-初中及以下 2-高中 3-专科 4-本科及以上")
    private Integer educationLevel;
    @ApiModelProperty("户口地址")
    private String householdRegistrationAddress;
    @ApiModelProperty("结算卡卡号")
    private String settlementCardNo;
    @ApiModelProperty("结算卡开户行")
    private String settlementOpeningBank;
    @ApiModelProperty("结算卡照片")
    private String settlementCardPic;
    @ApiModelProperty("创业经历 0-无 1-有")
    private Integer entrepreneurialExperience;
    @ApiModelProperty("以往从事行业")
    private String previouslyEngagedIndustries;
    @ApiModelProperty("银行流水图片")
    private String bankStatementsPic;
    @ApiModelProperty("曾经经营过的品牌")
    private String oldBrands;
    @ApiModelProperty("目前经营的品牌")
    private String newBrands;
    @ApiModelProperty("公司名称")
    private String enterpriseName;
    @ApiModelProperty("注册地址")
    private String companyRegisteredAddress;
    @ApiModelProperty("办公地址")
    private String officeAddress;
    @ApiModelProperty("法人姓名")
    private String legalName;
    @ApiModelProperty("法人身份证号码")
    private String legalIdCardNo;
    @ApiModelProperty("法人身份证正面")
    private String legalIdCardFront;
    @ApiModelProperty("法人身份证反面")
    private String legalIdCardBack;
    @ApiModelProperty("业务负责人姓名")
    private String businessLeaderName;
    @ApiModelProperty("业务负责人联系方式")
    private String businessLeaderMobile;
    @ApiModelProperty("业务负责人姓名")
    private String financialManagerName;
    @ApiModelProperty("业务负责人联系方式")
    private String financialManagerMobile;

    private String businessLicense;

    private Date createTime;

    private Date updateTime;

    private Integer deleted;


    @ApiModelProperty("公开拒绝原因")
    private String rejectPublicReason;
    @ApiModelProperty("大区regionId")
    private Long bigRegionId;

    private String unifiedSocialCreditCode;




    public static PartnerBaseInfoVO from(QualificationsInfoDO qualificationsInfoDO, LineInfoDO lineInfoDO) {
        if (Objects.isNull(qualificationsInfoDO) && Objects.isNull(lineInfoDO)) {
            return null;
        }
        PartnerBaseInfoVO partnerBaseInfoVO = new PartnerBaseInfoVO();
        partnerBaseInfoVO.setIdCardNo(qualificationsInfoDO.getIdCardNo());
        partnerBaseInfoVO.setBackOfIdCard(qualificationsInfoDO.getBackOfIdCard());
        partnerBaseInfoVO.setFrontOfIdCard(qualificationsInfoDO.getFrontOfIdCard());
        partnerBaseInfoVO.setMaritalStatus(qualificationsInfoDO.getMaritalStatus());
        partnerBaseInfoVO.setEducationLevel(qualificationsInfoDO.getEducationLevel());
        partnerBaseInfoVO.setHouseholdRegistrationAddress(qualificationsInfoDO.getHouseholdRegistrationAddress());
        partnerBaseInfoVO.setSettlementCardNo(qualificationsInfoDO.getSettlementCardNo());
        partnerBaseInfoVO.setSettlementCardPic(qualificationsInfoDO.getSettlementCardPic());
        partnerBaseInfoVO.setSettlementOpeningBank(qualificationsInfoDO.getSettlementOpeningBank());
        partnerBaseInfoVO.setEntrepreneurialExperience(qualificationsInfoDO.getEntrepreneurialExperience());
        partnerBaseInfoVO.setUnifiedSocialCreditCode(qualificationsInfoDO.getUnifiedSocialCreditCode());
        partnerBaseInfoVO.setPreviouslyEngagedIndustries(qualificationsInfoDO.getPreviouslyEngagedIndustries());
        partnerBaseInfoVO.setBankStatementsPic(qualificationsInfoDO.getBankStatementsPic());
        partnerBaseInfoVO.setOldBrands(qualificationsInfoDO.getOldBrands());
        partnerBaseInfoVO.setNewBrands(qualificationsInfoDO.getNewBrands());
        partnerBaseInfoVO.setEnterpriseName(qualificationsInfoDO.getEnterpriseName());
        partnerBaseInfoVO.setCompanyRegisteredAddress(qualificationsInfoDO.getCompanyRegisteredAddress());
        partnerBaseInfoVO.setOfficeAddress(qualificationsInfoDO.getOfficeAddress());
        partnerBaseInfoVO.setLegalName(qualificationsInfoDO.getLegalName());
        partnerBaseInfoVO.setLegalIdCardNo(qualificationsInfoDO.getLegalIdCardNo());
        partnerBaseInfoVO.setLegalIdCardBack(qualificationsInfoDO.getLegalIdCardBack());
        partnerBaseInfoVO.setLegalIdCardFront(qualificationsInfoDO.getLegalIdCardFront());
        partnerBaseInfoVO.setBusinessLeaderName(qualificationsInfoDO.getBusinessLeaderName());
        partnerBaseInfoVO.setBusinessLeaderMobile(qualificationsInfoDO.getBusinessLeaderMobile());
        partnerBaseInfoVO.setFinancialManagerName(qualificationsInfoDO.getFinancialManagerName());
        partnerBaseInfoVO.setFinancialManagerMobile(qualificationsInfoDO.getFinancialManagerMobile());
        partnerBaseInfoVO.setBusinessLicense(qualificationsInfoDO.getBusinessLicense());
        partnerBaseInfoVO.setJoinType(qualificationsInfoDO.getJoinType());
        //LineInfoDO
        partnerBaseInfoVO.setId(lineInfoDO.getId());
        partnerBaseInfoVO.setPartnerId(lineInfoDO.getPartnerId());
        partnerBaseInfoVO.setUserName(lineInfoDO.getUsername());
        partnerBaseInfoVO.setMobile(lineInfoDO.getMobile());
        partnerBaseInfoVO.setLiveAddress(lineInfoDO.getLiveAddress());
        partnerBaseInfoVO.setLineId(lineInfoDO.getId());
        partnerBaseInfoVO.setSex(Integer.valueOf(lineInfoDO.getSex()));
        partnerBaseInfoVO.setAreaCode(String.valueOf(lineInfoDO.getWantShopAreaId()));
        partnerBaseInfoVO.setBigRegionId(lineInfoDO.getBigRegionId());
        return partnerBaseInfoVO;
    }


}
