package org.springblade.yeePay.entity;

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;
import javax.validation.constraints.NotNull;

@Data
@Builder
@ApiModel("转账入参实体")
@NoArgsConstructor
@AllArgsConstructor
public class TransferDto {

	@ApiModelProperty(value = "单位：元，非负浮点数，保留2位小数,示例值：1000.00",required = true)
	@NotNull
	Double orderAmount;

	@ApiModelProperty(value = "手续费承担方(若不传默认付款方)\n" +
		"可选项如下:\n" +
		"PAYER:付款方\n" +
		"PAYEE:收款方\n" +
		"示例值：当商户承担且计费方式为预付实扣或后收时，不支持收款方承担；当平台商或服务商承担时无需指定此手续费承担方；",required = false)
	String feeChargeSide;

	@NotBlank
	@ApiModelProperty(value = "到账类型\n" +
		"可选项如下:\n" +
		"REAL_TIME:实时\n" +
		"TWO_HOUR:两小时到账\n" +
		"NEXT_DAY:次日到账（无特殊情况资金于次日上午7点左右到收款银行账户中）\n" +
		"示例值：REAL_TIME",required = true)
	String receiveType;

	@ApiModelProperty(value = "收款帐户的卡号",required = true)
	@NotBlank
	String receiverAccountNo;

	@NotBlank
	@ApiModelProperty(value = "收款方开户名",required = true)
	String receiverAccountName;

	@ApiModelProperty(value = "收款方开户行\n" +
		"银行卡所在开户行编号，详见\n" +
		"https://open.yeepay.com/attachments/2020/07/23/doc_FFTv15d8TY_1595490360236.xlsx?fileName=%E6%80%BB%E8%A1%8C%E5%8F%8A%E7%9B%B8%E5%BA%94%E6%94%AF%E8%A1%8C%E7%BC%96%E7%A0%81.xlsx\n" +
		"示例值：ICBC",required = true)
	@NotBlank
	String receiverBankCode;

	@NotBlank
	@ApiModelProperty(value = "账户类型\n" +
		"可选项如下:\n" +
		"DEBIT_CARD:借记卡\n" +
		"CREDIT_CARD:贷记卡\n" +
		"QUASI_CREDIT_CARD:准贷卡\n" +
		"PASSBOOK:存折\n" +
		"UNIT_SETTLE_CARD:单位结算卡\n" +
		"PUBLIC_CARD:对公卡\n" +
		"示例值：DEBIT_CARD",required = true)
	String bankAccountType;

	@ApiModelProperty("支行编码\n" +
		"详见 https://open.yeepay.com/attachments/2020/08/06/doc_6PhAgFxEau_1596701395666.xlsx?fileName=%E6%94%AF%E8%A1%8C%E4%BF%A1%E6%81%AF20200826.xlsx")
	String branchBankCode;

	@ApiModelProperty("银行附言\n" +
		"展示在收款银行系统中的附言，由数字、字母、汉字组成（最终附言内容以银行实际账单为准）\n" +
		"示例值：xx平台付款")
	String comments;

	@ApiModelProperty("终端类型\n" +
		"可选项如下:\n" +
		"PC:电脑\n" +
		"PHONE:手机\n" +
		"PAD:平板\n" +
		"NFC:可穿戴设备\n" +
		"DTV:数字电视\n" +
		"MPOS:条码支付受理终端\n" +
		"OTHER:其他\n" +
		"示例值：PC")
	String terminalType;

	@ApiModelProperty("商户通知地址，不传则不通知回调内容请参看：付款结果通知\n" +
		"示例值：http://www.baidu.com")
	String notifyUrl;

	@ApiModelProperty(value = "请求订单号，自定义生成，唯一",required = true)
	String requestNo;


	/**
	 * 商户id
	 */

	private Long bussinessId;

	/**
	 * 代付单号，每个商户唯一
	 */

	private String bussinessOrderId;
}
