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

import com.fzm.mall.server.admin.annotation.CustomType;
import com.fzm.mall.server.admin.constant.MALLGlobalConfig;
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.NotNull;
import java.math.BigDecimal;

/**
 * @author wangp
 * @date 2021/3/24 12:22
 * @description 商户设置
 * @since JDK 1.8
 */
@Data
@ApiModel(value = "MerchantConfigDTO", description = "商户设置信息")
public class MerchantConfigDTO {

    @ApiModelProperty("商户等级")
    @CustomType(pType = MALLGlobalConfig.MERCHANT_SHIP, message = MallResponseError.PARAM_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 membershipFee;

    @ApiModelProperty("平台服务费（元/年）")
    @DecimalMin(value = "0", message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal serviceFee;

    @ApiModelProperty("平台抽成比例（%）")
    @DecimalMin(value = "0", message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal drawProportion;
}
