package com.ruoyi.ss.order.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.constant.DictTypeConstants;
import com.ruoyi.system.valid.DictValid;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class OrderDTO {

    /**----------------------------套餐start----------------------------*/

    /**
     * 套餐id
     */
    @ApiModelProperty("套餐id")
    @NotNull(message = "套餐id不允许为空")
    private Long ruleId;

    @ApiModelProperty("套餐：1-按小时计费；2-自定义模板")
    @NotBlank(message = "套餐不允许为空")
    @DictValid(type = DictTypeConstants.FEE_RULE_MODE, message = "非法的套餐")
    private String mode;

    @ApiModelProperty("小时")
    @NotNull(message = "小时不允许为空")
    private Integer hours;

    @ApiModelProperty("售价")
    @NotNull(message = "售价不允许为空")
    private BigDecimal price;

    /**----------------------------套餐end----------------------------*/

    @ApiModelProperty("预定开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "预定开始时间不允许为空")
//    @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", message = "预定开始时间格式不正确，应为 yyyy-MM-dd HH:mm:ss")
    private Date reserveStartTime;

    @ApiModelProperty("房间id")
    @NotNull(message = "房间id不允许为空")
    private Long roomId;

    @ApiModelProperty("支付方式：wx-微信，alipay-支付宝，ye-余额支付")
    @NotBlank(message = "支付方式不允许为空")
    @DictValid(type = DictTypeConstants.PAY_TYPE, message = "非法的支付方式")
    private String payType;

//    @ApiModelProperty("订单类型：1-茶室订单；2-棋牌订单；3-台球订单；4-货柜订单")
//    @NotBlank(message = "订单类型不允许为空")
//    @DictValid(type = DictTypeConstants.ORDER_TYPE, message = "非法的订单类型")
//    private String type;

    private String type2;

}
