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

import java.math.BigDecimal;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.ruoyi.common.core.interfaces.LogBizParam;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@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("退款原因")
    @Size(max = 200, message = "退款原因不允许超过200个字符")
    private String reason;

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

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

    @ApiModelProperty("退款方式（1-自动退款，2-管理员退款）")
    private String type;

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

}
