package com.sqx.modules.activity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 时段优惠活动类型
 * @author : codingliang
 * @date : 2024-6-17
 */
@ApiModel(value = "时段优惠信息")
@Data
public class ActivityOfTimeIntervalDTO implements Serializable {

    @ApiModelProperty(value = "开始时间;HH:mm", required = true)
    @NotBlank(message = "时段优惠信息不能为空")
    private String startTime;

    @ApiModelProperty(value = "结束时间;HH:mm", required = true)
    @NotBlank(message = "时段优惠信息不能为空")
    private String endTime;

    @ApiModelProperty(value = "折扣内容;取值范围(0-10)，金额折扣", required = true)
    @NotNull(message = "时段优惠信息折扣内容不能为空")
    @Range(min = 0, max = 10, message = "时段优惠信息折扣内容取值范围(0-10)")
    private Double discountContent;
}