package org.springblade.yeePay.entity.saas.trade;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

@NoArgsConstructor
@AllArgsConstructor
@Data
@Builder
@ApiModel("申请分账资金归还入参")
public class DivideBackDto {

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

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

	@NotBlank
	@ApiModelProperty(value = "商户收款请求号", required = true)
	private String orderId;

	@NotBlank
	@ApiModelProperty(value = "易宝收款订单号", required = true)
	private String uniqueOrderNo;

	@NotBlank
	@ApiModelProperty(value = "商户分账资金归还请求号", required = true)
	private String divideBackRequestId;

	@NotBlank
	@ApiModelProperty(value = "原分账的商户请求号", required = true)
	private String divideRequestId;

	@ApiModelProperty(value = "分账资金归还明细")
	private DivideBackDetail divideBackDetail;
}

@NoArgsConstructor
@AllArgsConstructor
@Data
@Builder
@ApiModel("分账资金归还明细")
class DivideBackDetail {

	@ApiModelProperty(value = "分账退回金额")
	private String amount;

	@ApiModelProperty(value = "易宝分账明细单号,分账完成后易宝返回")
	private String divideDetailNo;

	@ApiModelProperty(value = "退回原因")
	private String divideBackReason;

}
