package com.ylx.order.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.ylx.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Accessors(chain = true)
@ApiModel(value = "AfterSalesService", description = "售后服务表")
public class AfterSalesService extends BaseEntity {
    private static final long serialVersionUID = -4127766374308440702L;

    @ApiModelProperty("主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("售后单号")
    private String serviceNo;

    @ApiModelProperty("关联的主订单ID")
    private Long orderId;

    @ApiModelProperty("发起售后的用户ID")
    private Long userId;

    @ApiModelProperty("售后状态：0=待审核, 1=审核通过(退款中), 2=审核拒绝, 3=退款成功, 4=退款失败 ")
    private Integer status;

    @ApiModelProperty("售后原因")
    private String reason;

    @ApiModelProperty("退款金额")
    private BigDecimal actualRefundAmount;

    @ApiModelProperty("退款规则描述")
    private String refundDesc;

    @ApiModelProperty("审核人ID")
    private Long auditUserId;

    @ApiModelProperty("审核时间")
    private LocalDateTime auditTime;

    @ApiModelProperty("拒绝原因")
    private String rejectReason;

    @ApiModelProperty("审核备注")
    private String auditRemark;

    @ApiModelProperty("退款成功时间")
    private LocalDateTime refundSuccessTime;

    @TableLogic
    @ApiModelProperty("是否删除 0=否，1=是")
    private Integer isDelete;
}
