package com.fzm.mall.server.admin.opration.entity.dto;

import com.fzm.mall.server.admin.constant.MallResponseError;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author wangp
 * @date 2021/7/19 11:09
 * @description 推广佣金
 * @since JDK 1.8
 */
@Data
@ApiModel(value = "PopularizeCommissionSettingDTO", description = "推广佣金")
public class PopularizeCommissionSettingDTO {

    @ApiModelProperty(value = "ID--序号", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer sort;

    @ApiModelProperty(value = "会员等级（1，2，3，4，5）", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer memberLevel;

    @ApiModelProperty(value = "新人注册奖励（元）", required = true)
    @DecimalMin(value = "0", message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal registerAward;

    @ApiModelProperty(value = "推荐新人注册奖励（元）", required = true)
    @DecimalMin(value = "0", message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal recommendRegisterAward;

    @ApiModelProperty(value = "上次更新时间", required = true)
    @Min(value = 0, message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Long updateTime;

}
