package io.renren.common.vo.trans;

import javax.validation.constraints.NotBlank;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 外部代发申请 请求参数
 * @author lsy
 */

@Data
@ApiModel(value = "外部代发申请")
public class TransferReq {
	
	@ApiModelProperty(value = "手续费金额。单位为元，精确到小数点后两位。会自动收取到平台商户的自有资金账户。支持低于订单总金额的20%，或者低于10元但不高于订单金额。")
	private String feeAmount;
	
	@NotBlank(message = "amount is not null")
	@ApiModelProperty(value = "订单总金额，单位为元，精确到小数点后两位。")
	private String amount;
	
	@ApiModelProperty(value = "交易附言。单笔金额大于等于5w必须提供")
	private String postscript;
    
	private PayerInfo payerInfo;
	
    private PayeeInfo payeeInfo;

	
	/**
	 * 付款方信息
	 */
	@Data
	public class PayerInfo{
		@NotBlank(message = "payerType is not null")
		@ApiModelProperty(value = "付款方类型。用户：USER；平台商户：MERCHANT")
		private String payerType;
		
		@NotBlank(message = "payerId is not null")
		@ApiModelProperty(value = "付款方标识")
		private String payerId;
		
		@NotBlank(message = "payerAccttype is not null")
		@ApiModelProperty(value = "付款方类型为商户时需要指定平台商户账户类型。USEROWN：用户自有可用账户;MCHOWN：平台商户自有可用账户")
		private String payerAccttype;
		
		@ApiModelProperty(value = "支付密码")
		private String password;
		
		@ApiModelProperty(value = "密码随机因子key")
		private String randomKey;
		
		@ApiModelProperty(value = "委托代发协议号")
		private String papAgreeNo;
	}
	
	/**
	 * 收款方信息
	 */
	@Data
	public class PayeeInfo{
		@NotBlank(message = "payeeType is not null")
		@ApiModelProperty(value = "收款方类型。对私银行账户：BANKACCT_PRI;对公银行账户：BANKACCT_PUB")
		private String payeeType;
		
		@NotBlank(message = "bankAcctno is not null")
		@ApiModelProperty(value = "银行账号")
		private String bankAcctno;
		
		@NotBlank(message = "bankAcctname is not null")
		@ApiModelProperty(value = "户名")
		private String bankAcctname;
		
		@ApiModelProperty(value = "银行编码。收款方类型为对公银行账户必须。")
		private String bankCode;
		
		@ApiModelProperty(value = "大额行号。银行大额行号，收款方类型为对公银行账户必须。")
		private String cnapsCode;
	}
}
