package com.repair.model.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * <p>
 *
 * </p>
 *
 * @author ceshi
 * @since 2023-07-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="RepairRefundRecord对象", description="")
public class RepairRefundRecord implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "报修记录ID")
    @NotNull(message = "报修记录不能为空")
    private Integer recordId;

    @ApiModelProperty(value = "被退款人员ID")
    @NotNull(message = "被退款人不能为空")
    @JsonIgnore
    private Integer userId;

    @ApiModelProperty(value = "商户退款单号（对应微信的）")
    @NotBlank(message = "商户退款单号不能为空")
    @JsonIgnore
    private String wxNo;

    @ApiModelProperty(value = "微信退款单号（对应微信的）")
    @NotBlank(message = "微信退款单号不能为空")
    @JsonIgnore
    private String refundNo;

    @ApiModelProperty(value = "退款金额")
    @NotNull(message = "退款金额不能为空")
    private BigDecimal refundPrice;

    @ApiModelProperty(value = "是否退款成功 退款中0；退款成功1；退款失败2")
    @NotNull(message = "退款状态不能为空")
    private Integer isSuccess;

    @ApiModelProperty(value = "审批状态 待审批：0；通过：1；驳回：2")
    private Integer approve;

    @ApiModelProperty(value = "申请人")
    private String approveUser;

    @ApiModelProperty(value = "审批人")
    private String approvedUser;

    @ApiModelProperty(value = "备注")
    @NotBlank(message = "备注不能未空")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonIgnore
    private Date updateTime;

    @ApiModelProperty(value = "创建人员")
    @TableField(fill = FieldFill.INSERT)
    @JsonIgnore
    private String createUser;

    @ApiModelProperty(value = "更新人员")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonIgnore
    private String updateUser;

    @ApiModelProperty(value = "逻辑删除 未删除：0；删除：1")
    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    @JsonIgnore
    private Integer deleted;


}
