package com.cool.store.request.fees;

import com.cool.store.common.InsertGroup;
import com.cool.store.common.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 加盟费用标准收费额配置 新增/修改请求
 */
@Data
public class FeeStandardConfigAddRequest {

    @ApiModelProperty("配置id")
    @NotNull(message = "配置id不能为空", groups = {UpdateGroup.class})
    private Long id;

    @ApiModelProperty(value = "加盟品牌", required = true)
    @NotNull(message = "加盟品牌不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private Integer joinBrand;

    @ApiModelProperty(value = "费用类型", required = true)
    @NotNull(message = "费用类型不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String expenseType;

    @ApiModelProperty(value = "金额", required = true)
    @Digits(integer = 10, fraction = 2, message = "金额整数位最多10位，小数位最多2位")
    @NotNull(message = "金额不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private BigDecimal amount;
}


