package com.pjilisense.flxai.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pjilisense.flxai.handle.JsonbTypeHandler;
import com.pjilisense.flxai.handle.UUIDTypeHandler;
import lombok.Data;

import java.time.OffsetDateTime;
import java.util.Date;
import java.util.Map;
import java.util.UUID;

/**
 * ${comments}
 *
 * @author liushujing liushujing@philisense.com
 * @since 1.0.0 2025-01-14
 */
@Data
@TableName(value = "files", autoResultMap = true)
public class FilesEntity {

    /**
     * $column.comments
     */
	private String id;
    /**
     * $column.comments
     */
	private String userId;
    /**
     * $column.comments
     */
	private String fileType;
    /**
     * $column.comments
     */
	private String name;
    /**
     * $column.comments
     */
	private Integer size;
    /**
     * $column.comments
     */
	private String url;
    /**
     * $column.comments
     */
    @TableField(value = "metadata", typeHandler = JsonbTypeHandler.class)
	private Map<String,Object> metadata;
    /**
     * $column.comments
     */
	private OffsetDateTime createdAt;
    /**
     * $column.comments
     */
	private OffsetDateTime  updatedAt;
    /**
     * $column.comments
     */
	private String fileHash;
    /**
     * $column.comments
     */
    @TableField(typeHandler = UUIDTypeHandler.class)
	private UUID chunkTaskId;
    /**
     * $column.comments
     */
    @TableField(typeHandler = UUIDTypeHandler.class)
	private UUID embeddingTaskId;
    /**
     * $column.comments
     */
	private OffsetDateTime  accessedAt;
    /**
     * 文件分类1文档2问答
     */
	private String fileCategory;
    /**
     * 文件状态0删除1没有删除
     */
	private String fileStatus;
}