package com.repair.model.pojo;

import com.baomidou.mybatisplus.annotation.*;
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="RepairPayRecord对象", description="")
public class RepairPayRecord 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 = "支付人员不能为空")
    private Integer userId;

    @ApiModelProperty(value = "支付流水号（对应微信的）")
    @NotBlank(message = "支付流水号不能为空")
    private String payNo;

    @ApiModelProperty(value = "交易金额")
    @NotNull(message = "交易金额不能为空")
    private BigDecimal payPrice;

    @ApiModelProperty(value = "是否支付成功 未支付/等待支付：1；支付成功：2；支付失败：3")
    @NotNull(message = "支付状态不能为空")
    private Integer isSuccess;

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

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

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

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

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

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


}
