package com.gxwebsoft.glt.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 消费日志
 *
 * @author 科技小王子
 * @since 2026-02-03 18:55:55
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "GltUserTicketLog对象", description = "消费日志")
@TableName("glt_user_ticket_log")
public class GltUserTicketLog implements Serializable {
    private static final long serialVersionUID = 1L;

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

    @Schema(description = "用户水票ID")
    private Integer userTicketId;

    @Schema(description = "变更类型")
    private Integer changeType;

    @Schema(description = "可更改")
    private Integer changeAvailable;

    @Schema(description = "更改冻结状态")
    private Integer changeFrozen;

    @Schema(description = "已使用更改")
    private Integer changeUsed;

    @Schema(description = "可用后")
    private Integer availableAfter;

    @Schema(description = "冻结后")
    private Integer frozenAfter;

    @Schema(description = "使用后")
    private Integer usedAfter;

    @Schema(description = "订单ID")
    private Integer orderId;

    @Schema(description = "订单编号")
    private String orderNo;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "用户昵称")
    @TableField(exist = false)
    private String nickname;

    @Schema(description = "用户头像")
    @TableField(exist = false)
    private String avatar;

    @Schema(description = "用户手机号")
    @TableField(exist = false)
    private String phone;

    @Schema(description = "排序(数字越小越靠前)")
    private Integer sortNumber;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "状态, 0正常, 1冻结")
    private Integer status;

    @Schema(description = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
