package com.fzm.mall.server.admin.user_center.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/3/23 15:09
 * @description 会员设置
 * @since JDK 1.8
 */
@Data
@ApiModel(value = "MemberDTO会员", description = "会员信息")
public class MemberConfigDTO {

    @ApiModelProperty("会员等级")
    @Min(value = 0, message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer level;

    @ApiModelProperty("累计消费额")
    @DecimalMin(value = "0", message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal totalConsume;

    @ApiModelProperty("累计推荐人数")
    @Min(value = 0, message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer totalRecommend;

    @ApiModelProperty("会员费")
    @DecimalMin(value = "0", message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal fee;

}
