/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.guosen.bussinessRegisterRequest.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springblade.core.mp.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.guosen.bussinessRateStrategy.entity.BussinessRateStrategy;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 实体类
 *
 * @author BladeX
 * @since 2021-09-22
 */
@Data
@TableName("cyzh_bussiness_register_request")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "BussinessRegisterRequest对象", description = "BussinessRegisterRequest对象")
public class BussinessRegisterRequest extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 入网请求号	示例值：YBRWQQH20210622XXXXXX
	*/
		@ApiModelProperty(value = "入网请求号	示例值：YBRWQQH20210622XXXXXX")
		private String requestNo;
	/**
	 * 商户主体ID
	 */
	@NotNull
	@ApiModelProperty(value = "商户主体ID")
	private Long bussinessInfoId;
	/**
	 * 入网商户的业务角色：	SETTLED_MERCHANT:入驻商户；	SHARE_MERCHANT：分账接收方（仅允许开通结算产品，到银行账户）		非必填，不填默认为入驻商户		a. 入驻商户：	1、只能入驻到特定平台商的下级；2、目前仅支持事业单位/社会团体/企业/个体工商户的签约类型商户；	b. 分账接收方：	1、只能作为特定平台商的下级商户；2、目前仅支持事业单位/社会团体/企业/个体工商户的签约类型商户。	示例值：SETTLED_MERCHANT
	 */
	@ApiModelProperty(value = "入网商户的业务角色：	SETTLED_MERCHANT:入驻商户；	SHARE_MERCHANT：分账接收方（仅允许开通结算产品，到银行账户）		非必填，不填默认为入驻商户		a. 入驻商户：	1、只能入驻到特定平台商的下级；2、目前仅支持事业单位/社会团体/企业/个体工商户的签约类型商户；	b. 分账接收方：	1、只能作为特定平台商的下级商户；2、目前仅支持事业单位/社会团体/企业/个体工商户的签约类型商户。	示例值：SETTLED_MERCHANT")
	private String businessRole;
	/**
	* 商户主体信息
	*/
		@ApiModelProperty(value = "商户主体信息")
		private String merchantSubjectInfo;
	/**
	* 商户法人信息
	*/
		@ApiModelProperty(value = "商户法人信息")
		private String merchantCorporationInfo;
	/**
	* 商户联系人信息
	*/
		@ApiModelProperty(value = "商户联系人信息")
		private String merchantContactInfo;

	/**
	* 产品资质信息
	*/
		@ApiModelProperty(value = "产品资质信息")
		private String productQualificationInfo;
	/**
	* 经营地址
	*/
		@ApiModelProperty(value = "经营地址")
		private String businessAddressInfo;
	/**
	 * 开通产品信息
	 */
	@ApiModelProperty(value = "开通产品信息")
	private String productInfo;
	/**
	* 1、用于接收电子签章地址，完成协议签署；	2、用于接收审核已驳回状态下的原因；	3、用于接收入网完成的通知。
	*/
		@ApiModelProperty(value = "1、用于接收电子签章地址，完成协议签署；	2、用于接收审核已驳回状态下的原因；	3、用于接收入网完成的通知。")
		private String notifyUrl;

	@ApiModelProperty(value = "第三方入网申请单号")
		private String applicationNo;

		@ApiModelProperty(value = "第三方生成的商户编号")
		private String merchantNo;

	@ApiModelProperty(value = "入网审核状态")
	private Integer applicationStatus;

	@ApiModelProperty(value = "签约地址")
	private String agreementSignUrl;

	@ApiModelProperty(value = "审核意见")
	private String auditOpinion;

	@ApiModelProperty(value = "响应描述")
	private String returnMsg;

	@ApiModelProperty(value = "第三方响应日志数据")
	private String thirdLog;

	/**
	 * 商户主体ID
	 */
	@ApiModelProperty(value = "小微主体ID")
	private Long userInfoId;

	@ApiModelProperty(value = "结算账户信息")
	private String accountInfo;

	/**
	 * 付款场景
	 */
	@TableField(exist = false)
	private String paymentScene;

	/**
	 * 付款业务协议图片/附件
	 */
	@TableField(exist = false)
	private String agreementPhotoUrl;

	/**
	 * 	付款业务系统截图/附件
	 */
	@TableField(exist = false)
	private String systemScreenshotUrl;

	/**
	 * 特批开通流程/截图
	 */
	@TableField(exist = false)
	private String specialPermitProcessUrl;

	@TableField(exist = false)
	private String thirdAgreementPhotoUrl;

	@TableField(exist = false)
	private String thirdSystemScreenshotUrl;

	@TableField(exist = false)
	private String thirdSpecialPermitProcessUrl;

	public String toProductQualificationInfo() {
		return "{" +
				"\"paymentScene\":" + "\"" + paymentScene + '\"' +
				", \"agreementPhotoUrl\":" + "\"" + thirdAgreementPhotoUrl + '\"' +
				", \"systemScreenshotUrl\":" + "\"" + thirdSystemScreenshotUrl + '\"' +
				", \"specialPermitProcessUrl\":" + "\"" + thirdSpecialPermitProcessUrl + '\"' +
				'}';
	}
}
