boyue_jnpf/sql_init/KingbaseES/Update/Update_KingbaseES_0310.sql
2025-06-30 09:38:03 +08:00

65 lines
3.5 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

CREATE TABLE base_ai_chat (
f_id varchar(50) NOT NULL,
f_full_name varchar(200),
f_enabled_mark integer,
f_sort_code bigint,
f_creator_time timestamp(0),
f_creator_user_id varchar(50),
f_last_modify_time timestamp(0),
f_last_modify_user_id varchar(50),
f_delete_time timestamp(0),
f_delete_user_id varchar(50),
f_delete_mark integer,
f_tenant_id varchar(50) NOT NULL DEFAULT '0'
, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_ai_chat IS 'ai会话列表';
COMMENT ON COLUMN base_ai_chat.f_id IS '自然主键';
COMMENT ON COLUMN base_ai_chat.f_full_name IS '会话标题';
COMMENT ON COLUMN base_ai_chat.f_enabled_mark IS '有效标志';
COMMENT ON COLUMN base_ai_chat.f_sort_code IS '排序';
COMMENT ON COLUMN base_ai_chat.f_creator_time IS '创建时间';
COMMENT ON COLUMN base_ai_chat.f_creator_user_id IS '创建用户';
COMMENT ON COLUMN base_ai_chat.f_last_modify_time IS '修改时间';
COMMENT ON COLUMN base_ai_chat.f_last_modify_user_id IS '修改用户';
COMMENT ON COLUMN base_ai_chat.f_delete_time IS '删除时间';
COMMENT ON COLUMN base_ai_chat.f_delete_user_id IS '删除用户';
COMMENT ON COLUMN base_ai_chat.f_delete_mark IS '删除标志';
COMMENT ON COLUMN base_ai_chat.f_tenant_id IS '租户id';
CREATE TABLE base_ai_history (
f_id varchar(50) NOT NULL,
f_chat_id varchar(50),
f_question_text text,
f_content text,
f_type integer,
f_enabled_mark integer,
f_sort_code bigint,
f_creator_time timestamp(0),
f_creator_user_id varchar(50),
f_last_modify_time timestamp(0),
f_last_modify_user_id varchar(50),
f_delete_time timestamp(0),
f_delete_user_id varchar(50),
f_delete_mark integer,
f_tenant_id varchar(50) NOT NULL DEFAULT '0'
, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_ai_history IS 'ai会话记录';
COMMENT ON COLUMN base_ai_history.f_id IS '自然主键';
COMMENT ON COLUMN base_ai_history.f_chat_id IS '会话id';
COMMENT ON COLUMN base_ai_history.f_question_text IS '问题内容';
COMMENT ON COLUMN base_ai_history.f_content IS '会话内容';
COMMENT ON COLUMN base_ai_history.f_type IS '类型0-ai1-用户)';
COMMENT ON COLUMN base_ai_history.f_enabled_mark IS '有效标志';
COMMENT ON COLUMN base_ai_history.f_sort_code IS '排序';
COMMENT ON COLUMN base_ai_history.f_creator_time IS '创建时间';
COMMENT ON COLUMN base_ai_history.f_creator_user_id IS '创建用户';
COMMENT ON COLUMN base_ai_history.f_last_modify_time IS '修改时间';
COMMENT ON COLUMN base_ai_history.f_last_modify_user_id IS '修改用户';
COMMENT ON COLUMN base_ai_history.f_delete_time IS '删除时间';
COMMENT ON COLUMN base_ai_history.f_delete_user_id IS '删除用户';
COMMENT ON COLUMN base_ai_history.f_delete_mark IS '删除标志';
COMMENT ON COLUMN base_ai_history.f_tenant_id IS '租户id';