/*
 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:09:59
*/


-- ----------------------------
-- Table structure for ai_knowledge
-- ----------------------------
DROP TABLE IF EXISTS "public"."ai_knowledge";
CREATE TABLE "public"."ai_knowledge" (
  "id" uuid NOT NULL DEFAULT gen_random_uuid(),
  "name" varchar(255) COLLATE "pg_catalog"."default",
  "description" text COLLATE "pg_catalog"."default",
  "created_at" timestamptz(6),
  "created_by" uuid,
  "is_active" bool DEFAULT true,
  "available_module" json
)
;
COMMENT ON COLUMN "public"."ai_knowledge"."id" IS '主键';
COMMENT ON COLUMN "public"."ai_knowledge"."name" IS '知识库名称';
COMMENT ON COLUMN "public"."ai_knowledge"."description" IS '描述';
COMMENT ON COLUMN "public"."ai_knowledge"."created_at" IS '创建时间';
COMMENT ON COLUMN "public"."ai_knowledge"."created_by" IS '外键，创建人，用户id';
COMMENT ON COLUMN "public"."ai_knowledge"."is_active" IS '是否可用';
COMMENT ON COLUMN "public"."ai_knowledge"."available_module" IS '所属功能模块';
COMMENT ON TABLE "public"."ai_knowledge" IS 'AI知识库';

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