package com.ruoyi.bst.order.domain.dto;

import com.ruoyi.common.core.interfaces.LogBizParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

@Data
public class OrderRefundDTO implements LogBizParam {
    
    @ApiModelProperty("订单ID")
    @NotNull(message = "订单ID不允许为空")
    private Long orderId;

    @ApiModelProperty("退款金额")
    @NotNull(message = "退款金额不允许为空")
    @Min(value = 0, message = "退款金额不允许小于0")
    private BigDecimal amount;

    @ApiModelProperty("退款次数")
    @NotNull(message = "退款次数不能为空")
    @Min(value = 0, message = "退款次数不允许小于0")
    private Integer number;

    @ApiModelProperty("退款原因")
    @Size(max = 200, message = "退款原因不允许超过200个字符")
    private String reason;

    @ApiModelProperty("操作人ID")
    private Long userId;

    @ApiModelProperty("操作人名称")
    private String userName;


    @Override
    public Object logBizId() {
        return orderId;
    }

}
