package com.bjtdba.userCenter.dto.request;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.math.BigDecimal;

@Data
public class UserScoreModifyRequest {
    private Integer uid;

    @Valid
    @NotNull(message = "积分类型不能为空")
    @Min(value = 1, message = "积分类型取值错误")
    @Max(value = 2, message = "积分类型取值错误")
    private Integer pm; // 1-收入 2-支出

    @Valid
    @NotNull(message = "积分值不能为空")
    @DecimalMin(value = "0.01", message = "积分值必须大于0")
    private BigDecimal rewardScore;


    private String orderId;

    @Valid
    @NotBlank(message = "订单类型不能为空")
    private String orderType;
}
