package com.ruoyi.ss.vipLevel.domain;

import java.math.BigDecimal;

import com.ruoyi.common.core.domain.ValidGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.*;

/**
 * 会员等级对象 ss_vip_level
 *
 * @author ruoyi
 * @date 2024-12-09
 */
@Data
public class VipLevel extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "商户ID")
    @ApiModelProperty("商户ID")
    @NotNull(message = "商户不允许为空", groups = {ValidGroup.Create.class})
    private Long mchId;

    @Excel(name = "等级名称")
    @ApiModelProperty("等级名称")
    @NotBlank(message = "等级名称不允许为空", groups = {ValidGroup.Create.class, ValidGroup.FrontCreate.class})
    @Size(max = 30, message = "等级名称长度不能超过30个字符")
    private String name;

    @Excel(name = "折扣")
    @ApiModelProperty("折扣")
    @Min(value = 0, message = "折扣不允许小于0折")
    @Max(value = 10, message = "折扣不允许大于10折")
    private BigDecimal discount;

    @Excel(name = "描述文本")
    @ApiModelProperty("描述文本")
    @Size(max = 1000, message = "描述不允许超过1000个字符")
    private String description;

}
