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 org.springblade.yeePay.entity.MerchantInfo;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;

@NoArgsConstructor
@AllArgsConstructor
@Data
@Builder
@ApiModel("生成聚合订单码入参")
public class PayLinkOrderDto extends MerchantInfo {


	@NotBlank
	@ApiModelProperty(value = "商户收款请求号。可包含字母、数字、下划线；需保证在商户端不重复", required = true)
	private String orderId;

	@NotBlank
	@ApiModelProperty(value = "简单描述订单信息或商品简介", required = true)
	private String goodsName;

	@NotBlank
	@ApiModelProperty(value = "订单金额", required = true)
	private BigDecimal amount;

	@NotBlank
	@ApiModelProperty(value = "订单过期时间，格式为yyyy-MM-dd HH:mm:ss", required = true)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private String expiredTime;

	/**
	 * 示例值：https://notify.merchant.com/xxx
	 */
	@NotBlank
	@ApiModelProperty(value = "业务上是必须参数，支付成功服务器回调地址：支付成功通知、超时通知、失败通知", required = true)
	private String notifyUrl;

	/**
	 * 场景
	 * ONLINE:线上
	 * OFFLINE:线下
	 * BAOXIAN:保险
	 */
	@ApiModelProperty(value = "场景")
	private String scene;

	@ApiModelProperty(value = "分账标识。不传，默认不分账DELAY_SETTLE：分账合单收款场景中，请在子单域信息subOrderDetail里提供")
	private YeepayApiConstant.fundProcessType fundProcessType;

	@ApiModelProperty(value = "商家的公众号id")
	private String appId;
}
