/*
 Navicat Premium Dump SQL

 Source Server         : 智能控制平台
 Source Server Type    : PostgreSQL
 Source Server Version : 150013 (150013)
 Source Host           : 10.10.10.9:5432
 Source Catalog        : ktor2
 Source Schema         : public

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

 Date: 18/09/2025 16:10:54
*/


-- ----------------------------
-- Table structure for videos
-- ----------------------------
DROP TABLE IF EXISTS "public"."videos";
CREATE TABLE "public"."videos" (
  "id" uuid NOT NULL DEFAULT gen_random_uuid(),
  "name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "object_name" varchar(255) COLLATE "pg_catalog"."default",
  "start_datetime" timestamp(0) NOT NULL,
  "file_name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "duration" float4 NOT NULL,
  "size" float4 NOT NULL,
  "video_codec" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "audio_codec" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "overall_bit_rate" int4 NOT NULL,
  "resolution" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "a_time" timestamp(0) NOT NULL,
  "a_total_people" int4 NOT NULL,
  "a_count_people" int4 NOT NULL,
  "a_max_stay_time" float4 NOT NULL,
  "a_max_action" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "a_average_masked_ratio" float4 NOT NULL
)
;
COMMENT ON COLUMN "public"."videos"."id" IS '主键';
COMMENT ON COLUMN "public"."videos"."name" IS '任务名称';
COMMENT ON COLUMN "public"."videos"."object_name" IS 'oss中的对象名';
COMMENT ON COLUMN "public"."videos"."start_datetime" IS '视频日期开始时间';
COMMENT ON COLUMN "public"."videos"."file_name" IS '视频文件名';
COMMENT ON COLUMN "public"."videos"."duration" IS '视频时长';
COMMENT ON COLUMN "public"."videos"."size" IS '视频文件大小';
COMMENT ON COLUMN "public"."videos"."video_codec" IS '视频编码格式';
COMMENT ON COLUMN "public"."videos"."audio_codec" IS '音频编码格式';
COMMENT ON COLUMN "public"."videos"."overall_bit_rate" IS '总体比特率';
COMMENT ON COLUMN "public"."videos"."resolution" IS '视频分辨率';
COMMENT ON COLUMN "public"."videos"."a_time" IS '分析时间';
COMMENT ON COLUMN "public"."videos"."a_total_people" IS '分析结果：出现最大人数';
COMMENT ON COLUMN "public"."videos"."a_count_people" IS '分析结果：出现人次';
COMMENT ON COLUMN "public"."videos"."a_max_stay_time" IS '分析结果：单人最大停留时间';
COMMENT ON COLUMN "public"."videos"."a_max_action" IS '分析结果：最多出现的动作';
COMMENT ON COLUMN "public"."videos"."a_average_masked_ratio" IS '分析结果：口罩平均佩戴率';
COMMENT ON TABLE "public"."videos" IS '视频分析-动作识别任务';

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