package com.ruoyi.ss.feeRule.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
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;

/**
 * 收费模板对象 ss_fee_rule
 *
 * @author qzz
 * @date 2024-11-20
 */
@Data
public class FeeRule extends BaseEntity{

    private static final long serialVersionUID = 1L;

    private Long ruleId;

    @Excel(name = "套餐模式：1-押金模式；2-套餐模式")
    @ApiModelProperty("套餐模式")
    @NotBlank(message = "套餐模式不能为空",groups = {ValidGroup.Create.class})
    private String mode;

    @Excel(name = "小时")
    @ApiModelProperty("小时")
    @NotNull(message = "小时不能为空",groups = {ValidGroup.Create.class})
    private Integer hours;

    @Excel(name = "售价")
    @ApiModelProperty("售价")
    @NotNull(message = "售价不能为空",groups = {ValidGroup.Create.class})
    private BigDecimal price;

    @Excel(name = "说明")
    @ApiModelProperty("说明")
    private String explain;

    @Excel(name = "商户id")
    @ApiModelProperty("商户id")
    @NotNull(message = "商户id不能为空",groups = {ValidGroup.Create.class})
    private Long merchantId;

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

    @Excel(name = "押金")
    @ApiModelProperty("押金")
    private BigDecimal deposit;

    @Excel(name = "押金自动退款时长")
    @ApiModelProperty("押金自动退款时长")
    private Integer refundDuration;

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

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

    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    @ApiModelProperty("开始使用时间")
    @NotNull(message = "开始使用时间不允许为空", groups = {ValidGroup.Create.class})
    private LocalTime useTimeStart;

    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    @ApiModelProperty("结束使用时间")
    @NotNull(message = "结束使用时间不允许为空", groups = {ValidGroup.Create.class})
    private LocalTime useTimeEnd;

}
