
package com.tmerclub.cloud.distribution.dto;

import com.tmerclub.cloud.common.util.PriceUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author cl
 * @date 2021-08-17 09:30:56
 */
public class AppDistributionWithdrawCashDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "提现金额(元)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "提现金额不能为空")
    @Max(value = PriceUtil.MAX_AMOUNT, message = "最大值不可以超过" + PriceUtil.MAX_AMOUNT)
    @Min(value = 1, message = "最小提现金额为1元")
    private BigDecimal amount;


    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    @Override
    public String toString() {
        return "AppDistributionWithdrawCashDTO{" +
                "amount=" + amount +
                '}';
    }
}
