package com.ruoyi.ss.feeRule.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.ValidGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalTime;
import java.util.List;

@Data
public class FeeRuleDTO {

    @ApiModelProperty("套餐id")
    @NotNull(message = "套餐id不允许为空", groups = {ValidGroup.Update.class})
    private Long ruleId;

    @Excel(name = "套餐模式：1-按小时计费（智能收费）；2-自定义模板")
    @NotBlank(message = "套餐模式不允许为空")
    private String mode;

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

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

    @ApiModelProperty("说明")
    @NotBlank(message = "说明不允许为空")
    private String explain;

    @ApiModelProperty("最低消费时长")
    private BigDecimal minHours;

    @ApiModelProperty("押金")
    private BigDecimal deposit;

    @ApiModelProperty("押金自动退款时长")
    private BigDecimal refundDuration;

    @ApiModelProperty("房间ids")
    private List<Long> roomIds;

    @Excel(name = "是否有时间限制")
    @ApiModelProperty("是否有时间限制")
    private Boolean isRestriction;

    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    @ApiModelProperty("开始使用时间")
    private LocalTime useTimeStart;

    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    @ApiModelProperty("结束使用时间")
    private LocalTime useTimeEnd;
}
