package com.cool.store.request;

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 javax.validation.constraints.NotBlank;

@Data
public class JoinIntentionRequest {
    private Long id;
    @ApiModelProperty("线索信息表-线索id")
    private Long lineId;
    @ApiModelProperty("用户信息表partnerId")
    @NotBlank(message = "partnerId不能为空")
    private String partnerId;
    @ApiModelProperty("加盟身份 1个人加盟 2企业加盟")
    private Integer joinType;
    @ApiModelProperty("加盟模式 1-社会加盟模式 2-强加盟模式")
    private Integer joinMode;
    @ApiModelProperty("姓名")
    private String userName;
    @ApiModelProperty("手机号")
    private String mobile;
    @ApiModelProperty("1男 2女")
    private Integer sex;
    @ApiModelProperty("意向加盟区域")
    private String wantShopArea;
    @ApiModelProperty("意向区域编码")
    private String areaCode;
    @ApiModelProperty("常驻区域")
    private String liveArea;
    @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;
    @ApiModelProperty("营业执照")
    private String businessLicense;
    @ApiModelProperty("统一社会信用代码")
    private String unifiedSocialCreditCode;

    public LineInfoDO toLineInfoDO() {
        LineInfoDO lineInfoDO = new LineInfoDO();
        lineInfoDO.setPartnerId(this.partnerId);
        lineInfoDO.setMobile(this.mobile);
        lineInfoDO.setLiveAddress(this.liveAddress);
        lineInfoDO.setUsername(this.userName);
        lineInfoDO.setSex(String.valueOf(this.sex));
        lineInfoDO.setWantShopAreaId(Long.valueOf(this.areaCode));
        lineInfoDO.setId(this.lineId);
        return lineInfoDO;
    }


    public QualificationsInfoDO toQualificationsInfoDO() {
        QualificationsInfoDO qualificationsInfoDO = new QualificationsInfoDO();
        qualificationsInfoDO.setId(this.id);
        qualificationsInfoDO.setAuditId(this.auditId);
        qualificationsInfoDO.setPartnerId(this.partnerId);
        qualificationsInfoDO.setLineId(this.lineId);
        qualificationsInfoDO.setJoinType(this.joinType);
        //对request里面所有的字段set
        qualificationsInfoDO.setIdCardNo(this.idCardNo);
        qualificationsInfoDO.setBackOfIdCard(this.backOfIdCard);
        qualificationsInfoDO.setFrontOfIdCard(this.frontOfIdCard);
        qualificationsInfoDO.setMaritalStatus(this.maritalStatus);
        qualificationsInfoDO.setEducationLevel(this.educationLevel);
        qualificationsInfoDO.setHouseholdRegistrationAddress(this.householdRegistrationAddress);
        qualificationsInfoDO.setSettlementCardNo(this.settlementCardNo);
        qualificationsInfoDO.setSettlementCardPic(this.settlementCardPic);
        qualificationsInfoDO.setUnifiedSocialCreditCode(this.unifiedSocialCreditCode);
        qualificationsInfoDO.setSettlementOpeningBank(this.settlementOpeningBank);
        qualificationsInfoDO.setEntrepreneurialExperience(this.entrepreneurialExperience);
        qualificationsInfoDO.setPreviouslyEngagedIndustries(this.previouslyEngagedIndustries);
        qualificationsInfoDO.setBankStatementsPic(this.bankStatementsPic);
        qualificationsInfoDO.setOldBrands(this.oldBrands);
        qualificationsInfoDO.setNewBrands(this.newBrands);
        qualificationsInfoDO.setEnterpriseName(this.enterpriseName);
        qualificationsInfoDO.setCompanyRegisteredAddress(this.companyRegisteredAddress);
        qualificationsInfoDO.setOfficeAddress(this.officeAddress);
        qualificationsInfoDO.setLegalName(this.legalName);
        qualificationsInfoDO.setLegalIdCardNo(this.legalIdCardNo);
        qualificationsInfoDO.setLegalIdCardBack(this.legalIdCardBack);
        qualificationsInfoDO.setLegalIdCardFront(this.legalIdCardFront);
        qualificationsInfoDO.setBusinessLeaderName(this.businessLeaderName);
        qualificationsInfoDO.setBusinessLeaderMobile(this.businessLeaderMobile);
        qualificationsInfoDO.setFinancialManagerName(this.financialManagerName);
        qualificationsInfoDO.setFinancialManagerMobile(this.financialManagerMobile);
        qualificationsInfoDO.setBusinessLicense(this.businessLicense);
        return qualificationsInfoDO;
    }
}
