package com.sqx.modules.pay.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 订单支付dto
 *
 * @author : codingliang
 * @date : 2024-07-28 15:02
 */
@Data
@ApiModel("订单支付参数")
public class PayOrderDTO {
    @ApiModelProperty("订单id")
    @NotNull(message = "订单id不能为空")
    private Long parentId;

    @ApiModelProperty("支付方式 1表示微信支付、4或5表示支付宝支付")
    private Integer type;

    @ApiModelProperty("地址id")
    @NotNull(message = "地址id不能为空")
    private Long addressId;

    @ApiModelProperty("订单类型 1到店、2外卖")
    @NotNull(message = "订单类型不能为空")
    private Integer orderType;

    @ApiModelProperty("活动id")
    private Long activityId;

    @ApiModelProperty("是否预约单 1是、0否")
    @NotBlank(message = "是否预约单不能为空")
    @Pattern(regexp = "(0|1)", message = "是否预约单只能为0或1")
    private String reservationFlag;

    @ApiModelProperty("期待送达时间 yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expectDeliveryTime;

    @ApiModelProperty("身份证号")
    private String idCard;
}
