package com.cool.store.request;

import com.cool.store.entity.BuildInformationDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Author: WangShuo
 * @Date: 2024/10/09/下午3:13
 * @Version 1.0
 * @注释:
 */
@Data
public class BuildInformationRequest {

    @NotNull
    private Long shopId;
    @NotBlank(message = "门店联系人姓名  不能为空")
    @Length(max = 100 , message = "门店联系人姓名长度不能超过100")
    @ApiModelProperty("门店联系人姓名")
    private String shopContactName;

    @ApiModelProperty("门店联系人手机号")
    @NotBlank(message = "门店联系人手机号  不能为空")
    @Length(min = 11,max = 11 , message = "门店联系人手机号长度必须为11")
    private String shopContactMobile;

    @ApiModelProperty("营业时间")
    @NotBlank(message = "营业时间  不能为空")
    private String businessHours;

    @ApiModelProperty("营业电话")
    @NotBlank(message = "营业电话  不能为空")
    @Length(max = 100 , message = "营业电话长度不能超过100")
    private String businessMobile;

    @NotBlank(message = "门头照  不能为空")
    @Length(max = 1000 , message = "门头照长度不能超过1000")
    @ApiModelProperty("门头照（图片）")
    private String doorPhoto;

    @NotBlank(message = "店内照  不能为空")
    @Length(max = 2040 , message = "店内照长度不能超过2040")
    @ApiModelProperty("店内照（图片）")
    private String inStorePhoto;

    @NotBlank(message = "法人身份证正面  不能为空")
    @Length(max = 250 , message = "法人身份证正面长度不能超过250")
    @ApiModelProperty("法人身份证正面（图片）")
    private String juridicalIdCardFront;

    @NotBlank(message = "法人身份证反面  不能为空")
    @Length(max = 250 , message = "法人身份证反面长度不能超过250")
    @ApiModelProperty("法人身份证反面（图片）")
    private String juridicalIdCardReverse;

    @NotBlank(message = "法人身份证号  不能为空")
    @Length(max = 18, message = "法人身份证号长度必须为18位")
    @ApiModelProperty("法人身份证号")
    private String juridicalIdCardNo;

    @NotBlank(message = "法人手持身份证正面  不能为空")
    @Length(max = 250 , message = "法人手持身份证正面 长度不能超过250")
    @ApiModelProperty("法人手持身份证正面（图片）")
    private String juridicalHandheldIdCardFront;

    @NotBlank(message = "法人手持身份证正面  不能为空")
    @Length(max = 250 , message = "法人手持身份证正面 长度不能超过250")
    @ApiModelProperty("法人手持身份证反面（图片）")
    private String juridicalHandheldIdCardReverse;

    @NotBlank(message = "结算人身份证正面  不能为空")
    @Length(max = 250 , message = "结算人身份证正面 长度不能超过250")
    @ApiModelProperty("结算人身份证正面（图片）")
    private String settlerIdCardFront;

    @NotBlank(message = "结算人身份证反面  不能为空")
    @Length(max = 250 , message = "结算人身份证反面 长度不能超过250")
    @ApiModelProperty("结算人身份证反面（图片）")
    private String settlerIdCardReverse;

    @NotBlank(message = "结算人身份证号  不能为空")
    @Length(max = 64 , message = "结算人身份证号 长度不能超过64")
    @ApiModelProperty("结算人身份证号")
    private String settlerIdCardNo;

    @NotBlank(message = "结算人银行卡照片  不能为空")
    @Length(max = 250, message = "结算人银行卡照片 长度不能超过250")
    @ApiModelProperty("结算人银行卡照片")
    private String settlerBankPhotoUrl;

    @NotBlank(message = "结算人银行卡号  不能为空")
    @Length(max = 64 , message = "结算人银行卡号 长度不能超过64")
    @ApiModelProperty("结算人银行卡号")
    private String settlerBankNumber;

    @NotBlank(message = "结算人银行卡预留手机号  不能为空")
    @Length(min = 11,max = 11 , message = "结算人银行卡预留手机号 长度必须为11")
    @ApiModelProperty("结算人银行卡预留手机号")
    private String settlerBankMobile;

    @NotBlank(message = "结算开户银行支行  不能为空")
    @Length(max =100, message = "结算开户银行支行 长度不能超过100")
    @ApiModelProperty("结算开户银行支行")
    private String settlerBankName;

    @ApiModelProperty("非法人时候需要:授权书")
    @Length(max =1024, message = "授权书 长度不能超过1024")
    private String authorizationUrl;

    @Length(max =1024, message = "商户关系证明 长度不能超过1024")
    @ApiModelProperty("非法人时候需要:商户关系证明")
    private String relationshipProve;

    @Length(max =1024, message = "开户许可证 长度不能超过1024")
    @ApiModelProperty("公司结算需要:开户许可证")
    private String accountOpeningPermit;

    public BuildInformationDO toDO(){
        BuildInformationDO buildInformationDO = new BuildInformationDO();
        buildInformationDO.setShopId(this.shopId);
        buildInformationDO.setShopContactName(this.shopContactName);
        buildInformationDO.setShopContactMobile(this.shopContactMobile);
        buildInformationDO.setBusinessHours(this.businessHours);
        buildInformationDO.setBusinessMobile(this.businessMobile);
        buildInformationDO.setDoorPhoto(this.doorPhoto);
        buildInformationDO.setInStorePhoto(this.inStorePhoto);
        buildInformationDO.setJuridicalIdCardNo(this.juridicalIdCardNo);
        buildInformationDO.setJuridicalIdCardFront(this.juridicalIdCardFront);
        buildInformationDO.setJuridicalIdCardReverse(this.juridicalIdCardReverse);
        buildInformationDO.setJuridicalHandheldIdCardFront(this.juridicalHandheldIdCardFront);
        buildInformationDO.setJuridicalHandheldIdCardReverse(this.juridicalHandheldIdCardReverse);
        buildInformationDO.setSettlerIdCardFront(this.settlerIdCardFront);
        buildInformationDO.setSettlerIdCardReverse(this.settlerIdCardReverse);
        buildInformationDO.setSettlerIdCardNo(this.settlerIdCardNo);
        buildInformationDO.setSettlerBankPhotoUrl(this.settlerBankPhotoUrl);
        buildInformationDO.setSettlerBankNumber(this.settlerBankNumber);
        buildInformationDO.setSettlerBankMobile(this.settlerBankMobile);
        buildInformationDO.setSettlerBankName(this.settlerBankName);
        buildInformationDO.setAuthorizationUrl(this.authorizationUrl);
        buildInformationDO.setRelationshipProve(this.relationshipProve);
        buildInformationDO.setAccountOpeningPermit(this.accountOpeningPermit);
        return buildInformationDO;
    }

}
