package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * OCR图片上传记录表
 *
 * @author system
 * @since 2025-01-XX
 */
@Data
@JsonInclude
@TableName("ocr_image_uploads")
@ApiModel(value = "OcrImageUpload对象", description = "OCR图片上传记录表")
public class OcrImageUpload implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "用户ID（上传图片的用户唯一标识）")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "店铺ID（若图片关联具体店铺，可为NULL表示无店铺关联）")
    @TableField("store_id")
    private String storeId;

    @ApiModelProperty(value = "店铺用户ID（店铺内上传图片的操作员ID，与store_id配套使用）")
    @TableField("store_user_id")
    private String storeUserId;

    @ApiModelProperty(value = "图片存储路径（本地路径或云存储URL，如OSS / S3地址）")
    @TableField("image_url")
    private String imageUrl;

    @ApiModelProperty(value = "OCR识别结果（JSON格式或纯文本，存储识别后的文字内容）")
    @TableField("ocr_result")
    private String ocrResult;

    @ApiModelProperty(value = "OCR识别类型")
    @TableField("ocr_type")
    private String ocrType;

    @ApiModelProperty(value = "图片上传时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "记录更新时间（如OCR状态变更时间）")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
}

