
package com.bjtdba.userCenter.dto.request;

import lombok.Data;

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

@Data
public class UserContributeModifyRequest {
    @Valid
    @NotNull(message = "用户ID不能为空")
    private Integer uid;

    private Integer merId;

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

    @Valid
    @NotNull(message = "贡献值状态不能为空")
    @Min(value = -1, message = "贡献值状态取值错误")
    @Max(value = 1, message = "贡献值状态取值错误")
    private Integer status; // '贡献值状态1-有效 0-失效 -1待确认'

    private String mark;
    private String desc;
    private String orderId;

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

    @Valid
    @NotNull(message = "贡献值类型不能为空")
    @Min(value = 1, message = "贡献值类型取值错误")
    @Max(value = 2, message = "贡献值类型取值错误")
    private Integer type; // '贡献值状态1-有效 0-失效 -1待确认'
}

