package org.dromara.main.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.main.domain.Refund;

import java.math.BigDecimal;

/**
 * 退款业务对象
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Refund.class, reverseConvertGenerate = false)
public class RefundBo extends BaseEntity {

    private Long id;

    @NotNull(message = "订单ID不能为空")
    private Long orderId;

    @NotNull(message = "退款金额不能为空")
    @DecimalMin(value = "0.01", message = "退款金额必须大于0")
    private BigDecimal refundAmount;

    @NotBlank(message = "退款原因不能为空")
    private String refundReason;

    private Long operatorId;

    private String operatorName;
}
