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

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 org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;

@NoArgsConstructor
@AllArgsConstructor
@Data
@Builder
@ApiModel("自动提现-规则设置入参")
public class AutoWithdrawRuleSetDto {

	@NotBlank
	@ApiModelProperty(value = "发起方商户编号。*标准商户收付款方案中此参数与收款商户编号一致；*平台商户收付款方案中此参数为平台商商户编号；*服务商解决方案中，①标准商户收款时，该参数为标准商户商编 ②平台商收款或平台商入驻商户收款时，该参数为平台商商编。",required = true)
	private String parentMerchantNo;

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

	@ApiModelProperty(value = "银行账号:bindId和bankAccountNo至少填写一个")
	private String bankAccountNo;

	@ApiModelProperty(value = "提现卡id:bindId和bankAccountNo至少填写一个")
	private String bindId;

	/**
	 * 到账类型，可选项如下:
	 * REAL_TIME:实时
	 * TWO_HOUR:两小时
	 * NEXT_DAY:隔日
	 */
	@NotBlank
	@ApiModelProperty(value = "到账类型",required = true)
	private YeepayApiConstant.receiveType receiveType;

	@NotBlank
	@ApiModelProperty(value = "触发时间 格式: HH:mm  " +
		"(目前只支持以下时间点\n" +
		"08:00\n" +
		"10:00\n" +
		"12:00\n" +
		"14:00\n" +
		"16:00\n" +
		"18:00\n" +
		"20:00)",required = true)
	@DateTimeFormat(pattern = "HH:mm")
	private String triggerTime;

	@NotBlank
	@ApiModelProperty(value = "保留金额 自动提现时保留的账户余额",required = true)
	private String remainAmount;

	@ApiModelProperty(value = "银行附言")
	private String remark;
}
