package com.ruoyi.info.order.domain.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.info.order.enums.RefundStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 售后订单业务对象 tb_order_refund
 *
 * @author ruoyi
 * @date 2025-09-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("售后订单业务对象")
public class OrderRefundBo extends BaseEntity {

    /**
     * ID
     */
    @ApiModelProperty(value = "ID", required = true)
    private Long id;

    /**
     * 订单ID
     */
    @ApiModelProperty(value = "订单ID", required = true)
    @NotNull(message = "订单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderId;

    /**
     * 退款原因
     */
    @ApiModelProperty(value = "退款原因", required = true)
    @NotBlank(message = "退款原因不能为空", groups = { AddGroup.class, EditGroup.class })
    private String refundReason;

    /**
     * 退款数量
     */
    @ApiModelProperty(value = "退款数量", required = true)
    @NotNull(message = "退款数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer refundQuantity;

    /**
     * 退款金额
     */
    @ApiModelProperty(value = "退款金额", required = true)
    @NotNull(message = "退款金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal refundAmount;

    /**
     * 退款方式
     */
    @ApiModelProperty(value = "退款方式", required = true)
    private String refundWay;

    /**
     * 退款说明
     */
    @ApiModelProperty(value = "退款说明", required = true)
    private String refundDesc;

    /**
     * 退款状态
     */
    @ApiModelProperty(value = "退款状态", required = true)
    private RefundStatus refundStatus;

    /**
     * 实退金额
     */
    @ApiModelProperty(value = "实退金额", required = true)
    private BigDecimal actualRefundAmount;

    /**
     * 操作原因
     */
    @ApiModelProperty(value = "操作原因", required = true)
    private String operationReason;

    /**
     * 操作时间
     */
    @ApiModelProperty(value = "操作时间", required = true)
    private Date operationTime;

    /**
     * 操作人
     */
    @ApiModelProperty(value = "操作人", required = true)
    private Long operatorId;


}
