package com.ylx.order.domain.dto;

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

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@ApiModel("客户端提交订单DTO")
public class OrderSubmitDTO implements Serializable {
    private static final long serialVersionUID = -4463081409198769872L;

    @NotNull(message = "商户ID不能为空")
    @ApiModelProperty("商户ID")
    private Long merchantId;

    @NotNull(message = "项目ID不能为空")
    @ApiModelProperty("项目ID")
    private Long projectId;

    @NotNull(message = "预约开始时间不能为空")
    @ApiModelProperty("预约开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime appointmentStartTime;

    @NotNull(message = "联系人地址ID不能为空")
    @ApiModelProperty("联系人地址ID")
    private Long addressId;

    @ApiModelProperty("优惠券id")
    private String couponId;

    @ApiModelProperty("交通费")
    private BigDecimal trafficFee;

    @NotNull(message = "支付方式不能为空")
    @ApiModelProperty("支付方式")
    private Integer paymentMethod;

}
