DROP TABLE IF EXISTS "lqbz"."als_qa_history_t";
CREATE TABLE "lqbz"."als_qa_history_t"(
                                         id bigint NOT NULL,
                                         user_id VARCHAR2(255),
                                         question VARCHAR2(5000),
                                         answer TEXT,
                                         graph TEXT,
                                         oss_id bigint,
                                         file_name VARCHAR2(255),
                                         remarks VARCHAR2(900),
                                         tenant_id bigint,
                                         del_flag bit DEFAULT  0,
                                         version INTEGER,
                                         create_by bigint,
                                         create_time TIMESTAMP,
                                         update_by bigint,
                                         update_time TIMESTAMP
);

ALTER TABLE "lqbz"."als_qa_history_t" ADD CONSTRAINT PRIMARY KEY (id);

COMMENT ON TABLE "lqbz"."als_qa_history_t" IS '问答历史记录';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."id" IS '唯一ID';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."user_id" IS '当前用户';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."question" IS '问题';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."answer" IS '回答';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."graph" IS '图谱相关';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."oss_id" IS '文件ID';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."file_name" IS '文件名称';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."remarks" IS '备注';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."tenant_id" IS '租户号';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."del_flag" IS '删除标识（1删除 0未删除）';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."version" IS '乐观锁';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."create_by" IS '创建人';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."create_time" IS '创建时间';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."update_by" IS '更新人';
COMMENT ON COLUMN "lqbz"."als_qa_history_t"."update_time" IS '更新时间';
