package org.jeecg.module.custom.ocr.dataobject;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.jeecg.module.custom.ocr.common.dto.BaseDto;
import org.jeecg.module.custom.ocr.utils.requestFormat.SearchQuery;

import java.io.Serializable;

/**
 * 图片信息表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "图片信息表", description = "图片信息表")
@TableName(value = "ocr_picture")
public class OcrPicture implements BaseDto, Serializable {

    private static final long serialVersionUID = -10378331243377607L;
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "ID")
    private Long id;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "task_id")
    private Long taskId;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "image_no")
    private Long imageNo;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "image_url")
    private String imageUrl;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "image_type")
    private String imageType;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "image_status")
    private String imageStatus;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "local_image_url")
    private String localImageUrl;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "max_similarity_score")
    private String maxSimilarityScore;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "similarity_score")
    private String similarityScore;

    @TableField(value = "history")
    private Boolean history;

    @TableField(value = "img_hash")
    private String imgHash;

    @Override
    public String getQueryFiled(String filedname) {
        return "";
    }

    @Override
    public SearchQuery getSearchQueryrolesShowleave() {
        return null;
    }
}
