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.common.YeepayApiConstant;

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

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("公众号配置接口")
public class WechatConfigAddDto {

	@NotBlank
	@ApiModelProperty(value = "发起方商户编号", required = true)
	String parentMerchantNo;

	@NotBlank
	@ApiModelProperty(value = "商户编号", required = true)
	String merchantNo;

	@ApiModelProperty(value = "支付授权目录列表")
	List<String> tradeAuthDirList;

	@ApiModelProperty(value = "支付appId目录列表JSON字符串；")
	List<AppIdList> appIdList;
}

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("支付appId目录")
class AppIdList {

	@ApiModelProperty(value = "支付appId")
	String appId;

	@ApiModelProperty(value = "支付appSecret")
	String appSecret;

	@ApiModelProperty(value = "appId类型（OFFICIAL_ACCOUNT:公众号；MINI_PROGRAM:小程序）")
	YeepayApiConstant.appIdType appIdType;

	@ApiModelProperty(value = "推荐关注appId")
	String subscribeAppId;
}
