/*
 Navicat Premium Dump SQL

 Source Server         : ai
 Source Server Type    : PostgreSQL
 Source Server Version : 150012 (150012)
 Source Host           : localhost:5432
 Source Catalog        : ktor
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 150012 (150012)
 File Encoding         : 65001

 Date: 07/05/2025 15:11:54
*/


-- ----------------------------
-- Table structure for image
-- ----------------------------
DROP TABLE IF EXISTS "public"."image";
CREATE TABLE "public"."image" (
  "id" int4 NOT NULL DEFAULT nextval('image_id_seq'::regclass),
  "object_name" varchar(255) COLLATE "pg_catalog"."default",
  "upload_datetime" timestamp(6),
  "file_name" varchar(255) COLLATE "pg_catalog"."default",
  "resolution" varchar(255) COLLATE "pg_catalog"."default",
  "size" float8,
  "cocoon_count" int2,
  "max_confidence" float4,
  "min_confidence" float4,
  "average_confidence" float4,
  "other_info" json,
  "processing_time" timestamp(6)
)
;
COMMENT ON COLUMN "public"."image"."object_name" IS 'oss对象名称';
COMMENT ON COLUMN "public"."image"."upload_datetime" IS '图片上传时间';
COMMENT ON COLUMN "public"."image"."file_name" IS '图片原始文件名';
COMMENT ON COLUMN "public"."image"."resolution" IS '图片分辨率';
COMMENT ON COLUMN "public"."image"."size" IS '图片大小';
COMMENT ON COLUMN "public"."image"."cocoon_count" IS '识别到的蚕茧总数';
COMMENT ON COLUMN "public"."image"."max_confidence" IS '最高置信度';
COMMENT ON COLUMN "public"."image"."min_confidence" IS '最低置信度';
COMMENT ON COLUMN "public"."image"."average_confidence" IS '平均置信度';
COMMENT ON COLUMN "public"."image"."other_info" IS '识别到的其他信息（使用json表示）';
COMMENT ON COLUMN "public"."image"."processing_time" IS '分析耗时';

-- ----------------------------
-- Records of image
-- ----------------------------
INSERT INTO "public"."image" VALUES (1, 'sample_image_001.jpg', '2025-03-18 14:30:00', 'image_001.jpg', '1920x1080', 2.5, 15, 0.98, 0.75, 0.85, '{"camera_location":"Warehouse A","detected_objects":"Cocoons, Leaves"}', '2025-03-18 14:31:05');

-- ----------------------------
-- Primary Key structure for table image
-- ----------------------------
ALTER TABLE "public"."image" ADD CONSTRAINT "image_pkey" PRIMARY KEY ("id");
