package com.yida.data.common.core.entity.consume;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 消费订单退款信息Entity
 *
 * @author ZYJ
 * @date 2023-04-03 16:12:35
 */
@Data
@TableName("edu_consume_order_refund")
public class EduConsumeOrderRefund implements Serializable {

    private static final long serialVersionUID = -8611143615152970476L;

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

    /**
     * 订单编号
     */
    @ApiModelProperty(value = "订单编号")
    @TableField("order_code")
    private String orderCode;

    /**
     * 退款编号  R+订单编号
     */
    @ApiModelProperty(value = "退款编号  R+订单编号")
    @TableField("refund_code")
    private String refundCode;

    /**
     * 退款流水号  替换订单流水号首字母为R
     */
    @ApiModelProperty(value = "退款流水号  替换订单流水号首字母为R")
    @TableField("refund_serial_number")
    private String refundSerialNumber;

    /**
     * 实际退款时间
     */
    @ApiModelProperty(value = "实际退款时间")
    @TableField("refund_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime refundTime;

    /**
     * 退款理由
     */
    @ApiModelProperty(value = "退款理由")
    @TableField("refund_reason")
    private String refundReason;

    /**
     * 创建时间（退款申请时间）
     */
    @ApiModelProperty(value = "创建时间（退款申请时间）")
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /**
     * 创建人id（退款操作人）关联user表
     */
    @ApiModelProperty(value = "创建人id（退款操作人）关联user表")
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    /**
     * 修改人id
     */
    @ApiModelProperty(value = "修改人id")
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;
}