package org.springblade.yeePay.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Builder;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * @author: lianghanqiang
 * @description:  生成订单聚合码Dto
 * @since: 7/27/21 -- 10:37 AM
 */

@Builder
@Data
@ApiModel("订单聚合码入参实体")
public class CreateCodeDto {

	@ApiModelProperty(value = "订单号",required = true)
	@NotBlank
	String orderId;

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

	@NotNull
	@ApiModelProperty(value = "订单金额",required = true)
	Double amount;

	@NotNull
	@Pattern(message = "输入格式为 yyyy-MM-dd HH:mm:ss",regexp = "^((((1[6-9]|[2-9]\\d)\\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\\d|3[01]))|(((1[6-9]|[2-9]\\d)\\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\\d|30))|(((1[6-9]|[2-9]\\d)\\d{2})-0?2-(0?[1-9]|1\\d|2[0-8]))|(((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-)) (20|21|22|23|[0-1]?\\d):[0-5]?\\d:[0-5]?\\d$")
//	@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "订单过期时间",required = true,example = "yyyy-MM-dd HH:mm:ss")
	String expiredTime;

	@ApiModelProperty(value = "场景\n" +
		"ONLINE:线上\n" +
		"OFFLINE:线下\n" +
		"BAOXIAN:保险")
	String scene;

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

	@ApiModelProperty(value = "\t\n" +
		"商家的公众号id")
	String appId;

	@ApiModelProperty("支付回调地址")
	String notifyUrl;
}
