package org.springblade.yeePay.entity.saas;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springblade.yeePay.entity.MerchantInfo;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * @author: lianghanqiang
 * @description: 特约商户入网(小微)
 * @since: 9/30/21 -- 1:58 PM
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("特约商户入网(小微)")
public class MicroInvitationDto extends MerchantInfo {
	@ApiModelProperty(value = "入网请求号",required = true)
	private String requestNo;

	@ApiModelProperty(value = "入网商户的业务角色",required = true)
	private String businessRole;

	@ApiModelProperty(value = "商户主体信息",required = true)
	private MerchantSubjectInfo merchantSubjectInfo;

	@ApiModelProperty(value = "商户法人信息",required = true)
	private MerchantCorporationInfo merchantCorporationInfo;

	@ApiModelProperty(value = "经营地址",required = true)
	private BusinessAddressInfo businessAddressInfo;

	@ApiModelProperty(value = "结算账户信息",required = false)
	private SettlementAccountInfo accountInfo;

	@ApiModelProperty(value = "开通产品信息",required = true)
	private List<InvitationDto.ProductInfo> productInfo;

	@ApiModelProperty(value = "产品资质信息",required = false)
	private ProductQualificationInfo productQualificationInfo;

	/**
	 * 1、用于接收电子签章地址，完成协议签署；
	 * 		2、用于接收审核已驳回状态下的原因；
	 * 		3、用于接收入网完成的通知。
	 * */
	@ApiModelProperty(value = "回调地址",required = true)
	private String notifyUrl;


	/**
	 * @author: lianghanqiang
	 * @description: 商户主体信息
	 * @since: 9/6/21 -- 1:48 PM
	 */
	@Data
	@NoArgsConstructor
	@AllArgsConstructor
	@ApiModel("商户主体信息")
	public class MerchantSubjectInfo {

		@NotBlank
		@ApiModelProperty(value = "商户签约名称",required = true)
		private String signName;

		@NotBlank
		@ApiModelProperty(value = "商户简称",required = true)
		private String shortName;

	}


	/**
	 * @author: lianghanqiang
	 * @description: 商户法人信息
	 * @since: 9/6/21 -- 1:59 PM
	 */
	@Data
	@ApiModel("商户法人信息")
	@NoArgsConstructor
	@AllArgsConstructor
	public class MerchantCorporationInfo {

		@ApiModelProperty(value = "法人手机号",required = true)
		private String mobile;

		@ApiModelProperty(value = "法人证件类型",required = true)
		private String legalLicenceType;

		@ApiModelProperty(value = "法人证件号码",required = true)
		private String legalLicenceNo;

		@ApiModelProperty(value = "法人身份证件正面照片",required = true)
		private String legalLicenceFrontUrl;

		@ApiModelProperty(value = "法人身份证件反面照片",required = true)
		private String legalLicenceBackUrl;
	}


	/**
	 * 	经营地址
	 * */
	@NoArgsConstructor
	@AllArgsConstructor
	@Data
	@ApiModel("经营地址")
	public class BusinessAddressInfo{

		@ApiModelProperty(value = "商户实际经营地所在省",required = true)
		private String province;

		@ApiModelProperty(value = "商户实际经营地所在市",required = true)
		private String city;

		@ApiModelProperty(value = "商户实际经营地所在区",required = true)
		private String district;

		@ApiModelProperty(value = "商户实际经营详细地址",required = true)
		private String address;
	}

	/**
	 * 	结算账户信息
	 * */
	@NoArgsConstructor
	@AllArgsConstructor
	@Data
	@ApiModel("结算账户信息")
	public class SettlementAccountInfo{

		@ApiModelProperty(value = "银行账户类型",required = false)
		private String bankAccountType;

		@ApiModelProperty(value = "银行账户号码",required = false)
		private String bankCardNo;

		@ApiModelProperty(value = "银行账户开户总行编码",required = false)
		private String bankCode;

		@ApiModelProperty(value = "结算方向",required = false)
		private String settlementDirection;
	}

	/**
	 * 	产品资质信息
	 * */
	@NoArgsConstructor
	@AllArgsConstructor
	@Data
	@ApiModel("产品资质信息")
	public class ProductQualificationInfo{

		@ApiModelProperty(value = "MCC码",required = false)
		private String mcc;

		@ApiModelProperty(value = "付款场景",required = false)
		private String paymentScene;

		@ApiModelProperty(value = "付款业务协议图片/附件",required = false)
		private String agreementPhotoUrl;

		@ApiModelProperty(value = "付款业务系统截图/附件",required = false)
		private String systemScreenshotUrl;

		@ApiModelProperty(value = "特批开通流程/截图",required = false)
		private String specialPermitProcessUrl;

	}
}
