package com.cool.store.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.Objects;

/**
 * @Author suzhuhong
 * @Date 2023/6/2 10:29
 * @Version 1.0
 */
@Data
@ApiModel
public class PartnerUserInfoVO {

    @ApiModelProperty("ID")
    private Long id;

    @ApiModelProperty("hy_partner_user_info.partner_id")
    private String partnerId;

    @ApiModelProperty("手机号")
    private String mobile;

    @ApiModelProperty("申请人姓名")
    private String username;

    @ApiModelProperty("常驻区域")
    private String liveArea;

    @ApiModelProperty("意向开店区域ID")
    private String wantShopArea;

    @ApiModelProperty("意向开店区域名称")
    private String wantShopAreaName;

    @ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
    private Integer acceptAdjustType;

    @ApiModelProperty("邀请码")
    private String inviteCode;

    @ApiModelProperty("是否填写加盟需知")
    private Integer isWritePartnerKnow;

    @ApiModelProperty("openid")
    private String openid;

    @ApiModelProperty("unionid")
    private String unionId;

    @ApiModelProperty("是否需要提交意向信息")
    private Boolean needSubmitWantInfo;

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

    public Boolean getNeedSubmitWantInfo() {
        if(StringUtils.isBlank(username)
                || StringUtils.isBlank(mobile)
                || StringUtils.isBlank(liveArea)
                || StringUtils.isBlank(wantShopArea)
                || Objects.isNull(acceptAdjustType)){
            return true;
        }
        return false;
    }

}
