package com.fzm.mall.server.admin.finance_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.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author wangp
 * @date 2021/5/12 11:23
 * @description 用户资产充值或扣除
 * @since JDK 1.8
 */
@Data
@ApiModel(value = "UserAssetsChangeDTO", description = "用户资产充值或扣除")
public class UserAssetsChangeDTO {
    @ApiModelProperty("用户账户")
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String account;

    @ApiModelProperty("用户uid")
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String uid;

    @ApiModelProperty("转账数量")
    @DecimalMin(value = "0", message = MallResponseError.VALUE_LT_0_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal amount;
}
