-- ----------------------------
-- 表名：base_advanced_query_scheme
-- ----------------------------
CREATE TABLE base_advanced_query_scheme (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_match_logic" varchar(20),
	"f_condition_json" text,
	"f_module_id" varchar(50),
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_sort_code" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_advanced_query_scheme IS '高级查询方案';
COMMENT ON COLUMN base_advanced_query_scheme."f_id" IS '自然主键';
COMMENT ON COLUMN base_advanced_query_scheme."f_full_name" IS '方案名称';
COMMENT ON COLUMN base_advanced_query_scheme."f_match_logic" IS '匹配逻辑';
COMMENT ON COLUMN base_advanced_query_scheme."f_condition_json" IS '条件规则Json';
COMMENT ON COLUMN base_advanced_query_scheme."f_module_id" IS '菜单主键';
COMMENT ON COLUMN base_advanced_query_scheme."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_advanced_query_scheme."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_advanced_query_scheme."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_advanced_query_scheme."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_advanced_query_scheme."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_advanced_query_scheme."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_advanced_query_scheme."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_advanced_query_scheme."f_sort_code" IS '排序';
COMMENT ON COLUMN base_advanced_query_scheme."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_app_data
-- ----------------------------
CREATE TABLE base_app_data (
	"f_id" varchar(50) NOT NULL,
	"f_object_type" varchar(50),
	"f_object_id" varchar(50),
	"f_object_data" text,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_system_id" varchar(50),
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_sort_code" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_app_data IS 'app常用数据';
COMMENT ON COLUMN base_app_data."f_id" IS '自然主键';
COMMENT ON COLUMN base_app_data."f_object_type" IS '对象类型';
COMMENT ON COLUMN base_app_data."f_object_id" IS '对象主键';
COMMENT ON COLUMN base_app_data."f_object_data" IS '对象json';
COMMENT ON COLUMN base_app_data."f_description" IS '描述或说明';
COMMENT ON COLUMN base_app_data."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_app_data."f_system_id" IS '系统id';
COMMENT ON COLUMN base_app_data."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_app_data."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_app_data."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_app_data."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_app_data."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_app_data."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_app_data."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_app_data."f_sort_code" IS '排序';
COMMENT ON COLUMN base_app_data."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_authorize
-- ----------------------------
CREATE TABLE base_authorize (
	"f_id" varchar(50) NOT NULL,
	"f_item_type" varchar(50),
	"f_item_id" varchar(50),
	"f_object_type" varchar(50),
	"f_object_id" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_authorize IS '操作权限';
COMMENT ON COLUMN base_authorize."f_id" IS '自然主键';
COMMENT ON COLUMN base_authorize."f_item_type" IS '项目类型';
COMMENT ON COLUMN base_authorize."f_item_id" IS '项目主键';
COMMENT ON COLUMN base_authorize."f_object_type" IS '对象类型';
COMMENT ON COLUMN base_authorize."f_object_id" IS '对象主键';
COMMENT ON COLUMN base_authorize."f_sort_code" IS '排序';
COMMENT ON COLUMN base_authorize."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_authorize."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_authorize."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_authorize."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_authorize."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_authorize."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_authorize."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_authorize."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_bill_num
-- ----------------------------
CREATE TABLE base_bill_num (
	"f_id" varchar(50) NOT NULL,
	"f_rule_id" varchar(50),
	"f_visual_id" varchar(50),
	"f_flow_id" varchar(50),
	"f_rule_config" text,
	"f_date_value" varchar(50),
	"f_num" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_bill_num IS '单据规则记录';
COMMENT ON COLUMN base_bill_num."f_id" IS '自然主键';
COMMENT ON COLUMN base_bill_num."f_rule_id" IS '单据规则id';
COMMENT ON COLUMN base_bill_num."f_visual_id" IS '功能id';
COMMENT ON COLUMN base_bill_num."f_flow_id" IS '流程id';
COMMENT ON COLUMN base_bill_num."f_rule_config" IS '规则配置';
COMMENT ON COLUMN base_bill_num."f_date_value" IS '时间规则值：用于判断是否重置';
COMMENT ON COLUMN base_bill_num."f_num" IS '单据递增序号';
COMMENT ON COLUMN base_bill_num."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_bill_num."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_bill_num."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_bill_num."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_bill_num."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_bill_num."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_bill_num."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_bill_num."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_bill_rule
-- ----------------------------
CREATE TABLE base_bill_rule (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_prefix" varchar(50),
	"f_date_format" varchar(50),
	"f_digit" int4,
	"f_start_number" varchar(50),
	"f_example" varchar(100),
	"f_this_number" int4,
	"f_output_number" varchar(100),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_category" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_type" int4,
	"f_random_digit" int4,
	"f_random_type" int4,
	"f_suffix" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_bill_rule IS '单据规则';
COMMENT ON COLUMN base_bill_rule."f_id" IS '自然主键';
COMMENT ON COLUMN base_bill_rule."f_full_name" IS '单据名称';
COMMENT ON COLUMN base_bill_rule."f_en_code" IS '单据编号';
COMMENT ON COLUMN base_bill_rule."f_prefix" IS '单据前缀';
COMMENT ON COLUMN base_bill_rule."f_date_format" IS '日期格式';
COMMENT ON COLUMN base_bill_rule."f_digit" IS '流水位数';
COMMENT ON COLUMN base_bill_rule."f_start_number" IS '流水起始';
COMMENT ON COLUMN base_bill_rule."f_example" IS '流水范例';
COMMENT ON COLUMN base_bill_rule."f_this_number" IS '当前流水号';
COMMENT ON COLUMN base_bill_rule."f_output_number" IS '输出流水号';
COMMENT ON COLUMN base_bill_rule."f_description" IS '描述或说明';
COMMENT ON COLUMN base_bill_rule."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_bill_rule."f_category" IS '业务分类';
COMMENT ON COLUMN base_bill_rule."f_sort_code" IS '排序';
COMMENT ON COLUMN base_bill_rule."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_bill_rule."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_bill_rule."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_bill_rule."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_bill_rule."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_bill_rule."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_bill_rule."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_bill_rule."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_bill_rule."f_type" IS '方式 1-时间格式，2-随机数编号，3-UUID';
COMMENT ON COLUMN base_bill_rule."f_random_digit" IS '随机数位数';
COMMENT ON COLUMN base_bill_rule."f_random_type" IS '随机数类型';
COMMENT ON COLUMN base_bill_rule."f_suffix" IS '单据后缀';
-- ----------------------------
-- 表名：base_columns_purview
-- ----------------------------
CREATE TABLE base_columns_purview (
	"f_id" varchar(50) NOT NULL,
	"f_field_list" text,
	"f_module_id" varchar(50),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_columns_purview IS '模块列表权限';
COMMENT ON COLUMN base_columns_purview."f_id" IS '主键Id';
COMMENT ON COLUMN base_columns_purview."f_field_list" IS '列表字段数组';
COMMENT ON COLUMN base_columns_purview."f_module_id" IS '模块ID';
COMMENT ON COLUMN base_columns_purview."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_columns_purview."f_sort_code" IS '排序';
COMMENT ON COLUMN base_columns_purview."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_columns_purview."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_columns_purview."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_columns_purview."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_columns_purview."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_columns_purview."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_columns_purview."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_columns_purview."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_common_fields
-- ----------------------------
CREATE TABLE base_common_fields (
	"f_id" varchar(50) NOT NULL,
	"f_field_name" varchar(50),
	"f_data_type" varchar(50),
	"f_data_length" varchar(50),
	"f_allow_null" int4,
	"f_field" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_common_fields IS '常用表字段';
COMMENT ON COLUMN base_common_fields."f_id" IS '主键';
COMMENT ON COLUMN base_common_fields."f_field_name" IS '列说名';
COMMENT ON COLUMN base_common_fields."f_data_type" IS '类型';
COMMENT ON COLUMN base_common_fields."f_data_length" IS '长度';
COMMENT ON COLUMN base_common_fields."f_allow_null" IS '是否为空（1允许，0不允许）';
COMMENT ON COLUMN base_common_fields."f_field" IS '列名';
COMMENT ON COLUMN base_common_fields."f_description" IS '描述或说明';
COMMENT ON COLUMN base_common_fields."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_common_fields."f_sort_code" IS '排序';
COMMENT ON COLUMN base_common_fields."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_common_fields."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_common_fields."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_common_fields."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_common_fields."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_common_fields."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_common_fields."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_common_fields."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_common_words
-- ----------------------------
CREATE TABLE base_common_words (
	"f_id" varchar(50) NOT NULL,
	"f_system_ids" varchar(4000),
	"f_common_words_text" varchar(4000),
	"f_common_words_type" int4,
	"f_sort_code" int8,
	"f_enabled_mark" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_uses_num" int8

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_common_words IS '常用语';
COMMENT ON COLUMN base_common_words."f_id" IS '自然主键';
COMMENT ON COLUMN base_common_words."f_system_ids" IS '应用id';
COMMENT ON COLUMN base_common_words."f_common_words_text" IS '常用语';
COMMENT ON COLUMN base_common_words."f_common_words_type" IS '常用语类型(0:系统,1:个人)';
COMMENT ON COLUMN base_common_words."f_sort_code" IS '排序';
COMMENT ON COLUMN base_common_words."f_enabled_mark" IS '有效标志';
COMMENT ON COLUMN base_common_words."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_common_words."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_common_words."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_common_words."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_common_words."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_common_words."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_common_words."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_common_words."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_common_words."f_uses_num" IS '使用次数';
-- ----------------------------
-- 表名：base_data_interface
-- ----------------------------
CREATE TABLE base_data_interface (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_category" varchar(50),
	"f_type" int4,
	"f_action" int4,
	"f_has_page" int4,
	"f_is_postposition" int4,
	"f_data_config_json" text NOT NULL,
	"f_data_count_json" text NOT NULL,
	"f_data_echo_json" text NOT NULL,
	"f_data_exception_json" text,
	"f_data_js_json" text NOT NULL,
	"f_parameter_json" text,
	"f_field_json" text,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_data_interface IS '数据接口';
COMMENT ON COLUMN base_data_interface."f_id" IS '主键ID';
COMMENT ON COLUMN base_data_interface."f_full_name" IS '名称';
COMMENT ON COLUMN base_data_interface."f_en_code" IS '编码';
COMMENT ON COLUMN base_data_interface."f_category" IS '分类';
COMMENT ON COLUMN base_data_interface."f_type" IS '类型(1-静态数据，2-sql，3-api)';
COMMENT ON COLUMN base_data_interface."f_action" IS '动作(3-查询)';
COMMENT ON COLUMN base_data_interface."f_has_page" IS '分页(0-禁用，1-启用)';
COMMENT ON COLUMN base_data_interface."f_is_postposition" IS '后置接口(0-否 1-是)';
COMMENT ON COLUMN base_data_interface."f_data_config_json" IS '数据配置json';
COMMENT ON COLUMN base_data_interface."f_data_count_json" IS '数据统计json';
COMMENT ON COLUMN base_data_interface."f_data_echo_json" IS '数据回显json';
COMMENT ON COLUMN base_data_interface."f_data_exception_json" IS '异常验证json';
COMMENT ON COLUMN base_data_interface."f_data_js_json" IS '数据处理json';
COMMENT ON COLUMN base_data_interface."f_parameter_json" IS '参数json';
COMMENT ON COLUMN base_data_interface."f_field_json" IS '字段JSON';
COMMENT ON COLUMN base_data_interface."f_description" IS '描述或说明';
COMMENT ON COLUMN base_data_interface."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_data_interface."f_sort_code" IS '排序';
COMMENT ON COLUMN base_data_interface."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_data_interface."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_data_interface."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_data_interface."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_data_interface."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_data_interface."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_data_interface."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_data_interface."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_data_interface_log
-- ----------------------------
CREATE TABLE base_data_interface_log (
	"f_id" varchar(50) NOT NULL,
	"f_invok_id" varchar(50) NOT NULL,
	"f_invok_time" timestamp,
	"f_user_id" varchar(50),
	"f_invok_ip" varchar(50),
	"f_invok_device" varchar(500),
	"f_invok_type" varchar(50),
	"f_invok_waste_time" int4,
	"f_oauth_app_id" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_data_interface_log IS '数据接口调用日志';
COMMENT ON COLUMN base_data_interface_log."f_id" IS '主键id';
COMMENT ON COLUMN base_data_interface_log."f_invok_id" IS '调用接口id';
COMMENT ON COLUMN base_data_interface_log."f_invok_time" IS '调用时间';
COMMENT ON COLUMN base_data_interface_log."f_user_id" IS '调用者id';
COMMENT ON COLUMN base_data_interface_log."f_invok_ip" IS '请求ip';
COMMENT ON COLUMN base_data_interface_log."f_invok_device" IS '请求设备';
COMMENT ON COLUMN base_data_interface_log."f_invok_type" IS '请求类型';
COMMENT ON COLUMN base_data_interface_log."f_invok_waste_time" IS '请求耗时';
COMMENT ON COLUMN base_data_interface_log."f_oauth_app_id" IS '';
COMMENT ON COLUMN base_data_interface_log."f_sort_code" IS '排序';
COMMENT ON COLUMN base_data_interface_log."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_data_interface_log."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_data_interface_log."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_data_interface_log."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_data_interface_log."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_data_interface_log."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_data_interface_log."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_data_interface_log."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_data_interface_oauth
-- ----------------------------
CREATE TABLE base_data_interface_oauth (
	"f_id" varchar(50) NOT NULL,
	"f_app_id" varchar(200) NOT NULL,
	"f_app_name" varchar(50) NOT NULL,
	"f_app_secret" varchar(200) NOT NULL,
	"f_verify_signature" int4,
	"f_useful_life" timestamp,
	"f_white_list" text,
	"f_black_list" text,
	"f_data_interface_ids" text,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_enabled_mark" int4,
	"f_description" varchar(500),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_data_interface_oauth IS '接口认证';
COMMENT ON COLUMN base_data_interface_oauth."f_id" IS '主键';
COMMENT ON COLUMN base_data_interface_oauth."f_app_id" IS '应用id';
COMMENT ON COLUMN base_data_interface_oauth."f_app_name" IS '应用名称';
COMMENT ON COLUMN base_data_interface_oauth."f_app_secret" IS '应用秘钥';
COMMENT ON COLUMN base_data_interface_oauth."f_verify_signature" IS '验证签名';
COMMENT ON COLUMN base_data_interface_oauth."f_useful_life" IS '使用期限';
COMMENT ON COLUMN base_data_interface_oauth."f_white_list" IS '白名单';
COMMENT ON COLUMN base_data_interface_oauth."f_black_list" IS '黑名单';
COMMENT ON COLUMN base_data_interface_oauth."f_data_interface_ids" IS '接口列表';
COMMENT ON COLUMN base_data_interface_oauth."f_sort_code" IS '排序';
COMMENT ON COLUMN base_data_interface_oauth."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_data_interface_oauth."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_data_interface_oauth."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_data_interface_oauth."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_data_interface_oauth."f_enabled_mark" IS '状态';
COMMENT ON COLUMN base_data_interface_oauth."f_description" IS '说明';
COMMENT ON COLUMN base_data_interface_oauth."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_data_interface_oauth."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_data_interface_oauth."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_data_interface_oauth."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_data_interface_user
-- ----------------------------
CREATE TABLE base_data_interface_user (
	"f_id" varchar(50) NOT NULL,
	"f_user_id" varchar(50),
	"f_user_key" varchar(50),
	"f_oauth_id" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_data_interface_user IS '接口认证用户';
COMMENT ON COLUMN base_data_interface_user."f_id" IS '自然主键';
COMMENT ON COLUMN base_data_interface_user."f_user_id" IS '用户主键';
COMMENT ON COLUMN base_data_interface_user."f_user_key" IS '用户密钥';
COMMENT ON COLUMN base_data_interface_user."f_oauth_id" IS '接口认证主键';
COMMENT ON COLUMN base_data_interface_user."f_sort_code" IS '排序';
COMMENT ON COLUMN base_data_interface_user."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_data_interface_user."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_data_interface_user."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_data_interface_user."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_data_interface_user."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_data_interface_user."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_data_interface_user."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_data_interface_user."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_data_interface_variate
-- ----------------------------
CREATE TABLE base_data_interface_variate (
	"f_id" varchar(50) NOT NULL,
	"f_interface_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_expression" varchar(500),
	"f_value" text,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_data_interface_variate IS '数据接口变量';
COMMENT ON COLUMN base_data_interface_variate."f_id" IS '主键id';
COMMENT ON COLUMN base_data_interface_variate."f_interface_id" IS '数据接口id';
COMMENT ON COLUMN base_data_interface_variate."f_full_name" IS '变量名';
COMMENT ON COLUMN base_data_interface_variate."f_expression" IS '表达式';
COMMENT ON COLUMN base_data_interface_variate."f_value" IS '变量值';
COMMENT ON COLUMN base_data_interface_variate."f_sort_code" IS '排序';
COMMENT ON COLUMN base_data_interface_variate."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_data_interface_variate."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_data_interface_variate."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_data_interface_variate."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_data_interface_variate."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_data_interface_variate."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_data_interface_variate."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_data_interface_variate."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_data_set
-- ----------------------------
CREATE TABLE base_data_set (
	"f_id" varchar(50) NOT NULL,
	"f_object_type" varchar(50),
	"f_object_id" varchar(50),
	"f_full_name" varchar(255) NOT NULL,
	"f_db_link_id" varchar(50) NOT NULL DEFAULT '0',
	"f_data_config_json" text,
	"f_parameter_json" text,
	"f_field_json" text,
	"f_sort_code" int8,
	"f_description" varchar(500),
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_type" int4 DEFAULT '0',
	"f_visual_config_json" text,
	"f_filter_config_json" text,
	"f_interface_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_data_set IS '数据集';
COMMENT ON COLUMN base_data_set."f_id" IS '主键_id';
COMMENT ON COLUMN base_data_set."f_object_type" IS '关联数据类型';
COMMENT ON COLUMN base_data_set."f_object_id" IS '关联的数据id';
COMMENT ON COLUMN base_data_set."f_full_name" IS '数据集名称';
COMMENT ON COLUMN base_data_set."f_db_link_id" IS '连接数据 _id';
COMMENT ON COLUMN base_data_set."f_data_config_json" IS '数据sql语句';
COMMENT ON COLUMN base_data_set."f_parameter_json" IS '输入参数';
COMMENT ON COLUMN base_data_set."f_field_json" IS '显示字段';
COMMENT ON COLUMN base_data_set."f_sort_code" IS '排序';
COMMENT ON COLUMN base_data_set."f_description" IS '描述或说明';
COMMENT ON COLUMN base_data_set."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_data_set."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_data_set."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_data_set."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_data_set."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_data_set."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_data_set."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_data_set."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_data_set."f_type" IS '类型：1-sql语句，2-配置式';
COMMENT ON COLUMN base_data_set."f_visual_config_json" IS '配置json';
COMMENT ON COLUMN base_data_set."f_filter_config_json" IS '筛选设置json';
COMMENT ON COLUMN base_data_set."f_interface_id" IS '数据接口id';
-- ----------------------------
-- 表名：base_db_link
-- ----------------------------
CREATE TABLE base_db_link (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_db_type" varchar(50),
	"f_host" varchar(50),
	"f_port" int4,
	"f_user_name" varchar(50),
	"f_password" varchar(100),
	"f_service_name" varchar(50),
	"f_description" varchar(500),
	"f_db_schema" varchar(50),
	"f_table_space" varchar(50),
	"f_oracle_param" varchar(500),
	"f_oracle_extend" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_db_link IS '数据连接';
COMMENT ON COLUMN base_db_link."f_id" IS '自然主键';
COMMENT ON COLUMN base_db_link."f_full_name" IS '连接名称';
COMMENT ON COLUMN base_db_link."f_db_type" IS '连接驱动';
COMMENT ON COLUMN base_db_link."f_host" IS '主机地址';
COMMENT ON COLUMN base_db_link."f_port" IS '端口';
COMMENT ON COLUMN base_db_link."f_user_name" IS '用户';
COMMENT ON COLUMN base_db_link."f_password" IS '密码';
COMMENT ON COLUMN base_db_link."f_service_name" IS '服务名称';
COMMENT ON COLUMN base_db_link."f_description" IS '描述或说明';
COMMENT ON COLUMN base_db_link."f_db_schema" IS '模式';
COMMENT ON COLUMN base_db_link."f_table_space" IS '表空间';
COMMENT ON COLUMN base_db_link."f_oracle_param" IS 'oracle连接参数';
COMMENT ON COLUMN base_db_link."f_oracle_extend" IS 'Oracle扩展开关 1:开启 0:关闭';
COMMENT ON COLUMN base_db_link."f_sort_code" IS '排序';
COMMENT ON COLUMN base_db_link."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_db_link."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_db_link."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_db_link."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_db_link."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_db_link."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_db_link."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_db_link."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_dictionary_data
-- ----------------------------
CREATE TABLE base_dictionary_data (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_simple_spelling" varchar(500),
	"f_is_default" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_dictionary_type_id" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_dictionary_data IS '字典数据';
COMMENT ON COLUMN base_dictionary_data."f_id" IS '自然主键';
COMMENT ON COLUMN base_dictionary_data."f_parent_id" IS '上级';
COMMENT ON COLUMN base_dictionary_data."f_full_name" IS '名称';
COMMENT ON COLUMN base_dictionary_data."f_en_code" IS '编号';
COMMENT ON COLUMN base_dictionary_data."f_simple_spelling" IS '拼音';
COMMENT ON COLUMN base_dictionary_data."f_is_default" IS '默认';
COMMENT ON COLUMN base_dictionary_data."f_description" IS '描述';
COMMENT ON COLUMN base_dictionary_data."f_enabled_mark" IS '有效标志';
COMMENT ON COLUMN base_dictionary_data."f_dictionary_type_id" IS '类别主键';
COMMENT ON COLUMN base_dictionary_data."f_sort_code" IS '排序';
COMMENT ON COLUMN base_dictionary_data."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_dictionary_data."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_dictionary_data."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_dictionary_data."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_dictionary_data."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_dictionary_data."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_dictionary_data."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_dictionary_data."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_dictionary_type
-- ----------------------------
CREATE TABLE base_dictionary_type (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_is_tree" int4,
	"f_type" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_dictionary_type IS '字典分类';
COMMENT ON COLUMN base_dictionary_type."f_id" IS '自然主键';
COMMENT ON COLUMN base_dictionary_type."f_parent_id" IS '上级';
COMMENT ON COLUMN base_dictionary_type."f_full_name" IS '名称';
COMMENT ON COLUMN base_dictionary_type."f_en_code" IS '编号';
COMMENT ON COLUMN base_dictionary_type."f_is_tree" IS '树形';
COMMENT ON COLUMN base_dictionary_type."f_type" IS '类型 1 系统 0 业务';
COMMENT ON COLUMN base_dictionary_type."f_description" IS '描述或说明';
COMMENT ON COLUMN base_dictionary_type."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_dictionary_type."f_sort_code" IS '排序';
COMMENT ON COLUMN base_dictionary_type."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_dictionary_type."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_dictionary_type."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_dictionary_type."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_dictionary_type."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_dictionary_type."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_dictionary_type."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_dictionary_type."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_file
-- ----------------------------
CREATE TABLE base_file (
	"f_id" varchar(50) NOT NULL,
	"f_file_version" varchar(500),
	"f_file_name" varchar(500),
	"f_type" int4,
	"f_url" varchar(500),
	"f_old_file_version_id" varchar(500),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_file IS '文件在线编辑';
COMMENT ON COLUMN base_file."f_id" IS '主键id';
COMMENT ON COLUMN base_file."f_file_version" IS '文件版本';
COMMENT ON COLUMN base_file."f_file_name" IS '文件名';
COMMENT ON COLUMN base_file."f_type" IS '上传方式: 1.local 本地上传 2.http http上传 3.create 新建';
COMMENT ON COLUMN base_file."f_url" IS 'http上传的url';
COMMENT ON COLUMN base_file."f_old_file_version_id" IS '历史版本id';
COMMENT ON COLUMN base_file."f_sort_code" IS '排序';
COMMENT ON COLUMN base_file."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_file."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_file."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_file."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_file."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_file."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_file."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_file."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_group
-- ----------------------------
CREATE TABLE base_group (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_category" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_group IS '分组管理';
COMMENT ON COLUMN base_group."f_id" IS '自然主键';
COMMENT ON COLUMN base_group."f_full_name" IS '名称';
COMMENT ON COLUMN base_group."f_en_code" IS '编码';
COMMENT ON COLUMN base_group."f_category" IS '分类';
COMMENT ON COLUMN base_group."f_description" IS '描述或说明';
COMMENT ON COLUMN base_group."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_group."f_sort_code" IS '排序';
COMMENT ON COLUMN base_group."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_group."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_group."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_group."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_group."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_group."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_group."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_group."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_im_content
-- ----------------------------
CREATE TABLE base_im_content (
	"f_id" varchar(50) NOT NULL,
	"f_send_user_id" varchar(50),
	"f_send_time" timestamp,
	"f_receive_user_id" varchar(50),
	"f_receive_time" timestamp,
	"f_content" text,
	"f_content_type" varchar(50),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_im_content IS '聊天内容';
COMMENT ON COLUMN base_im_content."f_id" IS '自然主键';
COMMENT ON COLUMN base_im_content."f_send_user_id" IS '发送者';
COMMENT ON COLUMN base_im_content."f_send_time" IS '发送时间';
COMMENT ON COLUMN base_im_content."f_receive_user_id" IS '接收者';
COMMENT ON COLUMN base_im_content."f_receive_time" IS '接收时间';
COMMENT ON COLUMN base_im_content."f_content" IS '内容';
COMMENT ON COLUMN base_im_content."f_content_type" IS '内容类型：text、img、file';
COMMENT ON COLUMN base_im_content."f_enabled_mark" IS '有效标志(0-未读，1-已读)';
COMMENT ON COLUMN base_im_content."f_sort_code" IS '排序';
COMMENT ON COLUMN base_im_content."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_im_content."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_im_content."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_im_content."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_im_content."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_im_content."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_im_content."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_im_content."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_im_reply
-- ----------------------------
CREATE TABLE base_im_reply (
	"f_id" varchar(50) NOT NULL,
	"f_user_id" varchar(50),
	"f_receive_user_id" varchar(50),
	"f_receive_time" timestamp,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_im_reply IS '聊天会话';
COMMENT ON COLUMN base_im_reply."f_id" IS '主键';
COMMENT ON COLUMN base_im_reply."f_user_id" IS '用户主键';
COMMENT ON COLUMN base_im_reply."f_receive_user_id" IS '接收用户';
COMMENT ON COLUMN base_im_reply."f_receive_time" IS '接收时间';
COMMENT ON COLUMN base_im_reply."f_sort_code" IS '排序';
COMMENT ON COLUMN base_im_reply."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_im_reply."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_im_reply."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_im_reply."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_im_reply."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_im_reply."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_im_reply."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_im_reply."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_integrate
-- ----------------------------
CREATE TABLE base_integrate (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_template_json" text,
	"f_trigger_type" int4,
	"f_result_type" int4,
	"f_type" int4,
	"f_form_id" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_integrate IS '系统集成';
COMMENT ON COLUMN base_integrate."f_id" IS '自然主键';
COMMENT ON COLUMN base_integrate."f_full_name" IS '集成名称';
COMMENT ON COLUMN base_integrate."f_en_code" IS '集成编号';
COMMENT ON COLUMN base_integrate."f_template_json" IS '集成模板';
COMMENT ON COLUMN base_integrate."f_trigger_type" IS '触发事件(1.新增 2.修改 3.删除)';
COMMENT ON COLUMN base_integrate."f_result_type" IS '结果';
COMMENT ON COLUMN base_integrate."f_type" IS '触发类型(1-事件，2-定时 )';
COMMENT ON COLUMN base_integrate."f_form_id" IS '表单id';
COMMENT ON COLUMN base_integrate."f_description" IS '描述或说明';
COMMENT ON COLUMN base_integrate."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_integrate."f_sort_code" IS '排序';
COMMENT ON COLUMN base_integrate."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_integrate."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_integrate."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_integrate."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_integrate."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_integrate."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_integrate."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_integrate."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_integrate_node
-- ----------------------------
CREATE TABLE base_integrate_node (
	"f_id" varchar(50) NOT NULL,
	"f_task_id" varchar(50),
	"f_form_id" varchar(50),
	"f_node_type" varchar(50),
	"f_start_time" timestamp,
	"f_end_time" timestamp,
	"f_error_msg" text,
	"f_node_code" varchar(50),
	"f_node_name" varchar(50),
	"f_node_next" varchar(2000),
	"f_result_type" int4,
	"f_node_property_json" text,
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_description" varchar(500),
	"f_parent_id" varchar(50),
	"f_is_retry" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_integrate_node IS '系统集成节点';
COMMENT ON COLUMN base_integrate_node."f_id" IS '自然主键';
COMMENT ON COLUMN base_integrate_node."f_task_id" IS '任务主键';
COMMENT ON COLUMN base_integrate_node."f_form_id" IS '表单主键';
COMMENT ON COLUMN base_integrate_node."f_node_type" IS '类型';
COMMENT ON COLUMN base_integrate_node."f_start_time" IS '开始时间';
COMMENT ON COLUMN base_integrate_node."f_end_time" IS '结束时间';
COMMENT ON COLUMN base_integrate_node."f_error_msg" IS '异常提示';
COMMENT ON COLUMN base_integrate_node."f_node_code" IS '节点编号';
COMMENT ON COLUMN base_integrate_node."f_node_name" IS '节点名称';
COMMENT ON COLUMN base_integrate_node."f_node_next" IS '下节点';
COMMENT ON COLUMN base_integrate_node."f_result_type" IS '是否完成';
COMMENT ON COLUMN base_integrate_node."f_node_property_json" IS '节点属性Json';
COMMENT ON COLUMN base_integrate_node."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_integrate_node."f_sort_code" IS '排序';
COMMENT ON COLUMN base_integrate_node."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_integrate_node."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_integrate_node."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_integrate_node."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_integrate_node."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_integrate_node."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_integrate_node."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_integrate_node."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_integrate_node."f_description" IS '描述或说明';
COMMENT ON COLUMN base_integrate_node."f_parent_id" IS '父节点id';
COMMENT ON COLUMN base_integrate_node."f_is_retry" IS '能否重试';
-- ----------------------------
-- 表名：base_integrate_queue
-- ----------------------------
CREATE TABLE base_integrate_queue (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(50),
	"f_integrate_id" varchar(200),
	"f_execution_time" timestamp,
	"f_state" int4,
	"f_enabled_mark" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_description" varchar(4000),
	"f_sort_code" int8

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_integrate_queue IS '系统集成队列';
COMMENT ON COLUMN base_integrate_queue."f_id" IS '自然主键';
COMMENT ON COLUMN base_integrate_queue."f_full_name" IS '集成名称';
COMMENT ON COLUMN base_integrate_queue."f_integrate_id" IS '集成主键';
COMMENT ON COLUMN base_integrate_queue."f_execution_time" IS '执行时间';
COMMENT ON COLUMN base_integrate_queue."f_state" IS '状态';
COMMENT ON COLUMN base_integrate_queue."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_integrate_queue."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_integrate_queue."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_integrate_queue."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_integrate_queue."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_integrate_queue."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_integrate_queue."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_integrate_queue."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_integrate_queue."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_integrate_queue."f_description" IS '描述';
COMMENT ON COLUMN base_integrate_queue."f_sort_code" IS '排序';
-- ----------------------------
-- 表名：base_integrate_task
-- ----------------------------
CREATE TABLE base_integrate_task (
	"f_id" varchar(50) NOT NULL,
	"f_process_id" varchar(50),
	"f_parent_time" timestamp,
	"f_parent_id" varchar(50),
	"f_execution_time" timestamp,
	"f_template_json" text,
	"f_data" text,
	"f_data_id" varchar(50),
	"f_type" int4,
	"f_integrate_id" varchar(200),
	"f_result_type" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_integrate_task IS '系统集成任务';
COMMENT ON COLUMN base_integrate_task."f_id" IS '自然主键';
COMMENT ON COLUMN base_integrate_task."f_process_id" IS '实例主键';
COMMENT ON COLUMN base_integrate_task."f_parent_time" IS '父节点时间';
COMMENT ON COLUMN base_integrate_task."f_parent_id" IS '父节点id';
COMMENT ON COLUMN base_integrate_task."f_execution_time" IS '执行时间';
COMMENT ON COLUMN base_integrate_task."f_template_json" IS '集成模板';
COMMENT ON COLUMN base_integrate_task."f_data" IS '数据';
COMMENT ON COLUMN base_integrate_task."f_data_id" IS '数据主键';
COMMENT ON COLUMN base_integrate_task."f_type" IS '集成类型';
COMMENT ON COLUMN base_integrate_task."f_integrate_id" IS '集成主键';
COMMENT ON COLUMN base_integrate_task."f_result_type" IS '结果';
COMMENT ON COLUMN base_integrate_task."f_description" IS '描述或说明';
COMMENT ON COLUMN base_integrate_task."f_enabled_mark" IS '有效标志(0-失败，1-成功)';
COMMENT ON COLUMN base_integrate_task."f_sort_code" IS '排序';
COMMENT ON COLUMN base_integrate_task."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_integrate_task."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_integrate_task."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_integrate_task."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_integrate_task."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_integrate_task."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_integrate_task."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_integrate_task."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_language
-- ----------------------------
CREATE TABLE base_language (
	"f_id" varchar(50) NOT NULL,
	"f_group_id" varchar(50),
	"f_en_code" varchar(200),
	"f_full_name" varchar(500),
	"f_language" varchar(50),
	"f_type" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_language IS '字典数据';
COMMENT ON COLUMN base_language."f_id" IS '自然主键';
COMMENT ON COLUMN base_language."f_group_id" IS '翻译标记id';
COMMENT ON COLUMN base_language."f_en_code" IS '翻译标记';
COMMENT ON COLUMN base_language."f_full_name" IS '翻译内容';
COMMENT ON COLUMN base_language."f_language" IS '语种（数据字典添加）';
COMMENT ON COLUMN base_language."f_type" IS '类型：0-客户端，1-java服务端，2-net服务端';
COMMENT ON COLUMN base_language."f_description" IS '描述';
COMMENT ON COLUMN base_language."f_enabled_mark" IS '有效标志';
COMMENT ON COLUMN base_language."f_sort_code" IS '排序';
COMMENT ON COLUMN base_language."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_language."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_language."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_language."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_language."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_language."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_language."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_language."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_message
-- ----------------------------
CREATE TABLE base_message (
	"f_id" varchar(50) NOT NULL,
	"f_type" int4,
	"f_title" varchar(200),
	"f_flow_type" int4,
	"f_user_id" varchar(50),
	"f_is_read" int4,
	"f_read_time" timestamp,
	"f_read_count" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_body_text" text

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_message IS '消息实例';
COMMENT ON COLUMN base_message."f_id" IS '自然主键';
COMMENT ON COLUMN base_message."f_type" IS '类型(1-公告 2-流程 3-系统 4-日程)';
COMMENT ON COLUMN base_message."f_title" IS '标题';
COMMENT ON COLUMN base_message."f_flow_type" IS '流程类型(1:审批 2:委托)';
COMMENT ON COLUMN base_message."f_user_id" IS '用户id';
COMMENT ON COLUMN base_message."f_is_read" IS '是否阅读';
COMMENT ON COLUMN base_message."f_read_time" IS '阅读时间';
COMMENT ON COLUMN base_message."f_read_count" IS '阅读次数';
COMMENT ON COLUMN base_message."f_sort_code" IS '排序';
COMMENT ON COLUMN base_message."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_message."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_message."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_message."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_message."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_message."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_message."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_message."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_message."f_body_text" IS '内容';
-- ----------------------------
-- 表名：base_module
-- ----------------------------
CREATE TABLE base_module (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_type" int4,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_category" varchar(50),
	"f_url_address" varchar(500),
	"f_icon" varchar(500),
	"f_link_target" varchar(50),
	"f_is_button_authorize" int4,
	"f_is_column_authorize" int4,
	"f_is_data_authorize" int4,
	"f_is_form_authorize" int4,
	"f_module_id" varchar(50),
	"f_system_id" varchar(50),
	"f_property_json" text,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_module IS '系统菜单';
COMMENT ON COLUMN base_module."f_id" IS '自然主键';
COMMENT ON COLUMN base_module."f_parent_id" IS '上级id';
COMMENT ON COLUMN base_module."f_type" IS '类型(1-目录 2-页面 3-功能 4-字典 5-报表 6-大屏 7-外链 8-门户)';
COMMENT ON COLUMN base_module."f_full_name" IS '名称';
COMMENT ON COLUMN base_module."f_en_code" IS '编码';
COMMENT ON COLUMN base_module."f_category" IS '分类';
COMMENT ON COLUMN base_module."f_url_address" IS '功能地址';
COMMENT ON COLUMN base_module."f_icon" IS '菜单图标';
COMMENT ON COLUMN base_module."f_link_target" IS '链接目标';
COMMENT ON COLUMN base_module."f_is_button_authorize" IS '按钮权限';
COMMENT ON COLUMN base_module."f_is_column_authorize" IS '列表权限';
COMMENT ON COLUMN base_module."f_is_data_authorize" IS '数据权限';
COMMENT ON COLUMN base_module."f_is_form_authorize" IS '表单权限';
COMMENT ON COLUMN base_module."f_module_id" IS '关联功能id';
COMMENT ON COLUMN base_module."f_system_id" IS '系统id';
COMMENT ON COLUMN base_module."f_property_json" IS '扩展属性';
COMMENT ON COLUMN base_module."f_description" IS '描述或说明';
COMMENT ON COLUMN base_module."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_module."f_sort_code" IS '排序';
COMMENT ON COLUMN base_module."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_module."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_module."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_module."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_module."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_module."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_module."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_module."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_module_authorize
-- ----------------------------
CREATE TABLE base_module_authorize (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_type" varchar(50),
	"f_condition_symbol" varchar(500),
	"f_condition_text" varchar(500),
	"f_property_json" text,
	"f_module_id" varchar(50),
	"f_field_rule" int4,
	"f_child_table_key" varchar(50),
	"f_bind_table" varchar(50),
	"f_format" varchar(20),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_module_authorize IS '数据权限配置';
COMMENT ON COLUMN base_module_authorize."f_id" IS '自然主键';
COMMENT ON COLUMN base_module_authorize."f_full_name" IS '字段名称';
COMMENT ON COLUMN base_module_authorize."f_en_code" IS '字段编号';
COMMENT ON COLUMN base_module_authorize."f_type" IS '字段类型';
COMMENT ON COLUMN base_module_authorize."f_condition_symbol" IS '条件符号';
COMMENT ON COLUMN base_module_authorize."f_condition_text" IS '条件内容';
COMMENT ON COLUMN base_module_authorize."f_property_json" IS '扩展属性';
COMMENT ON COLUMN base_module_authorize."f_module_id" IS '功能主键';
COMMENT ON COLUMN base_module_authorize."f_field_rule" IS '字段规则(0-主表 1-副表 2-子表)';
COMMENT ON COLUMN base_module_authorize."f_child_table_key" IS '子表规则key';
COMMENT ON COLUMN base_module_authorize."f_bind_table" IS '绑定表格Id';
COMMENT ON COLUMN base_module_authorize."f_format" IS '时间格式';
COMMENT ON COLUMN base_module_authorize."f_description" IS '描述或说明';
COMMENT ON COLUMN base_module_authorize."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_module_authorize."f_sort_code" IS '排序';
COMMENT ON COLUMN base_module_authorize."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_module_authorize."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_module_authorize."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_module_authorize."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_module_authorize."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_module_authorize."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_module_authorize."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_module_authorize."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_module_button
-- ----------------------------
CREATE TABLE base_module_button (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_icon" varchar(500),
	"f_url_address" varchar(500),
	"f_property_json" text,
	"f_module_id" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_module_button IS '按钮权限';
COMMENT ON COLUMN base_module_button."f_id" IS '自然主键';
COMMENT ON COLUMN base_module_button."f_parent_id" IS '按钮上级';
COMMENT ON COLUMN base_module_button."f_full_name" IS '按钮名称';
COMMENT ON COLUMN base_module_button."f_en_code" IS '按钮编号';
COMMENT ON COLUMN base_module_button."f_icon" IS '按钮图标';
COMMENT ON COLUMN base_module_button."f_url_address" IS '请求地址';
COMMENT ON COLUMN base_module_button."f_property_json" IS '扩展属性';
COMMENT ON COLUMN base_module_button."f_module_id" IS '功能主键';
COMMENT ON COLUMN base_module_button."f_description" IS '描述或说明';
COMMENT ON COLUMN base_module_button."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_module_button."f_sort_code" IS '排序';
COMMENT ON COLUMN base_module_button."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_module_button."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_module_button."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_module_button."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_module_button."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_module_button."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_module_button."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_module_button."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_module_column
-- ----------------------------
CREATE TABLE base_module_column (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_bind_table" varchar(50),
	"f_bind_table_name" varchar(50),
	"f_property_json" text,
	"f_module_id" varchar(50),
	"f_field_rule" int4,
	"f_child_table_key" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_module_column IS '列表权限';
COMMENT ON COLUMN base_module_column."f_id" IS '自然主键';
COMMENT ON COLUMN base_module_column."f_parent_id" IS '上级id';
COMMENT ON COLUMN base_module_column."f_full_name" IS '';
COMMENT ON COLUMN base_module_column."f_en_code" IS '';
COMMENT ON COLUMN base_module_column."f_bind_table" IS '绑定表格Id';
COMMENT ON COLUMN base_module_column."f_bind_table_name" IS '绑定表格描述';
COMMENT ON COLUMN base_module_column."f_property_json" IS '扩展属性';
COMMENT ON COLUMN base_module_column."f_module_id" IS '功能主键';
COMMENT ON COLUMN base_module_column."f_field_rule" IS '字段规则(0-主表 1-副表 2-子表)';
COMMENT ON COLUMN base_module_column."f_child_table_key" IS '子表规则key';
COMMENT ON COLUMN base_module_column."f_description" IS '描述或说明';
COMMENT ON COLUMN base_module_column."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_module_column."f_sort_code" IS '排序';
COMMENT ON COLUMN base_module_column."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_module_column."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_module_column."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_module_column."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_module_column."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_module_column."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_module_column."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_module_column."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_module_data
-- ----------------------------
CREATE TABLE base_module_data (
	"f_id" varchar(50) NOT NULL,
	"f_module_type" varchar(50),
	"f_module_id" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_system_id" varchar(50),
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_sort_code" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_module_data IS '常用菜单';
COMMENT ON COLUMN base_module_data."f_id" IS '自然主键';
COMMENT ON COLUMN base_module_data."f_module_type" IS '对象类型';
COMMENT ON COLUMN base_module_data."f_module_id" IS '对象主键';
COMMENT ON COLUMN base_module_data."f_description" IS '描述或说明';
COMMENT ON COLUMN base_module_data."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_module_data."f_system_id" IS '系统id';
COMMENT ON COLUMN base_module_data."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_module_data."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_module_data."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_module_data."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_module_data."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_module_data."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_module_data."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_module_data."f_sort_code" IS '排序';
COMMENT ON COLUMN base_module_data."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_module_form
-- ----------------------------
CREATE TABLE base_module_form (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_property_json" text,
	"f_module_id" varchar(50),
	"f_field_rule" int4,
	"f_child_table_key" varchar(50),
	"f_bind_table" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_module_form IS '表单权限';
COMMENT ON COLUMN base_module_form."f_id" IS '自然主键';
COMMENT ON COLUMN base_module_form."f_parent_id" IS '表单上级';
COMMENT ON COLUMN base_module_form."f_full_name" IS '';
COMMENT ON COLUMN base_module_form."f_en_code" IS '';
COMMENT ON COLUMN base_module_form."f_property_json" IS '扩展属性';
COMMENT ON COLUMN base_module_form."f_module_id" IS '功能主键';
COMMENT ON COLUMN base_module_form."f_field_rule" IS '字段规则(0-主表 1-副表 2-子表)';
COMMENT ON COLUMN base_module_form."f_child_table_key" IS '子表规则key';
COMMENT ON COLUMN base_module_form."f_bind_table" IS '绑定表格Id';
COMMENT ON COLUMN base_module_form."f_description" IS '描述或说明';
COMMENT ON COLUMN base_module_form."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_module_form."f_sort_code" IS '排序';
COMMENT ON COLUMN base_module_form."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_module_form."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_module_form."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_module_form."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_module_form."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_module_form."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_module_form."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_module_form."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_module_link
-- ----------------------------
CREATE TABLE base_module_link (
	"f_id" varchar(50) NOT NULL,
	"f_link_id" varchar(50),
	"f_link_tables" varchar(200),
	"f_module_id" varchar(50),
	"f_type" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_module_link IS '数据权限连接管理';
COMMENT ON COLUMN base_module_link."f_id" IS '自然主键';
COMMENT ON COLUMN base_module_link."f_link_id" IS '数据源连接';
COMMENT ON COLUMN base_module_link."f_link_tables" IS '连接表名';
COMMENT ON COLUMN base_module_link."f_module_id" IS '菜单主键';
COMMENT ON COLUMN base_module_link."f_type" IS '权限类型(1:列表权限，2：数据权限，3：表单权限)';
COMMENT ON COLUMN base_module_link."f_sort_code" IS '排序';
COMMENT ON COLUMN base_module_link."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_module_link."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_module_link."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_module_link."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_module_link."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_module_link."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_module_link."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_module_link."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_module_scheme
-- ----------------------------
CREATE TABLE base_module_scheme (
	"f_id" varchar(50) NOT NULL,
	"f_en_code" varchar(200),
	"f_full_name" varchar(100),
	"f_condition_json" text,
	"f_condition_text" varchar(500),
	"f_description" varchar(500),
	"f_module_id" varchar(50),
	"f_all_data" int4,
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_match_logic" varchar(50),
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_module_scheme IS '数据权限方案';
COMMENT ON COLUMN base_module_scheme."f_id" IS '自然主键';
COMMENT ON COLUMN base_module_scheme."f_en_code" IS '方案编号';
COMMENT ON COLUMN base_module_scheme."f_full_name" IS '方案名称';
COMMENT ON COLUMN base_module_scheme."f_condition_json" IS '条件规则Json';
COMMENT ON COLUMN base_module_scheme."f_condition_text" IS '条件规则描述';
COMMENT ON COLUMN base_module_scheme."f_description" IS '描述或说明';
COMMENT ON COLUMN base_module_scheme."f_module_id" IS '功能主键';
COMMENT ON COLUMN base_module_scheme."f_all_data" IS '全部数据标识';
COMMENT ON COLUMN base_module_scheme."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_module_scheme."f_sort_code" IS '排序';
COMMENT ON COLUMN base_module_scheme."f_match_logic" IS '分组匹配逻辑';
COMMENT ON COLUMN base_module_scheme."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_module_scheme."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_module_scheme."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_module_scheme."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_module_scheme."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_module_scheme."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_module_scheme."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_module_scheme."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_msg_account
-- ----------------------------
CREATE TABLE base_msg_account (
	"f_id" varchar(50) NOT NULL,
	"f_category" varchar(50),
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_addressor_name" varchar(50),
	"f_smtp_server" varchar(50),
	"f_smtp_port" int4,
	"f_ssl_link" int4,
	"f_smtp_user" varchar(50),
	"f_smtp_password" varchar(50),
	"f_channel" int4,
	"f_sms_signature" varchar(50),
	"f_app_id" varchar(50),
	"f_app_secret" varchar(500),
	"f_end_point" varchar(50),
	"f_sdk_app_id" varchar(50),
	"f_app_key" varchar(50),
	"f_zone_name" varchar(50),
	"f_zone_param" varchar(50),
	"f_enterprise_id" varchar(50),
	"f_agent_id" varchar(50),
	"f_webhook_type" int4,
	"f_webhook_address" varchar(500),
	"f_approve_type" int4,
	"f_bearer" varchar(500),
	"f_user_name" varchar(50),
	"f_password" varchar(50),
	"f_sort_code" int8,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_msg_account IS '账号配置表';
COMMENT ON COLUMN base_msg_account."f_id" IS '主键id';
COMMENT ON COLUMN base_msg_account."f_category" IS '分类';
COMMENT ON COLUMN base_msg_account."f_full_name" IS '名称';
COMMENT ON COLUMN base_msg_account."f_en_code" IS '编码';
COMMENT ON COLUMN base_msg_account."f_addressor_name" IS '发件人昵称';
COMMENT ON COLUMN base_msg_account."f_smtp_server" IS 'SMTP服务器';
COMMENT ON COLUMN base_msg_account."f_smtp_port" IS 'SMTP端口';
COMMENT ON COLUMN base_msg_account."f_ssl_link" IS 'SSL安全链接';
COMMENT ON COLUMN base_msg_account."f_smtp_user" IS 'SMTP用户';
COMMENT ON COLUMN base_msg_account."f_smtp_password" IS 'SMTP密码';
COMMENT ON COLUMN base_msg_account."f_channel" IS '渠道';
COMMENT ON COLUMN base_msg_account."f_sms_signature" IS '短信签名';
COMMENT ON COLUMN base_msg_account."f_app_id" IS '应用ID';
COMMENT ON COLUMN base_msg_account."f_app_secret" IS '应用Secret';
COMMENT ON COLUMN base_msg_account."f_end_point" IS 'EndPoint（阿里云）';
COMMENT ON COLUMN base_msg_account."f_sdk_app_id" IS 'SDK AppID（腾讯云）';
COMMENT ON COLUMN base_msg_account."f_app_key" IS 'AppKey（腾讯云）';
COMMENT ON COLUMN base_msg_account."f_zone_name" IS '地域域名（腾讯云）';
COMMENT ON COLUMN base_msg_account."f_zone_param" IS '地域参数（腾讯云）';
COMMENT ON COLUMN base_msg_account."f_enterprise_id" IS '企业id';
COMMENT ON COLUMN base_msg_account."f_agent_id" IS 'AgentID';
COMMENT ON COLUMN base_msg_account."f_webhook_type" IS 'WebHook类型';
COMMENT ON COLUMN base_msg_account."f_webhook_address" IS 'WebHook地址';
COMMENT ON COLUMN base_msg_account."f_approve_type" IS '认证类型';
COMMENT ON COLUMN base_msg_account."f_bearer" IS 'Bearer令牌';
COMMENT ON COLUMN base_msg_account."f_user_name" IS '用户名（基本认证）';
COMMENT ON COLUMN base_msg_account."f_password" IS '密码（基本认证）';
COMMENT ON COLUMN base_msg_account."f_sort_code" IS '排序';
COMMENT ON COLUMN base_msg_account."f_description" IS '描述或说明';
COMMENT ON COLUMN base_msg_account."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_msg_account."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_msg_account."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_msg_account."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_msg_account."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_msg_account."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_msg_account."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_msg_account."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_msg_account."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_msg_monitor
-- ----------------------------
CREATE TABLE base_msg_monitor (
	"f_id" varchar(50) NOT NULL,
	"f_account_id" varchar(50),
	"f_account_name" varchar(50),
	"f_account_code" varchar(50),
	"f_message_type" varchar(50),
	"f_message_source" varchar(50),
	"f_send_time" timestamp,
	"f_message_template_id" varchar(50),
	"f_title" varchar(200),
	"f_receive_user" text,
	"f_content" text,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_msg_monitor IS '消息监控表';
COMMENT ON COLUMN base_msg_monitor."f_id" IS '主键id';
COMMENT ON COLUMN base_msg_monitor."f_account_id" IS '账号id';
COMMENT ON COLUMN base_msg_monitor."f_account_name" IS '账号名称';
COMMENT ON COLUMN base_msg_monitor."f_account_code" IS '账号编码';
COMMENT ON COLUMN base_msg_monitor."f_message_type" IS '消息类型';
COMMENT ON COLUMN base_msg_monitor."f_message_source" IS '消息来源';
COMMENT ON COLUMN base_msg_monitor."f_send_time" IS '发送时间';
COMMENT ON COLUMN base_msg_monitor."f_message_template_id" IS '消息模板id';
COMMENT ON COLUMN base_msg_monitor."f_title" IS '标题';
COMMENT ON COLUMN base_msg_monitor."f_receive_user" IS '接收人';
COMMENT ON COLUMN base_msg_monitor."f_content" IS '内容';
COMMENT ON COLUMN base_msg_monitor."f_sort_code" IS '排序';
COMMENT ON COLUMN base_msg_monitor."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_msg_monitor."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_msg_monitor."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_msg_monitor."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_msg_monitor."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_msg_monitor."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_msg_monitor."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_msg_monitor."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_msg_send
-- ----------------------------
CREATE TABLE base_msg_send (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_template_type" varchar(50),
	"f_message_source" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_msg_send IS '消息发送配置表';
COMMENT ON COLUMN base_msg_send."f_id" IS '主键id';
COMMENT ON COLUMN base_msg_send."f_full_name" IS '名称';
COMMENT ON COLUMN base_msg_send."f_en_code" IS '编码';
COMMENT ON COLUMN base_msg_send."f_template_type" IS '模板类型';
COMMENT ON COLUMN base_msg_send."f_message_source" IS '消息来源';
COMMENT ON COLUMN base_msg_send."f_description" IS '描述或说明';
COMMENT ON COLUMN base_msg_send."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_msg_send."f_sort_code" IS '排序';
COMMENT ON COLUMN base_msg_send."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_msg_send."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_msg_send."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_msg_send."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_msg_send."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_msg_send."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_msg_send."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_msg_send."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_msg_send_template
-- ----------------------------
CREATE TABLE base_msg_send_template (
	"f_id" varchar(50) NOT NULL,
	"f_send_config_id" varchar(50),
	"f_message_type" varchar(50),
	"f_template_id" varchar(50),
	"f_account_config_id" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_msg_send_template IS '发送配置模板表';
COMMENT ON COLUMN base_msg_send_template."f_id" IS '主键id';
COMMENT ON COLUMN base_msg_send_template."f_send_config_id" IS '消息发送配置id';
COMMENT ON COLUMN base_msg_send_template."f_message_type" IS '消息类型';
COMMENT ON COLUMN base_msg_send_template."f_template_id" IS '消息模板id';
COMMENT ON COLUMN base_msg_send_template."f_account_config_id" IS '账号配置id';
COMMENT ON COLUMN base_msg_send_template."f_description" IS '描述或说明';
COMMENT ON COLUMN base_msg_send_template."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_msg_send_template."f_sort_code" IS '排序';
COMMENT ON COLUMN base_msg_send_template."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_msg_send_template."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_msg_send_template."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_msg_send_template."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_msg_send_template."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_msg_send_template."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_msg_send_template."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_msg_send_template."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_msg_short_link
-- ----------------------------
CREATE TABLE base_msg_short_link (
	"f_id" varchar(50) NOT NULL,
	"f_short_link" varchar(200),
	"f_real_pc_link" varchar(500),
	"f_real_app_link" varchar(500),
	"f_body_text" text,
	"f_is_used" int4,
	"f_click_num" int4,
	"f_unable_num" int4,
	"f_unable_time" timestamp,
	"f_user_id" varchar(50),
	"f_enabled_mark" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_sort_code" int8

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_msg_short_link IS '消息链接表';
COMMENT ON COLUMN base_msg_short_link."f_id" IS '自然主键';
COMMENT ON COLUMN base_msg_short_link."f_short_link" IS '短链接';
COMMENT ON COLUMN base_msg_short_link."f_real_pc_link" IS 'PC端链接';
COMMENT ON COLUMN base_msg_short_link."f_real_app_link" IS 'App端链接';
COMMENT ON COLUMN base_msg_short_link."f_body_text" IS '流程内容';
COMMENT ON COLUMN base_msg_short_link."f_is_used" IS '是否点击后失效';
COMMENT ON COLUMN base_msg_short_link."f_click_num" IS '点击次数';
COMMENT ON COLUMN base_msg_short_link."f_unable_num" IS '失效次数';
COMMENT ON COLUMN base_msg_short_link."f_unable_time" IS '失效时间';
COMMENT ON COLUMN base_msg_short_link."f_user_id" IS '用户id';
COMMENT ON COLUMN base_msg_short_link."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_msg_short_link."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_msg_short_link."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_msg_short_link."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_msg_short_link."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_msg_short_link."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_msg_short_link."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_msg_short_link."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_msg_short_link."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_msg_short_link."f_sort_code" IS '排序';
-- ----------------------------
-- 表名：base_msg_sms_field
-- ----------------------------
CREATE TABLE base_msg_sms_field (
	"f_id" varchar(50) NOT NULL,
	"f_template_id" varchar(50),
	"f_field_id" varchar(50),
	"f_sms_field" varchar(50),
	"f_field" varchar(50),
	"f_is_title" int4,
	"f_enabled_mark" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_sort_code" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_msg_sms_field IS '短信变量表';
COMMENT ON COLUMN base_msg_sms_field."f_id" IS '主键id';
COMMENT ON COLUMN base_msg_sms_field."f_template_id" IS '消息模板id';
COMMENT ON COLUMN base_msg_sms_field."f_field_id" IS '参数id';
COMMENT ON COLUMN base_msg_sms_field."f_sms_field" IS '短信变量';
COMMENT ON COLUMN base_msg_sms_field."f_field" IS '参数';
COMMENT ON COLUMN base_msg_sms_field."f_is_title" IS '是否标题';
COMMENT ON COLUMN base_msg_sms_field."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_msg_sms_field."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_msg_sms_field."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_msg_sms_field."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_msg_sms_field."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_msg_sms_field."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_msg_sms_field."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_msg_sms_field."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_msg_sms_field."f_sort_code" IS '排序';
COMMENT ON COLUMN base_msg_sms_field."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_msg_template
-- ----------------------------
CREATE TABLE base_msg_template (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_template_type" varchar(50),
	"f_message_source" varchar(50),
	"f_message_type" varchar(50),
	"f_wx_skip" varchar(50),
	"f_xcx_app_id" varchar(50),
	"f_title" varchar(200),
	"f_content" text,
	"f_template_code" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_msg_template IS '消息模板表';
COMMENT ON COLUMN base_msg_template."f_id" IS '主键id';
COMMENT ON COLUMN base_msg_template."f_full_name" IS '名称';
COMMENT ON COLUMN base_msg_template."f_en_code" IS '编码';
COMMENT ON COLUMN base_msg_template."f_template_type" IS '模板类型';
COMMENT ON COLUMN base_msg_template."f_message_source" IS '消息来源';
COMMENT ON COLUMN base_msg_template."f_message_type" IS '消息类型';
COMMENT ON COLUMN base_msg_template."f_wx_skip" IS '跳转方式';
COMMENT ON COLUMN base_msg_template."f_xcx_app_id" IS '小程序id';
COMMENT ON COLUMN base_msg_template."f_title" IS '消息标题';
COMMENT ON COLUMN base_msg_template."f_content" IS '消息内容';
COMMENT ON COLUMN base_msg_template."f_template_code" IS '模板编号';
COMMENT ON COLUMN base_msg_template."f_description" IS '描述或说明';
COMMENT ON COLUMN base_msg_template."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_msg_template."f_sort_code" IS '排序';
COMMENT ON COLUMN base_msg_template."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_msg_template."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_msg_template."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_msg_template."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_msg_template."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_msg_template."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_msg_template."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_msg_template."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_msg_template_param
-- ----------------------------
CREATE TABLE base_msg_template_param (
	"f_id" varchar(50) NOT NULL,
	"f_template_id" varchar(50),
	"f_field" varchar(50),
	"f_field_name" varchar(50),
	"f_enabled_mark" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_sort_code" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_msg_template_param IS '消息模板参数表';
COMMENT ON COLUMN base_msg_template_param."f_id" IS '主键id';
COMMENT ON COLUMN base_msg_template_param."f_template_id" IS '消息模板id';
COMMENT ON COLUMN base_msg_template_param."f_field" IS '参数名称';
COMMENT ON COLUMN base_msg_template_param."f_field_name" IS '参数说明';
COMMENT ON COLUMN base_msg_template_param."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_msg_template_param."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_msg_template_param."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_msg_template_param."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_msg_template_param."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_msg_template_param."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_msg_template_param."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_msg_template_param."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_msg_template_param."f_sort_code" IS '排序';
COMMENT ON COLUMN base_msg_template_param."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_msg_wechat_user
-- ----------------------------
CREATE TABLE base_msg_wechat_user (
	"f_id" varchar(50) NOT NULL,
	"f_gzh_id" varchar(50),
	"f_user_id" varchar(50),
	"f_open_id" varchar(50),
	"f_close_mark" int4,
	"f_enabled_mark" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_sort_code" int8

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_msg_wechat_user IS '微信公众号用户关联表';
COMMENT ON COLUMN base_msg_wechat_user."f_id" IS '主键id';
COMMENT ON COLUMN base_msg_wechat_user."f_gzh_id" IS '微信公众号id';
COMMENT ON COLUMN base_msg_wechat_user."f_user_id" IS '用户id';
COMMENT ON COLUMN base_msg_wechat_user."f_open_id" IS '微信公众号用户id';
COMMENT ON COLUMN base_msg_wechat_user."f_close_mark" IS '是否关注';
COMMENT ON COLUMN base_msg_wechat_user."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_msg_wechat_user."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_msg_wechat_user."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_msg_wechat_user."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_msg_wechat_user."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_msg_wechat_user."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_msg_wechat_user."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_msg_wechat_user."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_msg_wechat_user."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_msg_wechat_user."f_sort_code" IS '排序';
-- ----------------------------
-- 表名：base_notice
-- ----------------------------
CREATE TABLE base_notice (
	"f_id" varchar(50) NOT NULL,
	"f_title" varchar(200),
	"f_body_text" text,
	"f_to_user_ids" text,
	"f_cover_image" text,
	"f_files" text,
	"f_expiration_time" timestamp,
	"f_category" varchar(50),
	"f_type" int4,
	"f_send_config_id" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_notice IS '消息实例';
COMMENT ON COLUMN base_notice."f_id" IS '自然主键';
COMMENT ON COLUMN base_notice."f_title" IS '标题';
COMMENT ON COLUMN base_notice."f_body_text" IS '正文';
COMMENT ON COLUMN base_notice."f_to_user_ids" IS '收件用户';
COMMENT ON COLUMN base_notice."f_cover_image" IS '封面图片';
COMMENT ON COLUMN base_notice."f_files" IS '附件';
COMMENT ON COLUMN base_notice."f_expiration_time" IS '过期时间';
COMMENT ON COLUMN base_notice."f_category" IS '分类';
COMMENT ON COLUMN base_notice."f_type" IS '提醒类型 1-站内信 2-自定义 3-不通知';
COMMENT ON COLUMN base_notice."f_send_config_id" IS '发送配置';
COMMENT ON COLUMN base_notice."f_description" IS '描述或说明';
COMMENT ON COLUMN base_notice."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_notice."f_sort_code" IS '排序';
COMMENT ON COLUMN base_notice."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_notice."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_notice."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_notice."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_notice."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_notice."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_notice."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_notice."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_organize
-- ----------------------------
CREATE TABLE base_organize (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_category" varchar(50),
	"f_en_code" varchar(200),
	"f_full_name" varchar(200),
	"f_manager_id" varchar(50),
	"f_property_json" text,
	"f_organize_id_tree" text,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_organize IS '组织机构';
COMMENT ON COLUMN base_organize."f_id" IS '自然主键';
COMMENT ON COLUMN base_organize."f_parent_id" IS '机构上级';
COMMENT ON COLUMN base_organize."f_category" IS '机构分类';
COMMENT ON COLUMN base_organize."f_en_code" IS '机构编号';
COMMENT ON COLUMN base_organize."f_full_name" IS '机构名称';
COMMENT ON COLUMN base_organize."f_manager_id" IS '机构主管';
COMMENT ON COLUMN base_organize."f_property_json" IS '扩展属性';
COMMENT ON COLUMN base_organize."f_organize_id_tree" IS '父级组织';
COMMENT ON COLUMN base_organize."f_description" IS '描述或说明';
COMMENT ON COLUMN base_organize."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_organize."f_sort_code" IS '排序';
COMMENT ON COLUMN base_organize."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_organize."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_organize."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_organize."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_organize."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_organize."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_organize."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_organize."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_organize_administrator
-- ----------------------------
CREATE TABLE base_organize_administrator (
	"f_id" varchar(50) NOT NULL,
	"f_user_id" varchar(50),
	"f_organize_id" varchar(50),
	"f_organize_type" varchar(50),
	"f_this_layer_add" int4,
	"f_this_layer_edit" int4,
	"f_this_layer_delete" int4,
	"f_sub_layer_add" int4,
	"f_sub_layer_edit" int4,
	"f_sub_layer_delete" int4,
	"f_this_layer_select" int4,
	"f_sub_layer_select" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_manager_group" varchar(500)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_organize_administrator IS '机构分级管理员';
COMMENT ON COLUMN base_organize_administrator."f_id" IS '自然主键';
COMMENT ON COLUMN base_organize_administrator."f_user_id" IS '用户主键';
COMMENT ON COLUMN base_organize_administrator."f_organize_id" IS '机构主键';
COMMENT ON COLUMN base_organize_administrator."f_organize_type" IS '机构类型';
COMMENT ON COLUMN base_organize_administrator."f_this_layer_add" IS '本层添加';
COMMENT ON COLUMN base_organize_administrator."f_this_layer_edit" IS '本层编辑';
COMMENT ON COLUMN base_organize_administrator."f_this_layer_delete" IS '本层删除';
COMMENT ON COLUMN base_organize_administrator."f_sub_layer_add" IS '子层添加';
COMMENT ON COLUMN base_organize_administrator."f_sub_layer_edit" IS '子层编辑';
COMMENT ON COLUMN base_organize_administrator."f_sub_layer_delete" IS '子层删除';
COMMENT ON COLUMN base_organize_administrator."f_this_layer_select" IS '本层查看';
COMMENT ON COLUMN base_organize_administrator."f_sub_layer_select" IS '子层查看';
COMMENT ON COLUMN base_organize_administrator."f_description" IS '描述或说明';
COMMENT ON COLUMN base_organize_administrator."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_organize_administrator."f_sort_code" IS '排序';
COMMENT ON COLUMN base_organize_administrator."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_organize_administrator."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_organize_administrator."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_organize_administrator."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_organize_administrator."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_organize_administrator."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_organize_administrator."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_organize_administrator."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_organize_administrator."f_manager_group" IS '管理组';
-- ----------------------------
-- 表名：base_organize_relation
-- ----------------------------
CREATE TABLE base_organize_relation (
	"f_id" varchar(50) NOT NULL,
	"f_organize_id" varchar(50),
	"f_object_type" varchar(50),
	"f_object_id" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_organize_relation IS '组织关系';
COMMENT ON COLUMN base_organize_relation."f_id" IS '自然主键';
COMMENT ON COLUMN base_organize_relation."f_organize_id" IS '组织主键';
COMMENT ON COLUMN base_organize_relation."f_object_type" IS '对象类型（角色：role）';
COMMENT ON COLUMN base_organize_relation."f_object_id" IS '对象主键';
COMMENT ON COLUMN base_organize_relation."f_sort_code" IS '排序';
COMMENT ON COLUMN base_organize_relation."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_organize_relation."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_organize_relation."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_organize_relation."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_organize_relation."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_organize_relation."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_organize_relation."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_organize_relation."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_permission_group
-- ----------------------------
CREATE TABLE base_permission_group (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_permission_member" varchar(4000),
	"f_sort_code" int8,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_type" int4

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE base_permission_group IS '权限组表';
COMMENT ON COLUMN base_permission_group."f_id" IS '自然主键';
COMMENT ON COLUMN base_permission_group."f_full_name" IS '名称';
COMMENT ON COLUMN base_permission_group."f_en_code" IS '编码';
COMMENT ON COLUMN base_permission_group."f_permission_member" IS '成员';
COMMENT ON COLUMN base_permission_group."f_sort_code" IS '排序';
COMMENT ON COLUMN base_permission_group."f_description" IS '说明';
COMMENT ON COLUMN base_permission_group."f_enabled_mark" IS '有效标志';
COMMENT ON COLUMN base_permission_group."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_permission_group."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_permission_group."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_permission_group."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_permission_group."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_permission_group."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_permission_group."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_permission_group."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_permission_group."f_type" IS '类型';
-- ----------------------------
-- 表名：base_portal
-- ----------------------------
CREATE TABLE base_portal (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_category" varchar(50),
	"f_type" int4 DEFAULT '0',
	"f_state" int4,
	"f_custom_url" varchar(500),
	"f_link_type" int4 DEFAULT '0',
	"f_enabled_lock" int4,
	"f_platform" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_platform_release" varchar(100)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_portal IS '门户表';
COMMENT ON COLUMN base_portal."f_id" IS '主键';
COMMENT ON COLUMN base_portal."f_full_name" IS '名称';
COMMENT ON COLUMN base_portal."f_en_code" IS '编码';
COMMENT ON COLUMN base_portal."f_category" IS '分类（数据字典）';
COMMENT ON COLUMN base_portal."f_type" IS '类型(0-页面设计,1-自定义路径)';
COMMENT ON COLUMN base_portal."f_state" IS '状态';
COMMENT ON COLUMN base_portal."f_custom_url" IS '静态页面路径';
COMMENT ON COLUMN base_portal."f_link_type" IS '链接类型(0-页面,1-外链)';
COMMENT ON COLUMN base_portal."f_enabled_lock" IS '锁定（0-锁定，1-自定义）';
COMMENT ON COLUMN base_portal."f_platform" IS 'PC:网页端 APP:手机端 MOD:模板';
COMMENT ON COLUMN base_portal."f_description" IS '描述或说明';
COMMENT ON COLUMN base_portal."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_portal."f_sort_code" IS '排序';
COMMENT ON COLUMN base_portal."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_portal."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_portal."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_portal."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_portal."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_portal."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_portal."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_portal."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_portal."f_platform_release" IS '发布选中平台';
-- ----------------------------
-- 表名：base_portal_data
-- ----------------------------
CREATE TABLE base_portal_data (
	"f_id" varchar(50) NOT NULL,
	"f_portal_id" varchar(50),
	"f_platform" varchar(50),
	"f_form_data" text,
	"f_system_id" varchar(50),
	"f_type" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_portal_data IS '门户数据';
COMMENT ON COLUMN base_portal_data."f_id" IS '主键id';
COMMENT ON COLUMN base_portal_data."f_portal_id" IS '门户ID';
COMMENT ON COLUMN base_portal_data."f_platform" IS 'PC:网页端 APP:手机端 ';
COMMENT ON COLUMN base_portal_data."f_form_data" IS '表单配置JSON';
COMMENT ON COLUMN base_portal_data."f_system_id" IS '系统ID';
COMMENT ON COLUMN base_portal_data."f_type" IS '类型（mod：模型、custom：自定义）';
COMMENT ON COLUMN base_portal_data."f_sort_code" IS '排序';
COMMENT ON COLUMN base_portal_data."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_portal_data."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_portal_data."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_portal_data."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_portal_data."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_portal_data."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_portal_data."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_portal_data."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_portal_manage
-- ----------------------------
CREATE TABLE base_portal_manage (
	"f_id" varchar(50) NOT NULL,
	"f_portal_id" varchar(50) NOT NULL,
	"f_system_id" varchar(50) NOT NULL,
	"f_platform" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_portal_manage IS '门户管理';
COMMENT ON COLUMN base_portal_manage."f_id" IS '主键_id';
COMMENT ON COLUMN base_portal_manage."f_portal_id" IS '门户id';
COMMENT ON COLUMN base_portal_manage."f_system_id" IS '系统id';
COMMENT ON COLUMN base_portal_manage."f_platform" IS '平台';
COMMENT ON COLUMN base_portal_manage."f_description" IS '说明';
COMMENT ON COLUMN base_portal_manage."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_portal_manage."f_sort_code" IS '排序';
COMMENT ON COLUMN base_portal_manage."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_portal_manage."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_portal_manage."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_portal_manage."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_portal_manage."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_portal_manage."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_portal_manage."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_portal_manage."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_position
-- ----------------------------
CREATE TABLE base_position (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_type" varchar(50),
	"f_property_json" text,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_organize_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_position IS '岗位信息';
COMMENT ON COLUMN base_position."f_id" IS '自然主键';
COMMENT ON COLUMN base_position."f_full_name" IS '岗位名称';
COMMENT ON COLUMN base_position."f_en_code" IS '岗位编号';
COMMENT ON COLUMN base_position."f_type" IS '岗位类型';
COMMENT ON COLUMN base_position."f_property_json" IS '扩展属性';
COMMENT ON COLUMN base_position."f_description" IS '描述或说明';
COMMENT ON COLUMN base_position."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_position."f_sort_code" IS '排序';
COMMENT ON COLUMN base_position."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_position."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_position."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_position."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_position."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_position."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_position."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_position."f_organize_id" IS '机构主键';
COMMENT ON COLUMN base_position."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_print_log
-- ----------------------------
CREATE TABLE base_print_log (
	"f_id" varchar(50) NOT NULL,
	"f_print_num" int4,
	"f_print_title" varchar(255),
	"f_print_id" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_print_log IS '打印模板日志';
COMMENT ON COLUMN base_print_log."f_id" IS '';
COMMENT ON COLUMN base_print_log."f_print_num" IS '打印条数';
COMMENT ON COLUMN base_print_log."f_print_title" IS '打印功能名称';
COMMENT ON COLUMN base_print_log."f_print_id" IS '模板id';
COMMENT ON COLUMN base_print_log."f_sort_code" IS '排序';
COMMENT ON COLUMN base_print_log."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_print_log."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_print_log."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_print_log."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_print_log."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_print_log."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_print_log."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_print_log."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_print_template
-- ----------------------------
CREATE TABLE base_print_template (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200) NOT NULL,
	"f_en_code" varchar(50) NOT NULL,
	"f_category" varchar(50) NOT NULL,
	"f_description" varchar(500),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_state" int4,
	"f_common_use" int4 DEFAULT '0',
	"f_visible_type" int4,
	"f_icon" varchar(255),
	"f_icon_background" varchar(255)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_print_template IS '打印模板';
COMMENT ON COLUMN base_print_template."f_id" IS '主键_id';
COMMENT ON COLUMN base_print_template."f_full_name" IS '名称';
COMMENT ON COLUMN base_print_template."f_en_code" IS '编码';
COMMENT ON COLUMN base_print_template."f_category" IS '分类';
COMMENT ON COLUMN base_print_template."f_description" IS '描述或说明';
COMMENT ON COLUMN base_print_template."f_sort_code" IS '排序';
COMMENT ON COLUMN base_print_template."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_print_template."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_print_template."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_print_template."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_print_template."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_print_template."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_print_template."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_print_template."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_print_template."f_state" IS '状态：0-未发布，1-已发布，2-已修改';
COMMENT ON COLUMN base_print_template."f_common_use" IS '通用-将该模板设为通用(0-表单用，1-业务打印模板用)';
COMMENT ON COLUMN base_print_template."f_visible_type" IS '发布范围：1-公开，2-权限设置';
COMMENT ON COLUMN base_print_template."f_icon" IS '图标';
COMMENT ON COLUMN base_print_template."f_icon_background" IS '图标颜色';
-- ----------------------------
-- 表名：base_print_version
-- ----------------------------
CREATE TABLE base_print_version (
	"f_id" varchar(50) NOT NULL,
	"f_template_id" varchar(50) NOT NULL,
	"f_state" int4,
	"f_version" int4,
	"f_print_template" text,
	"f_sort_code" int8,
	"f_description" varchar(500),
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_convert_config" text

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_print_version IS '打印模板版本';
COMMENT ON COLUMN base_print_version."f_id" IS '主键_id';
COMMENT ON COLUMN base_print_version."f_template_id" IS '打印模板id';
COMMENT ON COLUMN base_print_version."f_state" IS '状态：0-设计中，1-启用中，2-已归档';
COMMENT ON COLUMN base_print_version."f_version" IS '版本';
COMMENT ON COLUMN base_print_version."f_print_template" IS '打印模板json';
COMMENT ON COLUMN base_print_version."f_sort_code" IS '排序';
COMMENT ON COLUMN base_print_version."f_description" IS '描述或说明';
COMMENT ON COLUMN base_print_version."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_print_version."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_print_version."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_print_version."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_print_version."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_print_version."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_print_version."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_print_version."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_print_version."f_convert_config" IS '打印模板json';
-- ----------------------------
-- 表名：base_province
-- ----------------------------
CREATE TABLE base_province (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_en_code" varchar(200),
	"f_full_name" varchar(200),
	"f_quick_query" varchar(100),
	"f_type" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_province IS '行政区划';
COMMENT ON COLUMN base_province."f_id" IS '自然主键';
COMMENT ON COLUMN base_province."f_parent_id" IS '区域上级';
COMMENT ON COLUMN base_province."f_en_code" IS '区域编号';
COMMENT ON COLUMN base_province."f_full_name" IS '区域名称';
COMMENT ON COLUMN base_province."f_quick_query" IS '快速查询';
COMMENT ON COLUMN base_province."f_type" IS '区域类型';
COMMENT ON COLUMN base_province."f_description" IS '描述或说明';
COMMENT ON COLUMN base_province."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_province."f_sort_code" IS '排序';
COMMENT ON COLUMN base_province."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_province."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_province."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_province."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_province."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_province."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_province."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_province."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_province_atlas
-- ----------------------------
CREATE TABLE base_province_atlas (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_en_code" varchar(200),
	"f_full_name" varchar(200),
	"f_quick_query" varchar(50),
	"f_type" varchar(50),
	"f_division_code" varchar(50),
	"f_atlas_center" varchar(128),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_province_atlas IS '行政区划_门户地图';
COMMENT ON COLUMN base_province_atlas."f_id" IS '自然主键';
COMMENT ON COLUMN base_province_atlas."f_parent_id" IS '区域上级';
COMMENT ON COLUMN base_province_atlas."f_en_code" IS '区域编号';
COMMENT ON COLUMN base_province_atlas."f_full_name" IS '区域名称';
COMMENT ON COLUMN base_province_atlas."f_quick_query" IS '快速查询';
COMMENT ON COLUMN base_province_atlas."f_type" IS '区域类型';
COMMENT ON COLUMN base_province_atlas."f_division_code" IS '行政区划编码';
COMMENT ON COLUMN base_province_atlas."f_atlas_center" IS '中心经纬度';
COMMENT ON COLUMN base_province_atlas."f_description" IS '描述或说明';
COMMENT ON COLUMN base_province_atlas."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_province_atlas."f_sort_code" IS '排序';
COMMENT ON COLUMN base_province_atlas."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_province_atlas."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_province_atlas."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_province_atlas."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_province_atlas."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_province_atlas."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_province_atlas."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_province_atlas."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_role
-- ----------------------------
CREATE TABLE base_role (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_type" varchar(50),
	"f_property_json" text,
	"f_global_mark" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_role IS '系统角色';
COMMENT ON COLUMN base_role."f_id" IS '自然主键';
COMMENT ON COLUMN base_role."f_full_name" IS '角色名称';
COMMENT ON COLUMN base_role."f_en_code" IS '角色编号';
COMMENT ON COLUMN base_role."f_type" IS '角色类型';
COMMENT ON COLUMN base_role."f_property_json" IS '扩展属性';
COMMENT ON COLUMN base_role."f_global_mark" IS '全局标识';
COMMENT ON COLUMN base_role."f_description" IS '描述或说明';
COMMENT ON COLUMN base_role."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_role."f_sort_code" IS '排序';
COMMENT ON COLUMN base_role."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_role."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_role."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_role."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_role."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_role."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_role."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_role."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_schedule
-- ----------------------------
CREATE TABLE base_schedule (
	"f_id" varchar(50) NOT NULL,
	"f_category" varchar(50),
	"f_urgent" int4,
	"f_title" varchar(500),
	"f_content" text,
	"f_all_day" int4,
	"f_start_day" timestamp,
	"f_start_time" varchar(50),
	"f_end_day" timestamp,
	"f_end_time" varchar(50),
	"f_duration" int4,
	"f_color" varchar(50),
	"f_reminder_time" int4,
	"f_reminder_type" int4,
	"f_send_config_id" varchar(50),
	"f_send_config_name" varchar(200),
	"f_repetition" int4,
	"f_repeat_time" timestamp,
	"f_push_time" timestamp,
	"f_group_id" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_files" text

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_schedule IS '日程';
COMMENT ON COLUMN base_schedule."f_id" IS '主键';
COMMENT ON COLUMN base_schedule."f_category" IS '分类';
COMMENT ON COLUMN base_schedule."f_urgent" IS '紧急程度';
COMMENT ON COLUMN base_schedule."f_title" IS '标题';
COMMENT ON COLUMN base_schedule."f_content" IS '内容';
COMMENT ON COLUMN base_schedule."f_all_day" IS '全天';
COMMENT ON COLUMN base_schedule."f_start_day" IS '开始时间';
COMMENT ON COLUMN base_schedule."f_start_time" IS '开始日期';
COMMENT ON COLUMN base_schedule."f_end_day" IS '结束时间';
COMMENT ON COLUMN base_schedule."f_end_time" IS '结束日期';
COMMENT ON COLUMN base_schedule."f_duration" IS '时长';
COMMENT ON COLUMN base_schedule."f_color" IS '颜色';
COMMENT ON COLUMN base_schedule."f_reminder_time" IS '提醒时长';
COMMENT ON COLUMN base_schedule."f_reminder_type" IS '提醒方式(1-默认 2-自定义)';
COMMENT ON COLUMN base_schedule."f_send_config_id" IS '发送配置id';
COMMENT ON COLUMN base_schedule."f_send_config_name" IS '发送配置名称';
COMMENT ON COLUMN base_schedule."f_repetition" IS '重复提醒';
COMMENT ON COLUMN base_schedule."f_repeat_time" IS '结束重复';
COMMENT ON COLUMN base_schedule."f_push_time" IS '推送时间';
COMMENT ON COLUMN base_schedule."f_group_id" IS '分组id';
COMMENT ON COLUMN base_schedule."f_description" IS '描述或说明';
COMMENT ON COLUMN base_schedule."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_schedule."f_sort_code" IS '排序';
COMMENT ON COLUMN base_schedule."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_schedule."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_schedule."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_schedule."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_schedule."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_schedule."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_schedule."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_schedule."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_schedule."f_files" IS '附件';
-- ----------------------------
-- 表名：base_schedule_log
-- ----------------------------
CREATE TABLE base_schedule_log (
	"f_id" varchar(50) NOT NULL,
	"f_category" varchar(50),
	"f_urgent" int4,
	"f_title" varchar(500),
	"f_content" text,
	"f_all_day" int4,
	"f_start_day" timestamp,
	"f_start_time" varchar(50),
	"f_end_day" timestamp,
	"f_end_time" varchar(50),
	"f_duration" int4,
	"f_color" varchar(50),
	"f_reminder_time" int4,
	"f_reminder_type" int4,
	"f_send_config_id" varchar(50),
	"f_send_config_name" varchar(200),
	"f_repetition" int4,
	"f_repeat_time" timestamp,
	"f_push_time" timestamp,
	"f_group_id" varchar(50),
	"f_user_id" text,
	"f_schedule_id" varchar(50),
	"f_operation_type" varchar(1),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_schedule_log IS '日程日志';
COMMENT ON COLUMN base_schedule_log."f_id" IS '主键';
COMMENT ON COLUMN base_schedule_log."f_category" IS '分类';
COMMENT ON COLUMN base_schedule_log."f_urgent" IS '紧急程度';
COMMENT ON COLUMN base_schedule_log."f_title" IS '标题';
COMMENT ON COLUMN base_schedule_log."f_content" IS '内容';
COMMENT ON COLUMN base_schedule_log."f_all_day" IS '全天';
COMMENT ON COLUMN base_schedule_log."f_start_day" IS '开始时间';
COMMENT ON COLUMN base_schedule_log."f_start_time" IS '开始日期';
COMMENT ON COLUMN base_schedule_log."f_end_day" IS '结束时间';
COMMENT ON COLUMN base_schedule_log."f_end_time" IS '结束日期';
COMMENT ON COLUMN base_schedule_log."f_duration" IS '时长';
COMMENT ON COLUMN base_schedule_log."f_color" IS '颜色';
COMMENT ON COLUMN base_schedule_log."f_reminder_time" IS '提醒时长';
COMMENT ON COLUMN base_schedule_log."f_reminder_type" IS '提醒方式(1-默认 2-自定义)';
COMMENT ON COLUMN base_schedule_log."f_send_config_id" IS '发送配置id';
COMMENT ON COLUMN base_schedule_log."f_send_config_name" IS '发送配置名称';
COMMENT ON COLUMN base_schedule_log."f_repetition" IS '重复提醒';
COMMENT ON COLUMN base_schedule_log."f_repeat_time" IS '结束重复';
COMMENT ON COLUMN base_schedule_log."f_push_time" IS '推送时间';
COMMENT ON COLUMN base_schedule_log."f_group_id" IS '分组id';
COMMENT ON COLUMN base_schedule_log."f_user_id" IS '参与用户';
COMMENT ON COLUMN base_schedule_log."f_schedule_id" IS '日程id';
COMMENT ON COLUMN base_schedule_log."f_operation_type" IS '操作类型';
COMMENT ON COLUMN base_schedule_log."f_description" IS '描述或说明';
COMMENT ON COLUMN base_schedule_log."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_schedule_log."f_sort_code" IS '排序';
COMMENT ON COLUMN base_schedule_log."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_schedule_log."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_schedule_log."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_schedule_log."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_schedule_log."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_schedule_log."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_schedule_log."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_schedule_log."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_schedule_user
-- ----------------------------
CREATE TABLE base_schedule_user (
	"f_id" varchar(50) NOT NULL,
	"f_schedule_id" varchar(50),
	"f_to_user_id" varchar(50),
	"f_type" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_schedule_user IS '日程用户';
COMMENT ON COLUMN base_schedule_user."f_id" IS '主键';
COMMENT ON COLUMN base_schedule_user."f_schedule_id" IS '日程id';
COMMENT ON COLUMN base_schedule_user."f_to_user_id" IS '用户id';
COMMENT ON COLUMN base_schedule_user."f_type" IS '类型(1-系统添加 2-用户添加)';
COMMENT ON COLUMN base_schedule_user."f_description" IS '描述或说明';
COMMENT ON COLUMN base_schedule_user."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_schedule_user."f_sort_code" IS '排序';
COMMENT ON COLUMN base_schedule_user."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_schedule_user."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_schedule_user."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_schedule_user."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_schedule_user."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_schedule_user."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_schedule_user."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_schedule_user."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_sign_img
-- ----------------------------
CREATE TABLE base_sign_img (
	"f_id" varchar(50) NOT NULL,
	"f_sign_img" text,
	"f_is_default" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_sign_img IS '个性签名';
COMMENT ON COLUMN base_sign_img."f_id" IS '自然主键';
COMMENT ON COLUMN base_sign_img."f_sign_img" IS '签名图片';
COMMENT ON COLUMN base_sign_img."f_is_default" IS '是否默认';
COMMENT ON COLUMN base_sign_img."f_description" IS '描述或说明';
COMMENT ON COLUMN base_sign_img."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_sign_img."f_sort_code" IS '排序';
COMMENT ON COLUMN base_sign_img."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_sign_img."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_sign_img."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_sign_img."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_sign_img."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_sign_img."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_sign_img."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_sign_img."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_signature
-- ----------------------------
CREATE TABLE base_signature (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_icon" text,
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_description" varchar(500),
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_signature IS '电子签章';
COMMENT ON COLUMN base_signature."f_id" IS '自然主键';
COMMENT ON COLUMN base_signature."f_full_name" IS '名称';
COMMENT ON COLUMN base_signature."f_en_code" IS '编号';
COMMENT ON COLUMN base_signature."f_icon" IS '签章';
COMMENT ON COLUMN base_signature."f_enabled_mark" IS '有效标志';
COMMENT ON COLUMN base_signature."f_sort_code" IS '排序';
COMMENT ON COLUMN base_signature."f_description" IS '描述或说明';
COMMENT ON COLUMN base_signature."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_signature."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_signature."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_signature."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_signature."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_signature."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_signature."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_signature."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_signature_user
-- ----------------------------
CREATE TABLE base_signature_user (
	"f_id" varchar(50) NOT NULL,
	"f_signature_id" varchar(50),
	"f_user_id" varchar(50),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_description" varchar(500),
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_signature_user IS '电子签章授权人';
COMMENT ON COLUMN base_signature_user."f_id" IS '自然主键';
COMMENT ON COLUMN base_signature_user."f_signature_id" IS '签章主键';
COMMENT ON COLUMN base_signature_user."f_user_id" IS '用户主键';
COMMENT ON COLUMN base_signature_user."f_enabled_mark" IS '有效标志';
COMMENT ON COLUMN base_signature_user."f_sort_code" IS '排序';
COMMENT ON COLUMN base_signature_user."f_description" IS '描述或说明';
COMMENT ON COLUMN base_signature_user."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_signature_user."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_signature_user."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_signature_user."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_signature_user."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_signature_user."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_signature_user."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_signature_user."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_socials_users
-- ----------------------------
CREATE TABLE base_socials_users (
	"f_id" varchar(50) NOT NULL,
	"f_user_id" varchar(50),
	"f_social_type" varchar(50),
	"f_social_id" varchar(100),
	"f_social_name" varchar(100),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_socials_users IS '第三方绑定用户表';
COMMENT ON COLUMN base_socials_users."f_id" IS '自然主键';
COMMENT ON COLUMN base_socials_users."f_user_id" IS '用户id';
COMMENT ON COLUMN base_socials_users."f_social_type" IS '第三方类型';
COMMENT ON COLUMN base_socials_users."f_social_id" IS '第三方账号id';
COMMENT ON COLUMN base_socials_users."f_social_name" IS '第三方账号';
COMMENT ON COLUMN base_socials_users."f_sort_code" IS '排序';
COMMENT ON COLUMN base_socials_users."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_socials_users."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_socials_users."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_socials_users."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_socials_users."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_socials_users."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_socials_users."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_socials_users."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_syn_third_info
-- ----------------------------
CREATE TABLE base_syn_third_info (
	"f_id" varchar(50) NOT NULL,
	"f_third_type" int4,
	"f_data_type" int4,
	"f_sys_obj_id" varchar(50),
	"f_third_obj_id" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_syn_third_info IS '第三方同步信息';
COMMENT ON COLUMN base_syn_third_info."f_id" IS '自然主键';
COMMENT ON COLUMN base_syn_third_info."f_third_type" IS '第三方类型(1:企业微信，2:钉钉)';
COMMENT ON COLUMN base_syn_third_info."f_data_type" IS '数据类型(1:组织(公司与部门)，2:用户)';
COMMENT ON COLUMN base_syn_third_info."f_sys_obj_id" IS '系统对象ID';
COMMENT ON COLUMN base_syn_third_info."f_third_obj_id" IS '第三对象ID';
COMMENT ON COLUMN base_syn_third_info."f_description" IS '描述或说明';
COMMENT ON COLUMN base_syn_third_info."f_enabled_mark" IS '有效标志(0:未同步，1:同步成功，2:同步失败)';
COMMENT ON COLUMN base_syn_third_info."f_sort_code" IS '排序';
COMMENT ON COLUMN base_syn_third_info."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_syn_third_info."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_syn_third_info."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_syn_third_info."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_syn_third_info."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_syn_third_info."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_syn_third_info."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_syn_third_info."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_sys_config
-- ----------------------------
CREATE TABLE base_sys_config (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(50),
	"f_key" varchar(50),
	"f_value" text,
	"f_category" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_sys_config IS '系统配置';
COMMENT ON COLUMN base_sys_config."f_id" IS '自然主键';
COMMENT ON COLUMN base_sys_config."f_full_name" IS '名称';
COMMENT ON COLUMN base_sys_config."f_key" IS '键';
COMMENT ON COLUMN base_sys_config."f_value" IS '值';
COMMENT ON COLUMN base_sys_config."f_category" IS '分类';
COMMENT ON COLUMN base_sys_config."f_sort_code" IS '排序';
COMMENT ON COLUMN base_sys_config."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_sys_config."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_sys_config."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_sys_config."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_sys_config."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_sys_config."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_sys_config."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_sys_config."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_sys_log
-- ----------------------------
CREATE TABLE base_sys_log (
	"f_id" varchar(50) NOT NULL,
	"f_user_id" varchar(50),
	"f_user_name" varchar(100),
	"f_type" int4,
	"f_level" int4,
	"f_ip_address" varchar(50),
	"f_ip_address_name" varchar(50),
	"f_request_url" varchar(500),
	"f_request_method" varchar(50),
	"f_request_duration" int4,
	"f_json" text,
	"f_plat_form" varchar(500),
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_module_id" varchar(50),
	"f_module_name" varchar(50),
	"f_object_id" varchar(50),
	"f_description" varchar(500),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_browser" varchar(50),
	"f_request_param" text,
	"f_request_target" text,
	"f_login_mark" int4,
	"f_login_type" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_sys_log IS '系统日志';
COMMENT ON COLUMN base_sys_log."f_id" IS '自然主键';
COMMENT ON COLUMN base_sys_log."f_user_id" IS '用户主键';
COMMENT ON COLUMN base_sys_log."f_user_name" IS '用户主键';
COMMENT ON COLUMN base_sys_log."f_type" IS '日志类型';
COMMENT ON COLUMN base_sys_log."f_level" IS '日志级别';
COMMENT ON COLUMN base_sys_log."f_ip_address" IS 'IP地址';
COMMENT ON COLUMN base_sys_log."f_ip_address_name" IS 'IP所在城市';
COMMENT ON COLUMN base_sys_log."f_request_url" IS '请求地址';
COMMENT ON COLUMN base_sys_log."f_request_method" IS '请求方法';
COMMENT ON COLUMN base_sys_log."f_request_duration" IS '请求耗时';
COMMENT ON COLUMN base_sys_log."f_json" IS '日志内容';
COMMENT ON COLUMN base_sys_log."f_plat_form" IS '平台设备';
COMMENT ON COLUMN base_sys_log."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_sys_log."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_sys_log."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_sys_log."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_sys_log."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_sys_log."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_sys_log."f_module_id" IS '功能主键';
COMMENT ON COLUMN base_sys_log."f_module_name" IS '功能名称';
COMMENT ON COLUMN base_sys_log."f_object_id" IS '对象Id';
COMMENT ON COLUMN base_sys_log."f_description" IS '描述或说明';
COMMENT ON COLUMN base_sys_log."f_sort_code" IS '排序';
COMMENT ON COLUMN base_sys_log."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_sys_log."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_sys_log."f_browser" IS '浏览器';
COMMENT ON COLUMN base_sys_log."f_request_param" IS '请求参数';
COMMENT ON COLUMN base_sys_log."f_request_target" IS '请求方法';
COMMENT ON COLUMN base_sys_log."f_login_mark" IS '是否登录成功标志';
COMMENT ON COLUMN base_sys_log."f_login_type" IS '登录类型';
-- ----------------------------
-- 表名：base_system
-- ----------------------------
CREATE TABLE base_system (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_icon" varchar(200),
	"f_is_main" int4,
	"f_property_json" text,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_navigation_icon" varchar(500),
	"f_work_logo_icon" varchar(500),
	"f_workflow_enabled" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_system IS '系统应用';
COMMENT ON COLUMN base_system."f_id" IS '自然主键';
COMMENT ON COLUMN base_system."f_full_name" IS '系统名称';
COMMENT ON COLUMN base_system."f_en_code" IS '系统编号';
COMMENT ON COLUMN base_system."f_icon" IS '系统图标';
COMMENT ON COLUMN base_system."f_is_main" IS '是否是主系统（0-不是，1-是）';
COMMENT ON COLUMN base_system."f_property_json" IS '扩展属性';
COMMENT ON COLUMN base_system."f_description" IS '描述或说明';
COMMENT ON COLUMN base_system."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_system."f_sort_code" IS '排序';
COMMENT ON COLUMN base_system."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_system."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_system."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_system."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_system."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_system."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_system."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_system."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_system."f_navigation_icon" IS '';
COMMENT ON COLUMN base_system."f_work_logo_icon" IS 'logo图标';
COMMENT ON COLUMN base_system."f_workflow_enabled" IS '已启用工作流';
-- ----------------------------
-- 表名：base_time_task
-- ----------------------------
CREATE TABLE base_time_task (
	"f_id" varchar(50) NOT NULL,
	"f_en_code" varchar(200),
	"f_full_name" varchar(200),
	"f_execute_type" int4,
	"f_execute_content" text,
	"f_execute_cycle_json" text,
	"f_last_run_time" timestamp,
	"f_next_run_time" timestamp,
	"f_run_count" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_time_task IS '定时任务';
COMMENT ON COLUMN base_time_task."f_id" IS '自然主键';
COMMENT ON COLUMN base_time_task."f_en_code" IS '任务编码';
COMMENT ON COLUMN base_time_task."f_full_name" IS '任务名称';
COMMENT ON COLUMN base_time_task."f_execute_type" IS '执行类型';
COMMENT ON COLUMN base_time_task."f_execute_content" IS '执行内容';
COMMENT ON COLUMN base_time_task."f_execute_cycle_json" IS '执行周期';
COMMENT ON COLUMN base_time_task."f_last_run_time" IS '最后运行时间';
COMMENT ON COLUMN base_time_task."f_next_run_time" IS '下次运行时间';
COMMENT ON COLUMN base_time_task."f_run_count" IS '运行次数';
COMMENT ON COLUMN base_time_task."f_description" IS '描述或说明';
COMMENT ON COLUMN base_time_task."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_time_task."f_sort_code" IS '排序';
COMMENT ON COLUMN base_time_task."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_time_task."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_time_task."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_time_task."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_time_task."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_time_task."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_time_task."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_time_task."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_time_task_log
-- ----------------------------
CREATE TABLE base_time_task_log (
	"f_id" varchar(50) NOT NULL,
	"f_task_id" varchar(50),
	"f_run_time" timestamp,
	"f_run_result" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_time_task_log IS '定时任务记录';
COMMENT ON COLUMN base_time_task_log."f_id" IS '自然主键';
COMMENT ON COLUMN base_time_task_log."f_task_id" IS '定时任务主键';
COMMENT ON COLUMN base_time_task_log."f_run_time" IS '执行时间';
COMMENT ON COLUMN base_time_task_log."f_run_result" IS '执行结果(0-成功，1-失败)';
COMMENT ON COLUMN base_time_task_log."f_description" IS '描述或说明';
COMMENT ON COLUMN base_time_task_log."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_time_task_log."f_sort_code" IS '排序';
COMMENT ON COLUMN base_time_task_log."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_time_task_log."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_time_task_log."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_time_task_log."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_time_task_log."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_time_task_log."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_time_task_log."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_time_task_log."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_user
-- ----------------------------
CREATE TABLE base_user (
	"f_id" varchar(50) NOT NULL,
	"f_account" varchar(50),
	"f_real_name" varchar(50),
	"f_quick_query" varchar(100),
	"f_nick_name" varchar(50),
	"f_head_icon" text,
	"f_gender" varchar(50),
	"f_birthday" timestamp,
	"f_mobile_phone" varchar(20),
	"f_tele_phone" varchar(20),
	"f_landline" varchar(50),
	"f_email" varchar(50),
	"f_nation" varchar(50),
	"f_native_place" varchar(50),
	"f_entry_date" timestamp,
	"f_certificates_type" varchar(50),
	"f_certificates_number" varchar(50),
	"f_education" varchar(50),
	"f_urgent_contacts" varchar(50),
	"f_urgent_tele_phone" varchar(50),
	"f_postal_address" varchar(500),
	"f_signature" varchar(500),
	"f_password" varchar(50),
	"f_secretkey" varchar(50),
	"f_first_log_time" timestamp,
	"f_first_log_ip" varchar(50),
	"f_prev_log_time" timestamp,
	"f_prev_log_ip" varchar(50),
	"f_last_log_time" timestamp,
	"f_last_log_ip" varchar(50),
	"f_log_success_count" int4,
	"f_log_error_count" int4,
	"f_change_password_date" timestamp,
	"f_language" varchar(50),
	"f_theme" varchar(50),
	"f_common_menu" text,
	"f_is_administrator" int4,
	"f_property_json" text,
	"f_manager_id" varchar(50),
	"f_organize_id" varchar(50),
	"f_position_id" varchar(50),
	"f_role_id" text,
	"f_portal_id" text,
	"f_lock_mark" int4,
	"f_unlock_time" timestamp,
	"f_group_id" varchar(50),
	"f_system_id" varchar(50),
	"f_handover_mark" int4,
	"f_app_system_id" varchar(50),
	"f_ding_job_number" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_handover_userid" varchar(100),
	"f_rank" varchar(50),
	"f_standing" int4,
	"f_app_standing" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_user IS '用户信息';
COMMENT ON COLUMN base_user."f_id" IS '自然主键';
COMMENT ON COLUMN base_user."f_account" IS '账户';
COMMENT ON COLUMN base_user."f_real_name" IS '姓名';
COMMENT ON COLUMN base_user."f_quick_query" IS '快速查询';
COMMENT ON COLUMN base_user."f_nick_name" IS '呢称';
COMMENT ON COLUMN base_user."f_head_icon" IS '头像';
COMMENT ON COLUMN base_user."f_gender" IS '性别';
COMMENT ON COLUMN base_user."f_birthday" IS '生日';
COMMENT ON COLUMN base_user."f_mobile_phone" IS '手机';
COMMENT ON COLUMN base_user."f_tele_phone" IS '电话';
COMMENT ON COLUMN base_user."f_landline" IS 'F_Landline';
COMMENT ON COLUMN base_user."f_email" IS '邮箱';
COMMENT ON COLUMN base_user."f_nation" IS '民族';
COMMENT ON COLUMN base_user."f_native_place" IS '籍贯';
COMMENT ON COLUMN base_user."f_entry_date" IS '入职日期';
COMMENT ON COLUMN base_user."f_certificates_type" IS '证件类型';
COMMENT ON COLUMN base_user."f_certificates_number" IS '证件号码';
COMMENT ON COLUMN base_user."f_education" IS '文化程度';
COMMENT ON COLUMN base_user."f_urgent_contacts" IS 'F_UrgentContacts';
COMMENT ON COLUMN base_user."f_urgent_tele_phone" IS '紧急电话';
COMMENT ON COLUMN base_user."f_postal_address" IS '通讯地址';
COMMENT ON COLUMN base_user."f_signature" IS '自我介绍';
COMMENT ON COLUMN base_user."f_password" IS '密码';
COMMENT ON COLUMN base_user."f_secretkey" IS '秘钥';
COMMENT ON COLUMN base_user."f_first_log_time" IS '首次登录时间';
COMMENT ON COLUMN base_user."f_first_log_ip" IS '首次登录IP';
COMMENT ON COLUMN base_user."f_prev_log_time" IS '前次登录时间';
COMMENT ON COLUMN base_user."f_prev_log_ip" IS '前次登录IP';
COMMENT ON COLUMN base_user."f_last_log_time" IS '最后登录时间';
COMMENT ON COLUMN base_user."f_last_log_ip" IS '最后登录IP';
COMMENT ON COLUMN base_user."f_log_success_count" IS '登录成功次数';
COMMENT ON COLUMN base_user."f_log_error_count" IS '登录错误次数';
COMMENT ON COLUMN base_user."f_change_password_date" IS '最后修改密码时间';
COMMENT ON COLUMN base_user."f_language" IS '系统语言';
COMMENT ON COLUMN base_user."f_theme" IS '系统样式';
COMMENT ON COLUMN base_user."f_common_menu" IS '常用菜单';
COMMENT ON COLUMN base_user."f_is_administrator" IS '是否管理员';
COMMENT ON COLUMN base_user."f_property_json" IS '扩展属性';
COMMENT ON COLUMN base_user."f_manager_id" IS '主管主键';
COMMENT ON COLUMN base_user."f_organize_id" IS '组织主键';
COMMENT ON COLUMN base_user."f_position_id" IS '岗位主键';
COMMENT ON COLUMN base_user."f_role_id" IS '角色主键';
COMMENT ON COLUMN base_user."f_portal_id" IS '门户主键';
COMMENT ON COLUMN base_user."f_lock_mark" IS '是否锁定';
COMMENT ON COLUMN base_user."f_unlock_time" IS '解锁时间';
COMMENT ON COLUMN base_user."f_group_id" IS '分组id';
COMMENT ON COLUMN base_user."f_system_id" IS '系统id';
COMMENT ON COLUMN base_user."f_handover_mark" IS '交接状态';
COMMENT ON COLUMN base_user."f_app_system_id" IS 'App系统id';
COMMENT ON COLUMN base_user."f_ding_job_number" IS '钉钉工号';
COMMENT ON COLUMN base_user."f_description" IS '描述或说明';
COMMENT ON COLUMN base_user."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_user."f_sort_code" IS '排序';
COMMENT ON COLUMN base_user."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_user."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_user."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_user."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_user."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_user."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_user."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_user."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_user."f_handover_userid" IS '离职工作被交接的UserId';
COMMENT ON COLUMN base_user."f_rank" IS '职级';
COMMENT ON COLUMN base_user."f_standing" IS '身份(1.管理员 2.超管 3.普通用户)';
COMMENT ON COLUMN base_user."f_app_standing" IS 'app身份(1.管理员 2.超管 3.普通用户)';
-- ----------------------------
-- 表名：base_user_device
-- ----------------------------
CREATE TABLE base_user_device (
	"f_id" varchar(50) NOT NULL,
	"f_client_id" varchar(50),
	"f_user_id" varchar(50),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_user_device IS '用户登录设备id表';
COMMENT ON COLUMN base_user_device."f_id" IS '主键id';
COMMENT ON COLUMN base_user_device."f_client_id" IS '设备id';
COMMENT ON COLUMN base_user_device."f_user_id" IS '用户id';
COMMENT ON COLUMN base_user_device."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_user_device."f_sort_code" IS '排序';
COMMENT ON COLUMN base_user_device."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_user_device."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_user_device."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_user_device."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_user_device."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_user_device."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_user_device."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_user_device."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_user_old_password
-- ----------------------------
CREATE TABLE base_user_old_password (
	"f_id" varchar(50) NOT NULL,
	"f_user_id" varchar(50),
	"f_account" varchar(50),
	"f_old_password" varchar(50),
	"f_secretkey" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_user_old_password IS '用户旧密码记录表';
COMMENT ON COLUMN base_user_old_password."f_id" IS '自然主键';
COMMENT ON COLUMN base_user_old_password."f_user_id" IS 'userid';
COMMENT ON COLUMN base_user_old_password."f_account" IS '账户';
COMMENT ON COLUMN base_user_old_password."f_old_password" IS '旧密码';
COMMENT ON COLUMN base_user_old_password."f_secretkey" IS '秘钥';
COMMENT ON COLUMN base_user_old_password."f_sort_code" IS '排序';
COMMENT ON COLUMN base_user_old_password."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_user_old_password."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_user_old_password."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_user_old_password."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_user_old_password."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_user_old_password."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_user_old_password."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_user_old_password."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_user_relation
-- ----------------------------
CREATE TABLE base_user_relation (
	"f_id" varchar(50) NOT NULL,
	"f_user_id" varchar(50),
	"f_object_type" varchar(50),
	"f_object_id" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_user_relation IS '用户关系';
COMMENT ON COLUMN base_user_relation."f_id" IS '自然主键';
COMMENT ON COLUMN base_user_relation."f_user_id" IS '用户主键';
COMMENT ON COLUMN base_user_relation."f_object_type" IS '对象类型';
COMMENT ON COLUMN base_user_relation."f_object_id" IS '对象主键';
COMMENT ON COLUMN base_user_relation."f_sort_code" IS '排序';
COMMENT ON COLUMN base_user_relation."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_user_relation."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_user_relation."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_user_relation."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_user_relation."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_user_relation."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_user_relation."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_user_relation."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_visual_alias
-- ----------------------------
CREATE TABLE base_visual_alias (
	"f_id" varchar(50) NOT NULL,
	"f_visual_id" varchar(50),
	"f_alias_name" varchar(255),
	"f_table_name" varchar(255),
	"f_field_name" varchar(255),
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_visual_alias IS '代码生成命名规范';
COMMENT ON COLUMN base_visual_alias."f_id" IS '自然主键';
COMMENT ON COLUMN base_visual_alias."f_visual_id" IS '表单主键';
COMMENT ON COLUMN base_visual_alias."f_alias_name" IS '规范名称';
COMMENT ON COLUMN base_visual_alias."f_table_name" IS '表名';
COMMENT ON COLUMN base_visual_alias."f_field_name" IS '字段名';
COMMENT ON COLUMN base_visual_alias."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_visual_alias."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_visual_alias."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_visual_alias."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_visual_alias."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_visual_alias."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_visual_alias."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_visual_alias."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_visual_dev
-- ----------------------------
CREATE TABLE base_visual_dev (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_state" int4,
	"f_type" int4,
	"f_tables_data" text,
	"f_category" varchar(50),
	"f_form_data" text,
	"f_column_data" text,
	"f_db_link_id" varchar(50),
	"f_web_type" int4,
	"f_app_column_data" text,
	"f_enable_flow" int4,
	"f_interface_id" varchar(50),
	"f_interface_param" text,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_platform_release" varchar(100),
	"f_url_address" varchar(500),
	"f_app_url_address" varchar(500),
	"f_interface_url" varchar(500)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_visual_dev IS '可视化开发功能表';
COMMENT ON COLUMN base_visual_dev."f_id" IS '主键';
COMMENT ON COLUMN base_visual_dev."f_full_name" IS '名称';
COMMENT ON COLUMN base_visual_dev."f_en_code" IS '编码';
COMMENT ON COLUMN base_visual_dev."f_state" IS '状态(0-暂存（默认），1-发布)';
COMMENT ON COLUMN base_visual_dev."f_type" IS '状态(0-暂存(默认),1-发布,2-已修改)';
COMMENT ON COLUMN base_visual_dev."f_tables_data" IS '关联的表';
COMMENT ON COLUMN base_visual_dev."f_category" IS '分类（数据字典）';
COMMENT ON COLUMN base_visual_dev."f_form_data" IS '表单配置JSON';
COMMENT ON COLUMN base_visual_dev."f_column_data" IS '列表配置JSON';
COMMENT ON COLUMN base_visual_dev."f_db_link_id" IS '关联数据连接id';
COMMENT ON COLUMN base_visual_dev."f_web_type" IS '页面类型（1、纯表单，2、表单加列表，4、数据视图）';
COMMENT ON COLUMN base_visual_dev."f_app_column_data" IS 'app列表配置JSON';
COMMENT ON COLUMN base_visual_dev."f_enable_flow" IS '启用流程';
COMMENT ON COLUMN base_visual_dev."f_interface_id" IS '接口id';
COMMENT ON COLUMN base_visual_dev."f_interface_param" IS '接口参数';
COMMENT ON COLUMN base_visual_dev."f_description" IS '描述或说明';
COMMENT ON COLUMN base_visual_dev."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_visual_dev."f_sort_code" IS '排序';
COMMENT ON COLUMN base_visual_dev."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_visual_dev."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_visual_dev."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_visual_dev."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_visual_dev."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_visual_dev."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_visual_dev."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_visual_dev."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_visual_dev."f_platform_release" IS '发布选中平台';
COMMENT ON COLUMN base_visual_dev."f_url_address" IS 'Web地址';
COMMENT ON COLUMN base_visual_dev."f_app_url_address" IS 'APP地址';
COMMENT ON COLUMN base_visual_dev."f_interface_url" IS '接口路径';
-- ----------------------------
-- 表名：base_visual_filter
-- ----------------------------
CREATE TABLE base_visual_filter (
	"f_id" varchar(50) NOT NULL,
	"f_module_id" varchar(50),
	"f_config" text,
	"f_config_app" text,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_visual_filter IS '过滤配置表';
COMMENT ON COLUMN base_visual_filter."f_id" IS '';
COMMENT ON COLUMN base_visual_filter."f_module_id" IS '在线和代码生成记录主键';
COMMENT ON COLUMN base_visual_filter."f_config" IS '过滤配置';
COMMENT ON COLUMN base_visual_filter."f_config_app" IS '过滤配置app';
COMMENT ON COLUMN base_visual_filter."f_sort_code" IS '排序';
COMMENT ON COLUMN base_visual_filter."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_visual_filter."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_visual_filter."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_visual_filter."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_visual_filter."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_visual_filter."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_visual_filter."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_visual_filter."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_visual_kit
-- ----------------------------
CREATE TABLE base_visual_kit (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_category" varchar(50),
	"f_form_data" text,
	"f_icon" varchar(255),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_visual_kit IS '表单套件表';
COMMENT ON COLUMN base_visual_kit."f_id" IS '主键';
COMMENT ON COLUMN base_visual_kit."f_full_name" IS '名称';
COMMENT ON COLUMN base_visual_kit."f_en_code" IS '编码';
COMMENT ON COLUMN base_visual_kit."f_category" IS '分类（数据字典）';
COMMENT ON COLUMN base_visual_kit."f_form_data" IS '表单套件JSON';
COMMENT ON COLUMN base_visual_kit."f_icon" IS '图标';
COMMENT ON COLUMN base_visual_kit."f_description" IS '描述或说明';
COMMENT ON COLUMN base_visual_kit."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_visual_kit."f_sort_code" IS '排序';
COMMENT ON COLUMN base_visual_kit."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_visual_kit."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_visual_kit."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_visual_kit."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_visual_kit."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_visual_kit."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_visual_kit."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_visual_kit."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_visual_link
-- ----------------------------
CREATE TABLE base_visual_link (
	"f_id" varchar(50) NOT NULL,
	"f_short_link" varchar(500),
	"f_form_use" int4,
	"f_form_link" varchar(500),
	"f_form_pass_use" int4,
	"f_form_password" varchar(500),
	"f_column_use" int4,
	"f_column_link" varchar(500),
	"f_column_pass_use" int4,
	"f_column_password" varchar(500),
	"f_column_condition" text,
	"f_column_text" text,
	"f_real_pc_link" varchar(500),
	"f_real_app_link" varchar(500),
	"f_user_id" varchar(50),
	"f_enabled_mark" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_sort_code" int8

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_visual_link IS '表单外链配置表';
COMMENT ON COLUMN base_visual_link."f_id" IS '自然主键';
COMMENT ON COLUMN base_visual_link."f_short_link" IS '短链接';
COMMENT ON COLUMN base_visual_link."f_form_use" IS '外链填单开关';
COMMENT ON COLUMN base_visual_link."f_form_link" IS '外链填单';
COMMENT ON COLUMN base_visual_link."f_form_pass_use" IS '外链密码开关';
COMMENT ON COLUMN base_visual_link."f_form_password" IS '外链填单密码';
COMMENT ON COLUMN base_visual_link."f_column_use" IS '公开查询开关';
COMMENT ON COLUMN base_visual_link."f_column_link" IS '公开查询';
COMMENT ON COLUMN base_visual_link."f_column_pass_use" IS '查询密码开关';
COMMENT ON COLUMN base_visual_link."f_column_password" IS '公开查询密码';
COMMENT ON COLUMN base_visual_link."f_column_condition" IS '查询条件';
COMMENT ON COLUMN base_visual_link."f_column_text" IS '显示内容';
COMMENT ON COLUMN base_visual_link."f_real_pc_link" IS 'PC端链接';
COMMENT ON COLUMN base_visual_link."f_real_app_link" IS 'App端链接';
COMMENT ON COLUMN base_visual_link."f_user_id" IS '用户id';
COMMENT ON COLUMN base_visual_link."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_visual_link."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_visual_link."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_visual_link."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_visual_link."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_visual_link."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_visual_link."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_visual_link."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_visual_link."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_visual_link."f_sort_code" IS '排序';
-- ----------------------------
-- 表名：base_visual_log
-- ----------------------------
CREATE TABLE base_visual_log (
	"f_id" varchar(50) NOT NULL,
	"f_model_id" varchar(50),
	"f_type" int4,
	"f_data_id" varchar(50),
	"f_data_log" text,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_visual_log IS '在线开发数据日志表';
COMMENT ON COLUMN base_visual_log."f_id" IS '主键';
COMMENT ON COLUMN base_visual_log."f_model_id" IS '模板id';
COMMENT ON COLUMN base_visual_log."f_type" IS '日志类型：0-新建，1-编辑';
COMMENT ON COLUMN base_visual_log."f_data_id" IS '数据id';
COMMENT ON COLUMN base_visual_log."f_data_log" IS '日志内容';
COMMENT ON COLUMN base_visual_log."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_visual_log."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_visual_log."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_visual_log."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_visual_log."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_visual_log."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_visual_log."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_visual_log."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_visual_personal
-- ----------------------------
CREATE TABLE base_visual_personal (
	"f_id" varchar(50) NOT NULL,
	"f_menu_id" varchar(50),
	"f_full_name" varchar(255),
	"f_type" int4,
	"f_status" int4,
	"f_search_list" text,
	"f_column_list" text,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_visual_personal IS '列表个性视图';
COMMENT ON COLUMN base_visual_personal."f_id" IS '主键';
COMMENT ON COLUMN base_visual_personal."f_menu_id" IS '菜单id';
COMMENT ON COLUMN base_visual_personal."f_full_name" IS '视图名称';
COMMENT ON COLUMN base_visual_personal."f_type" IS '类型：0-系统，1-其他';
COMMENT ON COLUMN base_visual_personal."f_status" IS '状态：0-其他，1-默认';
COMMENT ON COLUMN base_visual_personal."f_search_list" IS '查询字段';
COMMENT ON COLUMN base_visual_personal."f_column_list" IS '列表字段';
COMMENT ON COLUMN base_visual_personal."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_visual_personal."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_visual_personal."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_visual_personal."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_visual_personal."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_visual_personal."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_visual_personal."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_visual_personal."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：base_visual_release
-- ----------------------------
CREATE TABLE base_visual_release (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(200),
	"f_en_code" varchar(200),
	"f_state" int4,
	"f_type" int4,
	"f_tables_data" text,
	"f_category" varchar(50),
	"f_form_data" text,
	"f_column_data" text,
	"f_db_link_id" varchar(50),
	"f_web_type" int4,
	"f_app_column_data" text,
	"f_enable_flow" int4 DEFAULT '0',
	"f_interface_id" varchar(50),
	"f_interface_param" text,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_url_address" varchar(500),
	"f_app_url_address" varchar(500),
	"f_interface_url" varchar(500),
	"f_old_content" text

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE base_visual_release IS '可视化开发功能已发布表';
COMMENT ON COLUMN base_visual_release."f_id" IS '主键';
COMMENT ON COLUMN base_visual_release."f_full_name" IS '名称';
COMMENT ON COLUMN base_visual_release."f_en_code" IS '编码';
COMMENT ON COLUMN base_visual_release."f_state" IS '状态(0-暂存（默认），1-发布)';
COMMENT ON COLUMN base_visual_release."f_type" IS '状态(0-暂存(默认),1-发布,2-已修改)';
COMMENT ON COLUMN base_visual_release."f_tables_data" IS '关联的表';
COMMENT ON COLUMN base_visual_release."f_category" IS '分类（数据字典）';
COMMENT ON COLUMN base_visual_release."f_form_data" IS '表单配置JSON';
COMMENT ON COLUMN base_visual_release."f_column_data" IS '列表配置JSON';
COMMENT ON COLUMN base_visual_release."f_db_link_id" IS '关联数据连接id';
COMMENT ON COLUMN base_visual_release."f_web_type" IS '页面类型（1、纯表单，2、表单加列表，4、数据视图）';
COMMENT ON COLUMN base_visual_release."f_app_column_data" IS 'app列表配置JSON';
COMMENT ON COLUMN base_visual_release."f_enable_flow" IS '启用流程';
COMMENT ON COLUMN base_visual_release."f_interface_id" IS '接口id';
COMMENT ON COLUMN base_visual_release."f_interface_param" IS '接口参数';
COMMENT ON COLUMN base_visual_release."f_description" IS '描述或说明';
COMMENT ON COLUMN base_visual_release."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN base_visual_release."f_sort_code" IS '排序';
COMMENT ON COLUMN base_visual_release."f_creator_time" IS '创建时间';
COMMENT ON COLUMN base_visual_release."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN base_visual_release."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN base_visual_release."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN base_visual_release."f_delete_time" IS '删除时间';
COMMENT ON COLUMN base_visual_release."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN base_visual_release."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN base_visual_release."f_tenant_id" IS '租户id';
COMMENT ON COLUMN base_visual_release."f_url_address" IS 'Web地址';
COMMENT ON COLUMN base_visual_release."f_app_url_address" IS 'APP地址';
COMMENT ON COLUMN base_visual_release."f_interface_url" IS '接口路径';
COMMENT ON COLUMN base_visual_release."f_old_content" IS '旧版数据json';
-- ----------------------------
-- 表名：blade_visual
-- ----------------------------
CREATE TABLE blade_visual (
	"id" varchar(64) NOT NULL,
	"title" varchar(255),
	"background_url" text,
	"category" int4,
	"password" varchar(255),
	"create_user" varchar(64),
	"create_dept" varchar(64),
	"create_time" timestamp,
	"update_user" varchar(64),
	"update_time" timestamp,
	"status" int4 NOT NULL,
	"is_deleted" int4 NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
COMMENT ON TABLE blade_visual IS '大屏信息';
COMMENT ON COLUMN blade_visual."id" IS '主键';
COMMENT ON COLUMN blade_visual."title" IS '大屏标题';
COMMENT ON COLUMN blade_visual."background_url" IS '大屏背景';
COMMENT ON COLUMN blade_visual."category" IS '大屏类型';
COMMENT ON COLUMN blade_visual."password" IS '发布密码';
COMMENT ON COLUMN blade_visual."create_user" IS '创建人';
COMMENT ON COLUMN blade_visual."create_dept" IS '创建部门';
COMMENT ON COLUMN blade_visual."create_time" IS '创建时间';
COMMENT ON COLUMN blade_visual."update_user" IS '修改人';
COMMENT ON COLUMN blade_visual."update_time" IS '修改时间';
COMMENT ON COLUMN blade_visual."status" IS '状态';
COMMENT ON COLUMN blade_visual."is_deleted" IS '是否已删除';
COMMENT ON COLUMN blade_visual."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：blade_visual_assets
-- ----------------------------
CREATE TABLE blade_visual_assets (
	"id" varchar(64) NOT NULL,
	"assetsname" varchar(100),
	"assetssize" varchar(50),
	"assetstime" timestamp,
	"assetstype" varchar(50),
	"assetsurl" varchar(255),
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (id,f_tenant_id)
);
COMMENT ON TABLE blade_visual_assets IS '大屏静态资源';
COMMENT ON COLUMN blade_visual_assets."id" IS '主键';
COMMENT ON COLUMN blade_visual_assets."assetsname" IS '资源名称';
COMMENT ON COLUMN blade_visual_assets."assetssize" IS '资源大小 1M';
COMMENT ON COLUMN blade_visual_assets."assetstime" IS '资源上传时间';
COMMENT ON COLUMN blade_visual_assets."assetstype" IS '资源后缀名';
COMMENT ON COLUMN blade_visual_assets."assetsurl" IS '资源地址';
COMMENT ON COLUMN blade_visual_assets."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：blade_visual_category
-- ----------------------------
CREATE TABLE blade_visual_category (
	"id" varchar(64) NOT NULL,
	"category_key" varchar(12),
	"category_value" varchar(64),
	"is_deleted" int4 NOT NULL DEFAULT '0',
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
COMMENT ON TABLE blade_visual_category IS '大屏分类';
COMMENT ON COLUMN blade_visual_category."id" IS '主键';
COMMENT ON COLUMN blade_visual_category."category_key" IS '分类键值';
COMMENT ON COLUMN blade_visual_category."category_value" IS '分类名称';
COMMENT ON COLUMN blade_visual_category."is_deleted" IS '是否已删除';
COMMENT ON COLUMN blade_visual_category."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：blade_visual_component
-- ----------------------------
CREATE TABLE blade_visual_component (
	"id" varchar(64) NOT NULL,
	"name" varchar(50),
	"content" text,
	"type" int4,
	"img" varchar(255),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
COMMENT ON TABLE blade_visual_component IS '大屏自定义组件';
COMMENT ON COLUMN blade_visual_component."id" IS '主键';
COMMENT ON COLUMN blade_visual_component."name" IS '组件名称';
COMMENT ON COLUMN blade_visual_component."content" IS '组件内容';
COMMENT ON COLUMN blade_visual_component."type" IS '';
COMMENT ON COLUMN blade_visual_component."img" IS '';
COMMENT ON COLUMN blade_visual_component."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：blade_visual_config
-- ----------------------------
CREATE TABLE blade_visual_config (
	"id" varchar(64) NOT NULL,
	"visual_id" varchar(64),
	"detail" text,
	"component" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
COMMENT ON TABLE blade_visual_config IS '大屏信息配置';
COMMENT ON COLUMN blade_visual_config."id" IS '主键';
COMMENT ON COLUMN blade_visual_config."visual_id" IS '可视化表主键';
COMMENT ON COLUMN blade_visual_config."detail" IS '配置json';
COMMENT ON COLUMN blade_visual_config."component" IS '组件json';
COMMENT ON COLUMN blade_visual_config."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：blade_visual_db
-- ----------------------------
CREATE TABLE blade_visual_db (
	"id" varchar(64) NOT NULL,
	"name" varchar(100),
	"driver_class" varchar(100),
	"url" varchar(500),
	"username" varchar(50),
	"password" varchar(100),
	"remark" varchar(255),
	"create_user" varchar(64),
	"create_dept" varchar(64),
	"create_time" timestamp,
	"update_user" varchar(64),
	"update_time" timestamp,
	"status" int4,
	"is_deleted" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
COMMENT ON TABLE blade_visual_db IS '大屏数据源';
COMMENT ON COLUMN blade_visual_db."id" IS '主键';
COMMENT ON COLUMN blade_visual_db."name" IS '名称';
COMMENT ON COLUMN blade_visual_db."driver_class" IS '驱动类';
COMMENT ON COLUMN blade_visual_db."url" IS '连接地址';
COMMENT ON COLUMN blade_visual_db."username" IS '用户名';
COMMENT ON COLUMN blade_visual_db."password" IS '密码';
COMMENT ON COLUMN blade_visual_db."remark" IS '备注';
COMMENT ON COLUMN blade_visual_db."create_user" IS '创建人';
COMMENT ON COLUMN blade_visual_db."create_dept" IS '创建部门';
COMMENT ON COLUMN blade_visual_db."create_time" IS '创建时间';
COMMENT ON COLUMN blade_visual_db."update_user" IS '修改人';
COMMENT ON COLUMN blade_visual_db."update_time" IS '修改时间';
COMMENT ON COLUMN blade_visual_db."status" IS '状态';
COMMENT ON COLUMN blade_visual_db."is_deleted" IS '是否已删除';
COMMENT ON COLUMN blade_visual_db."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：blade_visual_glob
-- ----------------------------
CREATE TABLE blade_visual_glob (
	"id" varchar(64) NOT NULL,
	"globalname" varchar(255),
	"globalkey" varchar(255),
	"globalvalue" varchar(4000),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
COMMENT ON TABLE blade_visual_glob IS '大屏全局变量';
COMMENT ON COLUMN blade_visual_glob."id" IS '主键';
COMMENT ON COLUMN blade_visual_glob."globalname" IS '变量名称';
COMMENT ON COLUMN blade_visual_glob."globalkey" IS '变量Key';
COMMENT ON COLUMN blade_visual_glob."globalvalue" IS '变量值';
COMMENT ON COLUMN blade_visual_glob."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：blade_visual_map
-- ----------------------------
CREATE TABLE blade_visual_map (
	"id" varchar(64) NOT NULL,
	"name" varchar(255),
	"data" text,
	"code" varchar(20),
	"map_level" int4,
	"parent_id" varchar(64),
	"parent_code" varchar(20),
	"ancestors" varchar(255),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
COMMENT ON TABLE blade_visual_map IS '大屏地图';
COMMENT ON COLUMN blade_visual_map."id" IS '主键';
COMMENT ON COLUMN blade_visual_map."name" IS '地图名称';
COMMENT ON COLUMN blade_visual_map."data" IS '地图数据';
COMMENT ON COLUMN blade_visual_map."code" IS '地图编码';
COMMENT ON COLUMN blade_visual_map."map_level" IS '地图级别 0:国家 1:省份 2:城市 3:区县';
COMMENT ON COLUMN blade_visual_map."parent_id" IS '上级ID';
COMMENT ON COLUMN blade_visual_map."parent_code" IS '上级编码';
COMMENT ON COLUMN blade_visual_map."ancestors" IS '祖编码';
COMMENT ON COLUMN blade_visual_map."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：blade_visual_record
-- ----------------------------
CREATE TABLE blade_visual_record (
	"id" varchar(64) NOT NULL,
	"name" varchar(255),
	"url" varchar(255),
	"datatype" int4,
	"datamethod" varchar(255),
	"dataheader" varchar(4000),
	"data" varchar(4000),
	"dataquery" varchar(4000),
	"dataquerytype" varchar(255),
	"dataformatter" text,
	"proxy" int4,
	"wsurl" varchar(255),
	"dbsql" varchar(255),
	"fsql" text,
	"result" varchar(255),
	"mqtturl" varchar(255),
	"mqttconfig" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
COMMENT ON TABLE blade_visual_record IS '大屏数据集';
COMMENT ON COLUMN blade_visual_record."id" IS '主键';
COMMENT ON COLUMN blade_visual_record."name" IS '名称';
COMMENT ON COLUMN blade_visual_record."url" IS '请求地址';
COMMENT ON COLUMN blade_visual_record."datatype" IS '数据集类型';
COMMENT ON COLUMN blade_visual_record."datamethod" IS '请求方法';
COMMENT ON COLUMN blade_visual_record."dataheader" IS '请求头部';
COMMENT ON COLUMN blade_visual_record."data" IS '请求数据';
COMMENT ON COLUMN blade_visual_record."dataquery" IS '请求参数';
COMMENT ON COLUMN blade_visual_record."dataquerytype" IS '请求参数类型';
COMMENT ON COLUMN blade_visual_record."dataformatter" IS '过滤器';
COMMENT ON COLUMN blade_visual_record."proxy" IS '开启跨域';
COMMENT ON COLUMN blade_visual_record."wsurl" IS 'WebSocket地址';
COMMENT ON COLUMN blade_visual_record."dbsql" IS '';
COMMENT ON COLUMN blade_visual_record."fsql" IS '';
COMMENT ON COLUMN blade_visual_record."result" IS '';
COMMENT ON COLUMN blade_visual_record."mqtturl" IS 'MQTT地址';
COMMENT ON COLUMN blade_visual_record."mqttconfig" IS 'MQTT配置';
COMMENT ON COLUMN blade_visual_record."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct293714178055641925
-- ----------------------------
CREATE TABLE ct293714178055641925 (
	"selectfield107" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_foreignid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct293714178055641925 IS '子表';
COMMENT ON COLUMN ct293714178055641925."selectfield107" IS '乐器';
COMMENT ON COLUMN ct293714178055641925."f_id" IS '主键';
COMMENT ON COLUMN ct293714178055641925."f_foreignid" IS '外键';
COMMENT ON COLUMN ct293714178055641925."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct294012196562705414
-- ----------------------------
CREATE TABLE ct294012196562705414 (
	"datefield117" timestamp,
	"datefield118" timestamp,
	"cominputfield119" varchar(255),
	"cominputfield120" varchar(255),
	"textareafield121" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_foreignid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct294012196562705414 IS '子表';
COMMENT ON COLUMN ct294012196562705414."datefield117" IS '开始日期';
COMMENT ON COLUMN ct294012196562705414."datefield118" IS '结束日期';
COMMENT ON COLUMN ct294012196562705414."cominputfield119" IS '公司名称';
COMMENT ON COLUMN ct294012196562705414."cominputfield120" IS '担任职务';
COMMENT ON COLUMN ct294012196562705414."textareafield121" IS '主要工作内容';
COMMENT ON COLUMN ct294012196562705414."f_id" IS '主键';
COMMENT ON COLUMN ct294012196562705414."f_foreignid" IS '外键';
COMMENT ON COLUMN ct294012196562705414."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct294022926200511493
-- ----------------------------
CREATE TABLE ct294022926200511493 (
	"cominputfield145" varchar(255),
	"cominputfield146" varchar(255),
	"cominputfield147" varchar(255),
	"cominputfield148" varchar(255),
	"cominputfield149" varchar(255),
	"cominputfield150" varchar(255),
	"cominputfield151" varchar(255),
	"cominputfield152" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_foreignid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct294022926200511493 IS '子表';
COMMENT ON COLUMN ct294022926200511493."cominputfield145" IS '包保人社区工作者姓名';
COMMENT ON COLUMN ct294022926200511493."cominputfield146" IS '包保人社区工作者联系方式';
COMMENT ON COLUMN ct294022926200511493."cominputfield147" IS '包保人医务工作者姓名';
COMMENT ON COLUMN ct294022926200511493."cominputfield148" IS '包保人医务工作者联系方式';
COMMENT ON COLUMN ct294022926200511493."cominputfield149" IS '包保人公安民警姓名';
COMMENT ON COLUMN ct294022926200511493."cominputfield150" IS '包保人公安民警联系方式';
COMMENT ON COLUMN ct294022926200511493."cominputfield151" IS '包保人志愿者姓名';
COMMENT ON COLUMN ct294022926200511493."cominputfield152" IS '包保人志愿者联系方式';
COMMENT ON COLUMN ct294022926200511493."f_id" IS '主键';
COMMENT ON COLUMN ct294022926200511493."f_foreignid" IS '外键';
COMMENT ON COLUMN ct294022926200511493."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct294031961024928774
-- ----------------------------
CREATE TABLE ct294031961024928774 (
	"selectfield108" varchar(255),
	"selectfield109" varchar(255),
	"numinputfield112" numeric(10,0),
	"cominputfield111" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_foreignid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct294031961024928774 IS '子表';
COMMENT ON COLUMN ct294031961024928774."selectfield108" IS '关联目标';
COMMENT ON COLUMN ct294031961024928774."selectfield109" IS '目标达成度';
COMMENT ON COLUMN ct294031961024928774."numinputfield112" IS '评分';
COMMENT ON COLUMN ct294031961024928774."cominputfield111" IS '情况描述';
COMMENT ON COLUMN ct294031961024928774."f_id" IS '主键';
COMMENT ON COLUMN ct294031961024928774."f_foreignid" IS '外键';
COMMENT ON COLUMN ct294031961024928774."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct294031961024928775
-- ----------------------------
CREATE TABLE ct294031961024928775 (
	"selectfield114" varchar(255),
	"selectfield115" varchar(255),
	"numinputfield116" numeric(10,0),
	"cominputfield117" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_foreignid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct294031961024928775 IS '子表';
COMMENT ON COLUMN ct294031961024928775."selectfield114" IS '关联结果';
COMMENT ON COLUMN ct294031961024928775."selectfield115" IS '关键结果达成度';
COMMENT ON COLUMN ct294031961024928775."numinputfield116" IS '评分';
COMMENT ON COLUMN ct294031961024928775."cominputfield117" IS '情况描述';
COMMENT ON COLUMN ct294031961024928775."f_id" IS '主键';
COMMENT ON COLUMN ct294031961024928775."f_foreignid" IS '外键';
COMMENT ON COLUMN ct294031961024928775."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct294037561750363142
-- ----------------------------
CREATE TABLE ct294037561750363142 (
	"cominputfield108" varchar(255),
	"datefield109" timestamp,
	"cominputfield110" varchar(255),
	"userselectfield111" varchar(255),
	"cominputfield124" varchar(255),
	"selectfield112" varchar(255),
	"numinputfield113" numeric(10,0),
	"uploadfzfield114" text,
	"f_id" varchar(50) NOT NULL,
	"f_foreignid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct294037561750363142 IS '子表';
COMMENT ON COLUMN ct294037561750363142."cominputfield108" IS '巡检结果';
COMMENT ON COLUMN ct294037561750363142."datefield109" IS '巡检日期';
COMMENT ON COLUMN ct294037561750363142."cominputfield110" IS '情况说明';
COMMENT ON COLUMN ct294037561750363142."userselectfield111" IS '巡检人';
COMMENT ON COLUMN ct294037561750363142."cominputfield124" IS '巡检人手机';
COMMENT ON COLUMN ct294037561750363142."selectfield112" IS '巡检分类';
COMMENT ON COLUMN ct294037561750363142."numinputfield113" IS '设备完好率';
COMMENT ON COLUMN ct294037561750363142."uploadfzfield114" IS '现场照片';
COMMENT ON COLUMN ct294037561750363142."f_id" IS '主键';
COMMENT ON COLUMN ct294037561750363142."f_foreignid" IS '外键';
COMMENT ON COLUMN ct294037561750363142."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct294037561750363143
-- ----------------------------
CREATE TABLE ct294037561750363143 (
	"cominputfield116" varchar(255),
	"datefield117" timestamp,
	"cominputfield118" varchar(255),
	"userselectfield119" varchar(255),
	"cominputfield125" varchar(255),
	"uploadfzfield122" text,
	"f_id" varchar(50) NOT NULL,
	"f_foreignid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct294037561750363143 IS '子表';
COMMENT ON COLUMN ct294037561750363143."cominputfield116" IS '维修结果';
COMMENT ON COLUMN ct294037561750363143."datefield117" IS '维修日期';
COMMENT ON COLUMN ct294037561750363143."cominputfield118" IS '维修内容';
COMMENT ON COLUMN ct294037561750363143."userselectfield119" IS '维修人';
COMMENT ON COLUMN ct294037561750363143."cominputfield125" IS '维修人手机';
COMMENT ON COLUMN ct294037561750363143."uploadfzfield122" IS '现场照片';
COMMENT ON COLUMN ct294037561750363143."f_id" IS '主键';
COMMENT ON COLUMN ct294037561750363143."f_foreignid" IS '外键';
COMMENT ON COLUMN ct294037561750363143."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct294099893327272966
-- ----------------------------
CREATE TABLE ct294099893327272966 (
	"cominputfield108" varchar(255),
	"datefield109" timestamp,
	"datefield110" timestamp,
	"cominputfield111" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_foreignid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct294099893327272966 IS '子表';
COMMENT ON COLUMN ct294099893327272966."cominputfield108" IS '出差地点';
COMMENT ON COLUMN ct294099893327272966."datefield109" IS '开始日期';
COMMENT ON COLUMN ct294099893327272966."datefield110" IS '结束日期';
COMMENT ON COLUMN ct294099893327272966."cominputfield111" IS '出差事由';
COMMENT ON COLUMN ct294099893327272966."f_id" IS '主键';
COMMENT ON COLUMN ct294099893327272966."f_foreignid" IS '外键';
COMMENT ON COLUMN ct294099893327272966."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct294376098702073542
-- ----------------------------
CREATE TABLE ct294376098702073542 (
	"cominputfield106" varchar(255),
	"cominputfield107" varchar(255),
	"numinputfield108" numeric(10,0),
	"numinputfield109" numeric(10,0),
	"numinputfield110" numeric(10,0),
	"numinputfield111" numeric(10,0),
	"f_id" varchar(50) NOT NULL,
	"f_foreignid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct294376098702073542 IS '子表';
COMMENT ON COLUMN ct294376098702073542."cominputfield106" IS '商品名';
COMMENT ON COLUMN ct294376098702073542."cominputfield107" IS '编号';
COMMENT ON COLUMN ct294376098702073542."numinputfield108" IS '销售价';
COMMENT ON COLUMN ct294376098702073542."numinputfield109" IS '当前库存';
COMMENT ON COLUMN ct294376098702073542."numinputfield110" IS '数量';
COMMENT ON COLUMN ct294376098702073542."numinputfield111" IS '单品总价';
COMMENT ON COLUMN ct294376098702073542."f_id" IS '主键';
COMMENT ON COLUMN ct294376098702073542."f_foreignid" IS '外键';
COMMENT ON COLUMN ct294376098702073542."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct294382866144468678
-- ----------------------------
CREATE TABLE ct294382866144468678 (
	"cominputfield111" varchar(255),
	"cominputfield112" varchar(255),
	"numinputfield113" numeric(10,0),
	"numinputfield114" numeric(10,0),
	"calculatefield118" varchar(255),
	"numinputfield116" numeric(10,0),
	"numinputfield117" numeric(10,0),
	"f_id" varchar(50) NOT NULL,
	"f_foreignid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct294382866144468678 IS '子表';
COMMENT ON COLUMN ct294382866144468678."cominputfield111" IS '商品名称';
COMMENT ON COLUMN ct294382866144468678."cominputfield112" IS '编号';
COMMENT ON COLUMN ct294382866144468678."numinputfield113" IS '采购价';
COMMENT ON COLUMN ct294382866144468678."numinputfield114" IS '数量';
COMMENT ON COLUMN ct294382866144468678."calculatefield118" IS '单品总价';
COMMENT ON COLUMN ct294382866144468678."numinputfield116" IS '当前库存';
COMMENT ON COLUMN ct294382866144468678."numinputfield117" IS '入库后库存';
COMMENT ON COLUMN ct294382866144468678."f_id" IS '主键';
COMMENT ON COLUMN ct294382866144468678."f_foreignid" IS '外键';
COMMENT ON COLUMN ct294382866144468678."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct395899726056134917
-- ----------------------------
CREATE TABLE ct395899726056134917 (
	"comselectfield111" varchar(255),
	"depselectfield112" varchar(255),
	"userselectfield113" varchar(255),
	"datefield114" timestamp,
	"f_id" varchar(50) NOT NULL,
	"f_foreignid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct395899726056134917 IS '3.4.6新增功能汇总示例-子表';
COMMENT ON COLUMN ct395899726056134917."comselectfield111" IS '默认当前组织';
COMMENT ON COLUMN ct395899726056134917."depselectfield112" IS '默认当前部门';
COMMENT ON COLUMN ct395899726056134917."userselectfield113" IS '默认当前用户';
COMMENT ON COLUMN ct395899726056134917."datefield114" IS '默认当前系统时间';
COMMENT ON COLUMN ct395899726056134917."f_id" IS '主键';
COMMENT ON COLUMN ct395899726056134917."f_foreignid" IS '外键';
COMMENT ON COLUMN ct395899726056134917."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct469496947162544645
-- ----------------------------
CREATE TABLE ct469496947162544645 (
	"inputfield110" varchar(255),
	"selectfield112" varchar(255),
	"cascaderfield114" varchar(255),
	"textareafield113" varchar(255),
	"inputnumberfield115" numeric(38,15),
	"f_id" varchar(50) NOT NULL,
	"f_foreign_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct469496947162544645 IS '复杂表头示例-子表';
COMMENT ON COLUMN ct469496947162544645."inputfield110" IS '摘要';
COMMENT ON COLUMN ct469496947162544645."selectfield112" IS '下拉选择';
COMMENT ON COLUMN ct469496947162544645."cascaderfield114" IS '级联选择';
COMMENT ON COLUMN ct469496947162544645."textareafield113" IS '说明';
COMMENT ON COLUMN ct469496947162544645."inputnumberfield115" IS '金额';
COMMENT ON COLUMN ct469496947162544645."f_id" IS '主键';
COMMENT ON COLUMN ct469496947162544645."f_foreign_id" IS '外键';
COMMENT ON COLUMN ct469496947162544645."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct469499339585157637
-- ----------------------------
CREATE TABLE ct469499339585157637 (
	"organizeselectfield114" varchar(255),
	"depselectfield115" varchar(255),
	"posselectfield116" varchar(255),
	"userselectfield117" varchar(255),
	"usersselectfield118" varchar(255),
	"groupselectfield119" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_foreign_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct469499339585157637 IS '高级控件和默认查询-子表';
COMMENT ON COLUMN ct469499339585157637."organizeselectfield114" IS '组织选择';
COMMENT ON COLUMN ct469499339585157637."depselectfield115" IS '部门选择';
COMMENT ON COLUMN ct469499339585157637."posselectfield116" IS '岗位选择';
COMMENT ON COLUMN ct469499339585157637."userselectfield117" IS '用户选择';
COMMENT ON COLUMN ct469499339585157637."usersselectfield118" IS '用户组件';
COMMENT ON COLUMN ct469499339585157637."groupselectfield119" IS '分组选择';
COMMENT ON COLUMN ct469499339585157637."f_id" IS '主键';
COMMENT ON COLUMN ct469499339585157637."f_foreign_id" IS '外键';
COMMENT ON COLUMN ct469499339585157637."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct585077626071155013
-- ----------------------------
CREATE TABLE ct585077626071155013 (
	"inputfield108" varchar(255),
	"inputfield109" varchar(255),
	"inputfield110" varchar(255),
	"inputfield112" varchar(255),
	"inputnumberfield113" numeric(38,15),
	"inputnumberfield114" numeric(38,15),
	"calculatefield115" numeric(38,2),
	"f_id" varchar(50) NOT NULL,
	"f_foreign_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct585077626071155013 IS '采购合同-子表';
COMMENT ON COLUMN ct585077626071155013."inputfield108" IS '产品编号';
COMMENT ON COLUMN ct585077626071155013."inputfield109" IS '产品名称';
COMMENT ON COLUMN ct585077626071155013."inputfield110" IS '规格型号';
COMMENT ON COLUMN ct585077626071155013."inputfield112" IS '单位';
COMMENT ON COLUMN ct585077626071155013."inputnumberfield113" IS '单价';
COMMENT ON COLUMN ct585077626071155013."inputnumberfield114" IS '数量';
COMMENT ON COLUMN ct585077626071155013."calculatefield115" IS '小计';
COMMENT ON COLUMN ct585077626071155013."f_id" IS '主键';
COMMENT ON COLUMN ct585077626071155013."f_foreign_id" IS '外键';
COMMENT ON COLUMN ct585077626071155013."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct585113061728190981
-- ----------------------------
CREATE TABLE ct585113061728190981 (
	"datepickerfield101" timestamp,
	"inputnumberfield103" numeric(38,15),
	"inputnumberfield104" numeric(38,15),
	"f_id" varchar(50) NOT NULL,
	"f_foreign_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL,
	"inputnumberfield105" numeric(65,3)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct585113061728190981 IS '水电费用-子表';
COMMENT ON COLUMN ct585113061728190981."datepickerfield101" IS '费用月份';
COMMENT ON COLUMN ct585113061728190981."inputnumberfield103" IS '用水量';
COMMENT ON COLUMN ct585113061728190981."inputnumberfield104" IS '单价';
COMMENT ON COLUMN ct585113061728190981."f_id" IS '主键';
COMMENT ON COLUMN ct585113061728190981."f_foreign_id" IS '外键';
COMMENT ON COLUMN ct585113061728190981."f_tenant_id" IS '租户id';
COMMENT ON COLUMN ct585113061728190981."inputnumberfield105" IS '合计';
-- ----------------------------
-- 表名：ct585113061732385285
-- ----------------------------
CREATE TABLE ct585113061732385285 (
	"datepickerfield113" timestamp,
	"inputnumberfield114" numeric(38,15),
	"inputnumberfield115" numeric(38,15),
	"f_id" varchar(50) NOT NULL,
	"f_foreign_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL,
	"inputnumberfield116" numeric(65,3)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct585113061732385285 IS '水电费用-子表';
COMMENT ON COLUMN ct585113061732385285."datepickerfield113" IS '费用月份';
COMMENT ON COLUMN ct585113061732385285."inputnumberfield114" IS '用电量';
COMMENT ON COLUMN ct585113061732385285."inputnumberfield115" IS '单价';
COMMENT ON COLUMN ct585113061732385285."f_id" IS '主键';
COMMENT ON COLUMN ct585113061732385285."f_foreign_id" IS '外键';
COMMENT ON COLUMN ct585113061732385285."f_tenant_id" IS '租户id';
COMMENT ON COLUMN ct585113061732385285."inputnumberfield116" IS '合计';
-- ----------------------------
-- 表名：ct585115948990595589
-- ----------------------------
CREATE TABLE ct585115948990595589 (
	"inputfield111" varchar(255),
	"inputfield112" varchar(255),
	"inputfield113" varchar(255),
	"inputnumberfield114" numeric(38,15),
	"inputnumberfield115" numeric(38,15),
	"f_id" varchar(50) NOT NULL,
	"f_foreign_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL,
	"inputnumberfield116" numeric(18,3)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct585115948990595589 IS '报价信息-子表';
COMMENT ON COLUMN ct585115948990595589."inputfield111" IS '品名';
COMMENT ON COLUMN ct585115948990595589."inputfield112" IS '规格';
COMMENT ON COLUMN ct585115948990595589."inputfield113" IS '单位';
COMMENT ON COLUMN ct585115948990595589."inputnumberfield114" IS '单价';
COMMENT ON COLUMN ct585115948990595589."inputnumberfield115" IS '数量';
COMMENT ON COLUMN ct585115948990595589."f_id" IS '主键';
COMMENT ON COLUMN ct585115948990595589."f_foreign_id" IS '外键';
COMMENT ON COLUMN ct585115948990595589."f_tenant_id" IS '租户id';
COMMENT ON COLUMN ct585115948990595589."inputnumberfield116" IS '小计';
-- ----------------------------
-- 表名：ct585115958725575173
-- ----------------------------
CREATE TABLE ct585115958725575173 (
	"datepickerfield115" timestamp,
	"datepickerfield116" timestamp,
	"inputfield117" varchar(255),
	"inputfield118" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_foreign_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct585115958725575173 IS '入职申请-子表';
COMMENT ON COLUMN ct585115958725575173."datepickerfield115" IS '开始年月';
COMMENT ON COLUMN ct585115958725575173."datepickerfield116" IS '日期选择';
COMMENT ON COLUMN ct585115958725575173."inputfield117" IS '院校名称';
COMMENT ON COLUMN ct585115958725575173."inputfield118" IS '专业';
COMMENT ON COLUMN ct585115958725575173."f_id" IS '主键';
COMMENT ON COLUMN ct585115958725575173."f_foreign_id" IS '外键';
COMMENT ON COLUMN ct585115958725575173."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ct585115958725575174
-- ----------------------------
CREATE TABLE ct585115958725575174 (
	"datepickerfield120" timestamp,
	"datepickerfield121" timestamp,
	"inputfield122" varchar(255),
	"inputfield123" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_foreign_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ct585115958725575174 IS '入职申请-子表';
COMMENT ON COLUMN ct585115958725575174."datepickerfield120" IS '开始年月';
COMMENT ON COLUMN ct585115958725575174."datepickerfield121" IS '日期选择';
COMMENT ON COLUMN ct585115958725575174."inputfield122" IS '工作单位';
COMMENT ON COLUMN ct585115958725575174."inputfield123" IS '职位';
COMMENT ON COLUMN ct585115958725575174."f_id" IS '主键';
COMMENT ON COLUMN ct585115958725575174."f_foreign_id" IS '外键';
COMMENT ON COLUMN ct585115958725575174."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：data_report
-- ----------------------------
CREATE TABLE data_report (
	"f_id" varchar(50) NOT NULL,
	"f_categoryid" varchar(50),
	"f_fullname" varchar(50),
	"f_content" text,
	"f_encode" varchar(50),
	"f_sortcode" varchar(50),
	"f_enabledmark" int4,
	"f_description" varchar(500),
	"f_creatortime" timestamp,
	"f_creatoruserid" varchar(50),
	"f_lastmodifytime" timestamp,
	"f_lastmodifyuserid" varchar(50),
	"f_deletemark" int4,
	"f_deletetime" timestamp,
	"f_deleteuserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE data_report IS '数据报表';
COMMENT ON COLUMN data_report."f_id" IS '主键ID';
COMMENT ON COLUMN data_report."f_categoryid" IS '分组ID';
COMMENT ON COLUMN data_report."f_fullname" IS '报表名称';
COMMENT ON COLUMN data_report."f_content" IS '报表内容';
COMMENT ON COLUMN data_report."f_encode" IS '编码';
COMMENT ON COLUMN data_report."f_sortcode" IS '排序码(默认0)';
COMMENT ON COLUMN data_report."f_enabledmark" IS '状态(0-默认，禁用，1-启用)';
COMMENT ON COLUMN data_report."f_description" IS '描述或说明';
COMMENT ON COLUMN data_report."f_creatortime" IS '创建时间';
COMMENT ON COLUMN data_report."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN data_report."f_lastmodifytime" IS '修改时间';
COMMENT ON COLUMN data_report."f_lastmodifyuserid" IS '修改用户';
COMMENT ON COLUMN data_report."f_deletemark" IS '删除标志(默认0)';
COMMENT ON COLUMN data_report."f_deletetime" IS '删除时间';
COMMENT ON COLUMN data_report."f_deleteuserid" IS '删除用户id';
COMMENT ON COLUMN data_report."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_big_data
-- ----------------------------
CREATE TABLE ext_big_data (
	"f_id" varchar(50) NOT NULL,
	"f_en_code" varchar(200),
	"f_full_name" varchar(200),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_big_data IS '大数据测试';
COMMENT ON COLUMN ext_big_data."f_id" IS '自然主键';
COMMENT ON COLUMN ext_big_data."f_en_code" IS '编号';
COMMENT ON COLUMN ext_big_data."f_full_name" IS '名称';
COMMENT ON COLUMN ext_big_data."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_big_data."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_big_data."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_big_data."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_big_data."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_big_data."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_big_data."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_big_data."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_big_data."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_customer
-- ----------------------------
CREATE TABLE ext_customer (
	"f_id" varchar(50) NOT NULL,
	"f_en_code" varchar(50),
	"f_customer_name" varchar(50),
	"f_address" varchar(255),
	"f_full_name" varchar(50),
	"f_contact_tel" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_customer IS '客户信息';
COMMENT ON COLUMN ext_customer."f_id" IS '主键';
COMMENT ON COLUMN ext_customer."f_en_code" IS '编码';
COMMENT ON COLUMN ext_customer."f_customer_name" IS '客户名称';
COMMENT ON COLUMN ext_customer."f_address" IS '地址';
COMMENT ON COLUMN ext_customer."f_full_name" IS '名称';
COMMENT ON COLUMN ext_customer."f_contact_tel" IS '联系方式';
COMMENT ON COLUMN ext_customer."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_customer."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_customer."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_customer."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_customer."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_customer."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_customer."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_customer."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_customer."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_document
-- ----------------------------
CREATE TABLE ext_document (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_type" int4,
	"f_full_name" varchar(200),
	"f_file_path" varchar(2000),
	"f_file_size" varchar(50),
	"f_file_extension" varchar(50),
	"f_read_count" int4,
	"f_is_share" int4,
	"f_share_time" timestamp,
	"f_upload_url" varchar(255),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_document IS '知识文档';
COMMENT ON COLUMN ext_document."f_id" IS '自然主键';
COMMENT ON COLUMN ext_document."f_parent_id" IS '文档父级';
COMMENT ON COLUMN ext_document."f_type" IS '文档分类';
COMMENT ON COLUMN ext_document."f_full_name" IS '文件名称';
COMMENT ON COLUMN ext_document."f_file_path" IS '文件路径';
COMMENT ON COLUMN ext_document."f_file_size" IS '文件大小';
COMMENT ON COLUMN ext_document."f_file_extension" IS '文件后缀';
COMMENT ON COLUMN ext_document."f_read_count" IS '阅读数量';
COMMENT ON COLUMN ext_document."f_is_share" IS '是否共享';
COMMENT ON COLUMN ext_document."f_share_time" IS '共享时间';
COMMENT ON COLUMN ext_document."f_upload_url" IS '下载地址';
COMMENT ON COLUMN ext_document."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_document."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN ext_document."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_document."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_document."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_document."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_document."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_document."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_document."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_document."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_document."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_document_log
-- ----------------------------
CREATE TABLE ext_document_log (
	"f_id" varchar(50) NOT NULL,
	"f_document_id" varchar(50),
	"f_child_document" varchar(500),
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_document_log IS '文档中心记录表';
COMMENT ON COLUMN ext_document_log."f_id" IS '自然主键';
COMMENT ON COLUMN ext_document_log."f_document_id" IS '文档主键';
COMMENT ON COLUMN ext_document_log."f_child_document" IS '子文件id';
COMMENT ON COLUMN ext_document_log."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_document_log."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_document_log."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_document_log."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_document_log."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_document_log."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_document_log."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_document_log."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_document_share
-- ----------------------------
CREATE TABLE ext_document_share (
	"f_id" varchar(50) NOT NULL,
	"f_document_id" varchar(50),
	"f_share_user_id" varchar(50),
	"f_share_time" timestamp,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_document_share IS '知识文档共享';
COMMENT ON COLUMN ext_document_share."f_id" IS '自然主键';
COMMENT ON COLUMN ext_document_share."f_document_id" IS '文档主键';
COMMENT ON COLUMN ext_document_share."f_share_user_id" IS '共享人员';
COMMENT ON COLUMN ext_document_share."f_share_time" IS '共享时间';
COMMENT ON COLUMN ext_document_share."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_document_share."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_document_share."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_document_share."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_document_share."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_document_share."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_document_share."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_document_share."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_document_share."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_email_config
-- ----------------------------
CREATE TABLE ext_email_config (
	"f_id" varchar(50) NOT NULL,
	"f_pop3_host" varchar(50),
	"f_pop3_port" int4,
	"f_smtp_host" varchar(50),
	"f_smtp_port" int4,
	"f_account" varchar(50),
	"f_password" varchar(50),
	"f_ssl" int4,
	"f_sender_name" varchar(50),
	"f_folder_json" text,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_email_config IS '邮件配置';
COMMENT ON COLUMN ext_email_config."f_id" IS '自然主键';
COMMENT ON COLUMN ext_email_config."f_pop3_host" IS 'POP3服务';
COMMENT ON COLUMN ext_email_config."f_pop3_port" IS 'POP3端口';
COMMENT ON COLUMN ext_email_config."f_smtp_host" IS 'SMTP服务';
COMMENT ON COLUMN ext_email_config."f_smtp_port" IS 'SMTP端口';
COMMENT ON COLUMN ext_email_config."f_account" IS '账户';
COMMENT ON COLUMN ext_email_config."f_password" IS '密码';
COMMENT ON COLUMN ext_email_config."f_ssl" IS 'SSL登录';
COMMENT ON COLUMN ext_email_config."f_sender_name" IS '发件人名称';
COMMENT ON COLUMN ext_email_config."f_folder_json" IS '我的文件夹';
COMMENT ON COLUMN ext_email_config."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_email_config."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN ext_email_config."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_email_config."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_email_config."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_email_config."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_email_config."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_email_config."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_email_config."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_email_config."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_email_config."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_email_receive
-- ----------------------------
CREATE TABLE ext_email_receive (
	"f_id" varchar(50) NOT NULL,
	"f_type" int4,
	"f_maccount" varchar(50),
	"f_mid" varchar(200),
	"f_sender" varchar(50),
	"f_sender_name" varchar(50),
	"f_subject" varchar(200),
	"f_body_text" text,
	"f_attachment" text,
	"f_read" int4,
	"f_date" timestamp,
	"f_starred" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_email_receive IS '邮件接收';
COMMENT ON COLUMN ext_email_receive."f_id" IS '自然主键';
COMMENT ON COLUMN ext_email_receive."f_type" IS '类型';
COMMENT ON COLUMN ext_email_receive."f_maccount" IS '邮箱账户';
COMMENT ON COLUMN ext_email_receive."f_mid" IS 'F_MID';
COMMENT ON COLUMN ext_email_receive."f_sender" IS '发件人';
COMMENT ON COLUMN ext_email_receive."f_sender_name" IS '发件人名称';
COMMENT ON COLUMN ext_email_receive."f_subject" IS '主题';
COMMENT ON COLUMN ext_email_receive."f_body_text" IS '正文';
COMMENT ON COLUMN ext_email_receive."f_attachment" IS '附件';
COMMENT ON COLUMN ext_email_receive."f_read" IS '阅读';
COMMENT ON COLUMN ext_email_receive."f_date" IS '';
COMMENT ON COLUMN ext_email_receive."f_starred" IS '星标';
COMMENT ON COLUMN ext_email_receive."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_email_receive."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN ext_email_receive."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_email_receive."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_email_receive."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_email_receive."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_email_receive."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_email_receive."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_email_receive."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_email_receive."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_email_receive."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_email_send
-- ----------------------------
CREATE TABLE ext_email_send (
	"f_id" varchar(50) NOT NULL,
	"f_type" int4,
	"f_sender" text,
	"f_to" text,
	"f_cc" text,
	"f_bcc" text,
	"f_colour" varchar(50),
	"f_subject" varchar(200),
	"f_body_text" text,
	"f_attachment" text,
	"f_state" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_email_send IS '邮件发送';
COMMENT ON COLUMN ext_email_send."f_id" IS '自然主键';
COMMENT ON COLUMN ext_email_send."f_type" IS '类型';
COMMENT ON COLUMN ext_email_send."f_sender" IS '发件人';
COMMENT ON COLUMN ext_email_send."f_to" IS '收件人';
COMMENT ON COLUMN ext_email_send."f_cc" IS '抄送人';
COMMENT ON COLUMN ext_email_send."f_bcc" IS '密送人';
COMMENT ON COLUMN ext_email_send."f_colour" IS '颜色';
COMMENT ON COLUMN ext_email_send."f_subject" IS '主题';
COMMENT ON COLUMN ext_email_send."f_body_text" IS '正文';
COMMENT ON COLUMN ext_email_send."f_attachment" IS '附件';
COMMENT ON COLUMN ext_email_send."f_state" IS '状态';
COMMENT ON COLUMN ext_email_send."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_email_send."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN ext_email_send."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_email_send."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_email_send."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_email_send."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_email_send."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_email_send."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_email_send."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_email_send."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_email_send."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_employee
-- ----------------------------
CREATE TABLE ext_employee (
	"f_id" varchar(50) NOT NULL,
	"f_en_code" varchar(50),
	"f_full_name" varchar(50),
	"f_gender" varchar(50),
	"f_department_name" varchar(255),
	"f_position_name" varchar(50),
	"f_working_nature" varchar(50),
	"f_id_number" varchar(50),
	"f_telephone" varchar(50),
	"f_attend_work_time" timestamp,
	"f_birthday" timestamp,
	"f_education" varchar(50),
	"f_major" varchar(50),
	"f_graduation_academy" varchar(50),
	"f_graduation_time" timestamp,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_employee IS '职员信息';
COMMENT ON COLUMN ext_employee."f_id" IS '自然主键';
COMMENT ON COLUMN ext_employee."f_en_code" IS '工号';
COMMENT ON COLUMN ext_employee."f_full_name" IS '姓名';
COMMENT ON COLUMN ext_employee."f_gender" IS '性别';
COMMENT ON COLUMN ext_employee."f_department_name" IS '部门';
COMMENT ON COLUMN ext_employee."f_position_name" IS '职位';
COMMENT ON COLUMN ext_employee."f_working_nature" IS '用工性质';
COMMENT ON COLUMN ext_employee."f_id_number" IS '身份证号';
COMMENT ON COLUMN ext_employee."f_telephone" IS '联系电话';
COMMENT ON COLUMN ext_employee."f_attend_work_time" IS '参加工作';
COMMENT ON COLUMN ext_employee."f_birthday" IS '出生年月';
COMMENT ON COLUMN ext_employee."f_education" IS '最高学历';
COMMENT ON COLUMN ext_employee."f_major" IS '所学专业';
COMMENT ON COLUMN ext_employee."f_graduation_academy" IS '毕业院校';
COMMENT ON COLUMN ext_employee."f_graduation_time" IS '毕业时间';
COMMENT ON COLUMN ext_employee."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_employee."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN ext_employee."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_employee."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_employee."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_employee."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_employee."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_employee."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_employee."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_employee."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_employee."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_order
-- ----------------------------
CREATE TABLE ext_order (
	"f_id" varchar(50) NOT NULL,
	"f_customer_id" varchar(50),
	"f_customer_name" varchar(50),
	"f_salesman_id" varchar(50),
	"f_salesman_name" varchar(50),
	"f_order_date" timestamp,
	"f_order_code" varchar(50),
	"f_transport_mode" varchar(50),
	"f_delivery_date" timestamp,
	"f_delivery_address" text,
	"f_payment_mode" varchar(50),
	"f_receivable_money" numeric(18,2),
	"f_earnest_rate" numeric(18,2),
	"f_prepay_earnest" numeric(18,2),
	"f_current_state" int4,
	"f_file_json" text,
	"f_flow_id" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_order IS '订单信息';
COMMENT ON COLUMN ext_order."f_id" IS '自然主键';
COMMENT ON COLUMN ext_order."f_customer_id" IS '客户Id';
COMMENT ON COLUMN ext_order."f_customer_name" IS '客户名称';
COMMENT ON COLUMN ext_order."f_salesman_id" IS '业务员Id';
COMMENT ON COLUMN ext_order."f_salesman_name" IS '业务员';
COMMENT ON COLUMN ext_order."f_order_date" IS '订单日期';
COMMENT ON COLUMN ext_order."f_order_code" IS '订单编号';
COMMENT ON COLUMN ext_order."f_transport_mode" IS '运输方式';
COMMENT ON COLUMN ext_order."f_delivery_date" IS '发货日期';
COMMENT ON COLUMN ext_order."f_delivery_address" IS '发货地址';
COMMENT ON COLUMN ext_order."f_payment_mode" IS '付款方式';
COMMENT ON COLUMN ext_order."f_receivable_money" IS '应收金额';
COMMENT ON COLUMN ext_order."f_earnest_rate" IS '定金比率';
COMMENT ON COLUMN ext_order."f_prepay_earnest" IS '预付定金';
COMMENT ON COLUMN ext_order."f_current_state" IS '当前状态';
COMMENT ON COLUMN ext_order."f_file_json" IS '附件信息';
COMMENT ON COLUMN ext_order."f_flow_id" IS '引擎id';
COMMENT ON COLUMN ext_order."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_order."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN ext_order."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_order."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_order."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_order."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_order."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_order."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_order."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_order."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_order."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_order_2
-- ----------------------------
CREATE TABLE ext_order_2 (
	"f_id" varchar(50) NOT NULL,
	"f_customer_id" varchar(50),
	"f_customer_name" varchar(50),
	"f_salesman_id" varchar(50),
	"f_salesman_name" varchar(50),
	"f_order_date" timestamp,
	"f_order_code" varchar(50),
	"f_transport_mode" varchar(50),
	"f_delivery_date" timestamp,
	"f_delivery_address" text,
	"f_payment_mode" varchar(50),
	"f_receivable_money" numeric(18,2),
	"f_earnest_rate" numeric(18,2),
	"f_prepay_earnest" numeric(18,2),
	"f_current_state" int4,
	"f_file_json" text,
	"f_flow_id" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_order_2 IS '订单信息-在线';
COMMENT ON COLUMN ext_order_2."f_id" IS '自然主键';
COMMENT ON COLUMN ext_order_2."f_customer_id" IS '客户Id';
COMMENT ON COLUMN ext_order_2."f_customer_name" IS '客户名称';
COMMENT ON COLUMN ext_order_2."f_salesman_id" IS '业务员Id';
COMMENT ON COLUMN ext_order_2."f_salesman_name" IS '业务员';
COMMENT ON COLUMN ext_order_2."f_order_date" IS '订单日期';
COMMENT ON COLUMN ext_order_2."f_order_code" IS '订单编号';
COMMENT ON COLUMN ext_order_2."f_transport_mode" IS '运输方式';
COMMENT ON COLUMN ext_order_2."f_delivery_date" IS '发货日期';
COMMENT ON COLUMN ext_order_2."f_delivery_address" IS '发货地址';
COMMENT ON COLUMN ext_order_2."f_payment_mode" IS '付款方式';
COMMENT ON COLUMN ext_order_2."f_receivable_money" IS '应收金额';
COMMENT ON COLUMN ext_order_2."f_earnest_rate" IS '定金比率';
COMMENT ON COLUMN ext_order_2."f_prepay_earnest" IS '预付定金';
COMMENT ON COLUMN ext_order_2."f_current_state" IS '当前状态';
COMMENT ON COLUMN ext_order_2."f_file_json" IS '附件信息';
COMMENT ON COLUMN ext_order_2."f_flow_id" IS '引擎id';
COMMENT ON COLUMN ext_order_2."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_order_2."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN ext_order_2."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_order_2."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_order_2."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_order_2."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_order_2."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_order_2."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_order_2."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_order_2."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_order_2."f_tenant_id" IS '租户id';
COMMENT ON COLUMN ext_order_2."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN ext_order_2."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：ext_order_entry
-- ----------------------------
CREATE TABLE ext_order_entry (
	"f_id" varchar(50) NOT NULL,
	"f_order_id" varchar(50),
	"f_goods_id" varchar(50),
	"f_goods_code" varchar(50),
	"f_goods_name" varchar(50),
	"f_specifications" varchar(50),
	"f_unit" varchar(50),
	"f_qty" numeric(18,2),
	"f_price" numeric(18,2),
	"f_amount" numeric(18,2),
	"f_discount" numeric(18,2),
	"f_cess" numeric(18,2),
	"f_actual_price" numeric(18,2),
	"f_actual_amount" numeric(18,2),
	"f_description" varchar(500),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_order_entry IS '订单明细';
COMMENT ON COLUMN ext_order_entry."f_id" IS '自然主键';
COMMENT ON COLUMN ext_order_entry."f_order_id" IS '订单主键';
COMMENT ON COLUMN ext_order_entry."f_goods_id" IS '商品Id';
COMMENT ON COLUMN ext_order_entry."f_goods_code" IS '商品编码';
COMMENT ON COLUMN ext_order_entry."f_goods_name" IS '商品名称';
COMMENT ON COLUMN ext_order_entry."f_specifications" IS '规格型号';
COMMENT ON COLUMN ext_order_entry."f_unit" IS '单位';
COMMENT ON COLUMN ext_order_entry."f_qty" IS '数量';
COMMENT ON COLUMN ext_order_entry."f_price" IS '单价';
COMMENT ON COLUMN ext_order_entry."f_amount" IS '金额';
COMMENT ON COLUMN ext_order_entry."f_discount" IS '折扣%';
COMMENT ON COLUMN ext_order_entry."f_cess" IS '税率%';
COMMENT ON COLUMN ext_order_entry."f_actual_price" IS '实际单价';
COMMENT ON COLUMN ext_order_entry."f_actual_amount" IS '实际金额';
COMMENT ON COLUMN ext_order_entry."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_order_entry."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_order_entry."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_order_entry."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_order_entry."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_order_entry."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_order_entry."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_order_entry."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_order_entry."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_order_entry."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_order_entry_2
-- ----------------------------
CREATE TABLE ext_order_entry_2 (
	"f_id" varchar(50) NOT NULL,
	"f_order_id" varchar(50),
	"f_goods_id" varchar(50),
	"f_goods_code" varchar(50),
	"f_goods_name" varchar(50),
	"f_specifications" varchar(50),
	"f_unit" varchar(50),
	"f_qty" numeric(18,2),
	"f_price" numeric(18,2),
	"f_amount" numeric(18,2),
	"f_discount" numeric(18,2),
	"f_cess" numeric(18,2),
	"f_actual_price" numeric(18,2),
	"f_actual_amount" numeric(18,2),
	"f_description" varchar(500),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_order_entry_2 IS '订单明细-在线';
COMMENT ON COLUMN ext_order_entry_2."f_id" IS '自然主键';
COMMENT ON COLUMN ext_order_entry_2."f_order_id" IS '订单主键';
COMMENT ON COLUMN ext_order_entry_2."f_goods_id" IS '商品Id';
COMMENT ON COLUMN ext_order_entry_2."f_goods_code" IS '商品编码';
COMMENT ON COLUMN ext_order_entry_2."f_goods_name" IS '商品名称';
COMMENT ON COLUMN ext_order_entry_2."f_specifications" IS '规格型号';
COMMENT ON COLUMN ext_order_entry_2."f_unit" IS '单位';
COMMENT ON COLUMN ext_order_entry_2."f_qty" IS '数量';
COMMENT ON COLUMN ext_order_entry_2."f_price" IS '单价';
COMMENT ON COLUMN ext_order_entry_2."f_amount" IS '金额';
COMMENT ON COLUMN ext_order_entry_2."f_discount" IS '折扣%';
COMMENT ON COLUMN ext_order_entry_2."f_cess" IS '税率%';
COMMENT ON COLUMN ext_order_entry_2."f_actual_price" IS '实际单价';
COMMENT ON COLUMN ext_order_entry_2."f_actual_amount" IS '实际金额';
COMMENT ON COLUMN ext_order_entry_2."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_order_entry_2."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_order_entry_2."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_order_entry_2."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_order_entry_2."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_order_entry_2."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_order_entry_2."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_order_entry_2."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_order_entry_2."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_order_entry_2."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_order_receivable
-- ----------------------------
CREATE TABLE ext_order_receivable (
	"f_id" varchar(50) NOT NULL,
	"f_order_id" varchar(50),
	"f_abstract" varchar(500),
	"f_receivable_date" timestamp,
	"f_receivable_rate" numeric(18,2),
	"f_receivable_money" numeric(18,2),
	"f_receivable_mode" varchar(50),
	"f_receivable_state" int4,
	"f_description" varchar(500),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_order_receivable IS '订单收款';
COMMENT ON COLUMN ext_order_receivable."f_id" IS '自然主键';
COMMENT ON COLUMN ext_order_receivable."f_order_id" IS '订单主键';
COMMENT ON COLUMN ext_order_receivable."f_abstract" IS '收款摘要';
COMMENT ON COLUMN ext_order_receivable."f_receivable_date" IS '收款日期';
COMMENT ON COLUMN ext_order_receivable."f_receivable_rate" IS '收款比率';
COMMENT ON COLUMN ext_order_receivable."f_receivable_money" IS '收款金额';
COMMENT ON COLUMN ext_order_receivable."f_receivable_mode" IS '收款方式';
COMMENT ON COLUMN ext_order_receivable."f_receivable_state" IS '收款状态';
COMMENT ON COLUMN ext_order_receivable."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_order_receivable."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_order_receivable."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_order_receivable."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_order_receivable."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_order_receivable."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_order_receivable."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_order_receivable."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_order_receivable."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_order_receivable."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_order_receivable_2
-- ----------------------------
CREATE TABLE ext_order_receivable_2 (
	"f_id" varchar(50) NOT NULL,
	"f_order_id" varchar(50),
	"f_abstract" varchar(500),
	"f_receivable_date" timestamp,
	"f_receivable_rate" numeric(18,2),
	"f_receivable_money" numeric(18,2),
	"f_receivable_mode" varchar(50),
	"f_receivable_state" int4,
	"f_description" varchar(500),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_order_receivable_2 IS '订单收款-在线';
COMMENT ON COLUMN ext_order_receivable_2."f_id" IS '自然主键';
COMMENT ON COLUMN ext_order_receivable_2."f_order_id" IS '订单主键';
COMMENT ON COLUMN ext_order_receivable_2."f_abstract" IS '收款摘要';
COMMENT ON COLUMN ext_order_receivable_2."f_receivable_date" IS '收款日期';
COMMENT ON COLUMN ext_order_receivable_2."f_receivable_rate" IS '收款比率';
COMMENT ON COLUMN ext_order_receivable_2."f_receivable_money" IS '收款金额';
COMMENT ON COLUMN ext_order_receivable_2."f_receivable_mode" IS '收款方式';
COMMENT ON COLUMN ext_order_receivable_2."f_receivable_state" IS '收款状态';
COMMENT ON COLUMN ext_order_receivable_2."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_order_receivable_2."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_order_receivable_2."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_order_receivable_2."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_order_receivable_2."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_order_receivable_2."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_order_receivable_2."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_order_receivable_2."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_order_receivable_2."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_order_receivable_2."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_product
-- ----------------------------
CREATE TABLE ext_product (
	"f_id" varchar(50) NOT NULL,
	"f_en_code" varchar(50),
	"f_type" varchar(50),
	"f_customer_id" varchar(50),
	"f_customer_name" varchar(50),
	"f_salesman_id" varchar(50),
	"f_salesman_name" varchar(50),
	"f_salesman_date" timestamp,
	"f_audit_name" varchar(50),
	"f_audit_date" timestamp,
	"f_audit_state" int4,
	"f_goods_warehouse" varchar(50),
	"f_goods_date" timestamp,
	"f_consignor" varchar(50),
	"f_goods_state" int4,
	"f_close_state" int4,
	"f_close_date" timestamp,
	"f_gathering_type" varchar(50),
	"f_business" varchar(50),
	"f_address" varchar(50),
	"f_contact_tel" varchar(50),
	"f_contact_name" varchar(50),
	"f_harvest_msg" int4,
	"f_harvest_warehouse" varchar(50),
	"f_issuing_name" varchar(50),
	"f_part_price" numeric(18,2),
	"f_reduced_price" numeric(18,2),
	"f_discount_price" numeric(18,2),
	"f_description" varchar(500),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_product IS '销售订单';
COMMENT ON COLUMN ext_product."f_id" IS '';
COMMENT ON COLUMN ext_product."f_en_code" IS '订单编号';
COMMENT ON COLUMN ext_product."f_type" IS '客户类别';
COMMENT ON COLUMN ext_product."f_customer_id" IS '客户id';
COMMENT ON COLUMN ext_product."f_customer_name" IS '客户名称';
COMMENT ON COLUMN ext_product."f_salesman_id" IS '制单人id';
COMMENT ON COLUMN ext_product."f_salesman_name" IS '制单人名称';
COMMENT ON COLUMN ext_product."f_salesman_date" IS '制单日期';
COMMENT ON COLUMN ext_product."f_audit_name" IS '审核人';
COMMENT ON COLUMN ext_product."f_audit_date" IS '审核日期';
COMMENT ON COLUMN ext_product."f_audit_state" IS '审核状态';
COMMENT ON COLUMN ext_product."f_goods_warehouse" IS '发货仓库';
COMMENT ON COLUMN ext_product."f_goods_date" IS '发货通知时间';
COMMENT ON COLUMN ext_product."f_consignor" IS '发货通知人';
COMMENT ON COLUMN ext_product."f_goods_state" IS '发货通知';
COMMENT ON COLUMN ext_product."f_close_state" IS '关闭状态';
COMMENT ON COLUMN ext_product."f_close_date" IS '关闭日期';
COMMENT ON COLUMN ext_product."f_gathering_type" IS '收款方式';
COMMENT ON COLUMN ext_product."f_business" IS '业务员';
COMMENT ON COLUMN ext_product."f_address" IS '送货地址';
COMMENT ON COLUMN ext_product."f_contact_tel" IS '联系方式';
COMMENT ON COLUMN ext_product."f_contact_name" IS '联系人';
COMMENT ON COLUMN ext_product."f_harvest_msg" IS '收货消息';
COMMENT ON COLUMN ext_product."f_harvest_warehouse" IS '收货仓库';
COMMENT ON COLUMN ext_product."f_issuing_name" IS '代发客户';
COMMENT ON COLUMN ext_product."f_part_price" IS '让利金额';
COMMENT ON COLUMN ext_product."f_reduced_price" IS '优惠金额';
COMMENT ON COLUMN ext_product."f_discount_price" IS '折后金额';
COMMENT ON COLUMN ext_product."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_product."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_product."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_product."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_product."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_product."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_product."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_product."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_product."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_product."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_product_classify
-- ----------------------------
CREATE TABLE ext_product_classify (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_full_name" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_product_classify IS '产品分类';
COMMENT ON COLUMN ext_product_classify."f_id" IS '主键';
COMMENT ON COLUMN ext_product_classify."f_parent_id" IS '上级';
COMMENT ON COLUMN ext_product_classify."f_full_name" IS '名称';
COMMENT ON COLUMN ext_product_classify."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_product_classify."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_product_classify."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_product_classify."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_product_classify."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_product_classify."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_product_classify."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_product_classify."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_product_classify."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_product_entry
-- ----------------------------
CREATE TABLE ext_product_entry (
	"f_id" varchar(50) NOT NULL,
	"f_product_id" varchar(50),
	"f_product_code" varchar(50),
	"f_product_name" varchar(50),
	"f_product_specification" varchar(50),
	"f_qty" int4,
	"f_command_type" varchar(50),
	"f_type" varchar(50),
	"f_money" numeric(18,2),
	"f_util" varchar(50),
	"f_price" numeric(18,2),
	"f_amount" numeric(18,2),
	"f_activity" varchar(50),
	"f_description" varchar(500),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_product_entry IS '产品明细';
COMMENT ON COLUMN ext_product_entry."f_id" IS '主键';
COMMENT ON COLUMN ext_product_entry."f_product_id" IS '订单主键';
COMMENT ON COLUMN ext_product_entry."f_product_code" IS '产品编号';
COMMENT ON COLUMN ext_product_entry."f_product_name" IS '产品名称';
COMMENT ON COLUMN ext_product_entry."f_product_specification" IS '产品规格';
COMMENT ON COLUMN ext_product_entry."f_qty" IS '数量';
COMMENT ON COLUMN ext_product_entry."f_command_type" IS '控制方式';
COMMENT ON COLUMN ext_product_entry."f_type" IS '订货类型';
COMMENT ON COLUMN ext_product_entry."f_money" IS '单价';
COMMENT ON COLUMN ext_product_entry."f_util" IS '单位';
COMMENT ON COLUMN ext_product_entry."f_price" IS '折后单价';
COMMENT ON COLUMN ext_product_entry."f_amount" IS '金额';
COMMENT ON COLUMN ext_product_entry."f_activity" IS '活动';
COMMENT ON COLUMN ext_product_entry."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_product_entry."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_product_entry."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_product_entry."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_product_entry."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_product_entry."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_product_entry."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_product_entry."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_product_entry."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_product_entry."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_product_goods
-- ----------------------------
CREATE TABLE ext_product_goods (
	"f_id" varchar(50) NOT NULL,
	"f_classify_id" varchar(50),
	"f_en_code" varchar(50),
	"f_full_name" varchar(50),
	"f_type" varchar(50),
	"f_amount" numeric(18,2),
	"f_money" numeric(18,2),
	"f_product_specification" varchar(50),
	"f_qty" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_product_goods IS '产品商品';
COMMENT ON COLUMN ext_product_goods."f_id" IS '主键';
COMMENT ON COLUMN ext_product_goods."f_classify_id" IS '分类主键';
COMMENT ON COLUMN ext_product_goods."f_en_code" IS '产品编号';
COMMENT ON COLUMN ext_product_goods."f_full_name" IS '产品名称';
COMMENT ON COLUMN ext_product_goods."f_type" IS '产品分类';
COMMENT ON COLUMN ext_product_goods."f_amount" IS '金额';
COMMENT ON COLUMN ext_product_goods."f_money" IS '单价';
COMMENT ON COLUMN ext_product_goods."f_product_specification" IS '产品规格';
COMMENT ON COLUMN ext_product_goods."f_qty" IS '库存数';
COMMENT ON COLUMN ext_product_goods."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_product_goods."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_product_goods."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_product_goods."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_product_goods."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_product_goods."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_product_goods."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_product_goods."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_product_goods."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_project_gantt
-- ----------------------------
CREATE TABLE ext_project_gantt (
	"f_id" varchar(50) NOT NULL,
	"f_parent_id" varchar(50),
	"f_project_id" varchar(50),
	"f_type" int4,
	"f_en_code" varchar(50),
	"f_full_name" varchar(50),
	"f_time_limit" numeric(18,0),
	"f_sign" varchar(50),
	"f_sign_color" varchar(50),
	"f_start_time" timestamp,
	"f_end_time" timestamp,
	"f_schedule" int4,
	"f_manager_ids" text,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_project_gantt IS '项目计划';
COMMENT ON COLUMN ext_project_gantt."f_id" IS '自然主键';
COMMENT ON COLUMN ext_project_gantt."f_parent_id" IS '项目上级';
COMMENT ON COLUMN ext_project_gantt."f_project_id" IS '项目主键';
COMMENT ON COLUMN ext_project_gantt."f_type" IS '项目类型';
COMMENT ON COLUMN ext_project_gantt."f_en_code" IS '项目编号';
COMMENT ON COLUMN ext_project_gantt."f_full_name" IS '项目名称';
COMMENT ON COLUMN ext_project_gantt."f_time_limit" IS '项目工期';
COMMENT ON COLUMN ext_project_gantt."f_sign" IS '项目标记';
COMMENT ON COLUMN ext_project_gantt."f_sign_color" IS '标记颜色';
COMMENT ON COLUMN ext_project_gantt."f_start_time" IS '开始时间';
COMMENT ON COLUMN ext_project_gantt."f_end_time" IS '结束时间';
COMMENT ON COLUMN ext_project_gantt."f_schedule" IS '当前进度';
COMMENT ON COLUMN ext_project_gantt."f_manager_ids" IS '负责人';
COMMENT ON COLUMN ext_project_gantt."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_project_gantt."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN ext_project_gantt."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_project_gantt."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_project_gantt."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_project_gantt."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_project_gantt."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_project_gantt."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_project_gantt."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_project_gantt."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_project_gantt."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_table_example
-- ----------------------------
CREATE TABLE ext_table_example (
	"f_id" varchar(50) NOT NULL,
	"f_interaction_date" timestamp,
	"f_project_code" varchar(50),
	"f_project_name" varchar(50),
	"f_principal" varchar(50),
	"f_jack_stands" varchar(50),
	"f_project_type" varchar(50),
	"f_project_phase" varchar(200),
	"f_customer_name" varchar(50),
	"f_cost_amount" numeric(18,2),
	"f_tunes_amount" numeric(18,2),
	"f_projected_income" numeric(18,2),
	"f_registrant" varchar(50),
	"f_register_date" timestamp,
	"f_sign" text,
	"f_postil_json" text,
	"f_postil_count" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_table_example IS '表格示例数据';
COMMENT ON COLUMN ext_table_example."f_id" IS '自然主键';
COMMENT ON COLUMN ext_table_example."f_interaction_date" IS '交互日期';
COMMENT ON COLUMN ext_table_example."f_project_code" IS '项目编码';
COMMENT ON COLUMN ext_table_example."f_project_name" IS '项目名称';
COMMENT ON COLUMN ext_table_example."f_principal" IS '负责人';
COMMENT ON COLUMN ext_table_example."f_jack_stands" IS '立顶人';
COMMENT ON COLUMN ext_table_example."f_project_type" IS '项目类型';
COMMENT ON COLUMN ext_table_example."f_project_phase" IS '项目阶段';
COMMENT ON COLUMN ext_table_example."f_customer_name" IS '客户名称';
COMMENT ON COLUMN ext_table_example."f_cost_amount" IS '费用金额';
COMMENT ON COLUMN ext_table_example."f_tunes_amount" IS '已用金额';
COMMENT ON COLUMN ext_table_example."f_projected_income" IS '预计收入';
COMMENT ON COLUMN ext_table_example."f_registrant" IS '登记人';
COMMENT ON COLUMN ext_table_example."f_register_date" IS '登记时间';
COMMENT ON COLUMN ext_table_example."f_sign" IS '标记';
COMMENT ON COLUMN ext_table_example."f_postil_json" IS '批注列表Json';
COMMENT ON COLUMN ext_table_example."f_postil_count" IS '批注总数';
COMMENT ON COLUMN ext_table_example."f_description" IS '描述或说明';
COMMENT ON COLUMN ext_table_example."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN ext_table_example."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_table_example."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_table_example."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_table_example."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_table_example."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_table_example."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_table_example."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_table_example."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_table_example."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_work_log
-- ----------------------------
CREATE TABLE ext_work_log (
	"f_id" varchar(50) NOT NULL,
	"f_title" varchar(50),
	"f_today_content" varchar(2000),
	"f_tomorrow_content" varchar(2000),
	"f_question" varchar(2000),
	"f_to_user_id" text,
	"f_description" varchar(500),
	"f_sort_code" int8,
	"f_enabled_mark" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_work_log IS '工作日志';
COMMENT ON COLUMN ext_work_log."f_id" IS '';
COMMENT ON COLUMN ext_work_log."f_title" IS '日志标题';
COMMENT ON COLUMN ext_work_log."f_today_content" IS '今天内容';
COMMENT ON COLUMN ext_work_log."f_tomorrow_content" IS '明天内容';
COMMENT ON COLUMN ext_work_log."f_question" IS '遇到问题';
COMMENT ON COLUMN ext_work_log."f_to_user_id" IS '发送给谁';
COMMENT ON COLUMN ext_work_log."f_description" IS '描述';
COMMENT ON COLUMN ext_work_log."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_work_log."f_enabled_mark" IS '有效标志';
COMMENT ON COLUMN ext_work_log."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_work_log."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_work_log."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_work_log."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_work_log."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_work_log."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_work_log."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_work_log."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：ext_work_log_share
-- ----------------------------
CREATE TABLE ext_work_log_share (
	"f_id" varchar(50) NOT NULL,
	"f_work_log_id" varchar(50),
	"f_share_user_id" varchar(50),
	"f_share_time" timestamp,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE ext_work_log_share IS '工作日志分享';
COMMENT ON COLUMN ext_work_log_share."f_id" IS '自然主键';
COMMENT ON COLUMN ext_work_log_share."f_work_log_id" IS '日志主键';
COMMENT ON COLUMN ext_work_log_share."f_share_user_id" IS '共享人员';
COMMENT ON COLUMN ext_work_log_share."f_share_time" IS '共享时间';
COMMENT ON COLUMN ext_work_log_share."f_sort_code" IS '排序';
COMMENT ON COLUMN ext_work_log_share."f_creator_time" IS '创建时间';
COMMENT ON COLUMN ext_work_log_share."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN ext_work_log_share."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN ext_work_log_share."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN ext_work_log_share."f_delete_time" IS '删除时间';
COMMENT ON COLUMN ext_work_log_share."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN ext_work_log_share."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN ext_work_log_share."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：mt293714178051447621
-- ----------------------------
CREATE TABLE mt293714178051447621 (
	"cominputfield115" varchar(255),
	"cominputfield103" varchar(255),
	"datefield102" timestamp,
	"selectfield111" varchar(255),
	"cominputfield110" varchar(255),
	"cominputfield104" varchar(255),
	"cominputfield112" varchar(255),
	"cominputfield113" varchar(255),
	"numinputfield116" numeric(10,0),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt293714178051447621 IS '主表';
COMMENT ON COLUMN mt293714178051447621."cominputfield115" IS '编号';
COMMENT ON COLUMN mt293714178051447621."cominputfield103" IS '姓名';
COMMENT ON COLUMN mt293714178051447621."datefield102" IS '报名时间';
COMMENT ON COLUMN mt293714178051447621."selectfield111" IS '性别';
COMMENT ON COLUMN mt293714178051447621."cominputfield110" IS '年纪';
COMMENT ON COLUMN mt293714178051447621."cominputfield104" IS '联系电话';
COMMENT ON COLUMN mt293714178051447621."cominputfield112" IS '籍贯';
COMMENT ON COLUMN mt293714178051447621."cominputfield113" IS '家庭地址';
COMMENT ON COLUMN mt293714178051447621."numinputfield116" IS '报名费用';
COMMENT ON COLUMN mt293714178051447621."f_id" IS '主键';
COMMENT ON COLUMN mt293714178051447621."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt293714178051447621."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt293714178051447621."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt293714178051447621."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt293732572561709893
-- ----------------------------
CREATE TABLE mt293732572561709893 (
	"billrulefield119" varchar(255),
	"cominputfield102" varchar(255),
	"cominputfield103" varchar(255),
	"cominputfield104" varchar(255),
	"cominputfield105" varchar(255),
	"cominputfield106" varchar(255),
	"cominputfield107" varchar(255),
	"radiofield108" varchar(255),
	"radiofield109" varchar(255),
	"cominputfield110" varchar(255),
	"cominputfield111" varchar(255),
	"cominputfield112" varchar(255),
	"cominputfield113" varchar(255),
	"datefield114" timestamp,
	"cominputfield115" varchar(255),
	"cominputfield116" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt293732572561709893 IS '主表';
COMMENT ON COLUMN mt293732572561709893."billrulefield119" IS '编号';
COMMENT ON COLUMN mt293732572561709893."cominputfield102" IS '购药人';
COMMENT ON COLUMN mt293732572561709893."cominputfield103" IS '药品名称';
COMMENT ON COLUMN mt293732572561709893."cominputfield104" IS '身份证号';
COMMENT ON COLUMN mt293732572561709893."cominputfield105" IS '现住址';
COMMENT ON COLUMN mt293732572561709893."cominputfield106" IS '所属街道社区';
COMMENT ON COLUMN mt293732572561709893."cominputfield107" IS '电话';
COMMENT ON COLUMN mt293732572561709893."radiofield108" IS '是否有重点地区旅居史';
COMMENT ON COLUMN mt293732572561709893."radiofield109" IS '症状描述（是否发热、咳嗽）';
COMMENT ON COLUMN mt293732572561709893."cominputfield110" IS '工作单位';
COMMENT ON COLUMN mt293732572561709893."cominputfield111" IS '症状';
COMMENT ON COLUMN mt293732572561709893."cominputfield112" IS '营业员';
COMMENT ON COLUMN mt293732572561709893."cominputfield113" IS '联系人电话';
COMMENT ON COLUMN mt293732572561709893."datefield114" IS '销售时间';
COMMENT ON COLUMN mt293732572561709893."cominputfield115" IS '药房名称';
COMMENT ON COLUMN mt293732572561709893."cominputfield116" IS '许可证';
COMMENT ON COLUMN mt293732572561709893."f_id" IS '主键';
COMMENT ON COLUMN mt293732572561709893."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt293732572561709893."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt293732572561709893."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt293732572561709893."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt293737725377420101
-- ----------------------------
CREATE TABLE mt293737725377420101 (
	"billrulefield110" varchar(255),
	"cominputfield101" varchar(255),
	"cominputfield102" varchar(255),
	"uploadfzfield109" text,
	"datefield105" timestamp,
	"cominputfield106" varchar(255),
	"cominputfield107" varchar(255),
	"selectfield108" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt293737725377420101 IS '主表';
COMMENT ON COLUMN mt293737725377420101."billrulefield110" IS '编号';
COMMENT ON COLUMN mt293737725377420101."cominputfield101" IS '姓名';
COMMENT ON COLUMN mt293737725377420101."cominputfield102" IS '身份证号/护照';
COMMENT ON COLUMN mt293737725377420101."uploadfzfield109" IS '身份证';
COMMENT ON COLUMN mt293737725377420101."datefield105" IS '核酸检测时间';
COMMENT ON COLUMN mt293737725377420101."cominputfield106" IS '联系方式（手机或座机）';
COMMENT ON COLUMN mt293737725377420101."cominputfield107" IS '家庭住址';
COMMENT ON COLUMN mt293737725377420101."selectfield108" IS '所在社区';
COMMENT ON COLUMN mt293737725377420101."f_id" IS '主键';
COMMENT ON COLUMN mt293737725377420101."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt293737725377420101."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt293737725377420101."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt293737725377420101."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt293740367726025541
-- ----------------------------
CREATE TABLE mt293740367726025541 (
	"billrulefield101" varchar(255),
	"selectfield102" varchar(255),
	"cominputfield116" varchar(255),
	"selectfield115" varchar(255),
	"numinputfield105" numeric(10,0),
	"numinputfield106" numeric(10,0),
	"uploadimgfield107" text,
	"textareafield108" varchar(255),
	"createuserfield110" varchar(255),
	"createtimefield111" timestamp,
	"modifytimefield113" timestamp,
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt293740367726025541 IS '主表';
COMMENT ON COLUMN mt293740367726025541."billrulefield101" IS '产品编码';
COMMENT ON COLUMN mt293740367726025541."selectfield102" IS '产品分类';
COMMENT ON COLUMN mt293740367726025541."cominputfield116" IS '产品名称';
COMMENT ON COLUMN mt293740367726025541."selectfield115" IS '产品型号';
COMMENT ON COLUMN mt293740367726025541."numinputfield105" IS '采购单价';
COMMENT ON COLUMN mt293740367726025541."numinputfield106" IS '销售单价';
COMMENT ON COLUMN mt293740367726025541."uploadimgfield107" IS '产品图片';
COMMENT ON COLUMN mt293740367726025541."textareafield108" IS '产品描述';
COMMENT ON COLUMN mt293740367726025541."createuserfield110" IS '提交人';
COMMENT ON COLUMN mt293740367726025541."createtimefield111" IS '创建时间';
COMMENT ON COLUMN mt293740367726025541."modifytimefield113" IS '修改时间';
COMMENT ON COLUMN mt293740367726025541."f_id" IS '主键';
COMMENT ON COLUMN mt293740367726025541."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt293740367726025541."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt293740367726025541."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt293740367726025541."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt293756710756064069
-- ----------------------------
CREATE TABLE mt293756710756064069 (
	"billrulefield102" varchar(255),
	"userselectfield103" varchar(255),
	"datefield108" timestamp,
	"datefield104" timestamp,
	"datefield105" timestamp,
	"textareafield107" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt293756710756064069 IS '主表';
COMMENT ON COLUMN mt293756710756064069."billrulefield102" IS '编号';
COMMENT ON COLUMN mt293756710756064069."userselectfield103" IS '申请人';
COMMENT ON COLUMN mt293756710756064069."datefield108" IS '申请时间';
COMMENT ON COLUMN mt293756710756064069."datefield104" IS '用车时间';
COMMENT ON COLUMN mt293756710756064069."datefield105" IS '归还时间';
COMMENT ON COLUMN mt293756710756064069."textareafield107" IS '申请备注';
COMMENT ON COLUMN mt293756710756064069."f_id" IS '主键';
COMMENT ON COLUMN mt293756710756064069."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt293756710756064069."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt293756710756064069."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt293756710756064069."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt294012196562705413
-- ----------------------------
CREATE TABLE mt294012196562705413 (
	"cominputfield102" varchar(255),
	"radiofield103" varchar(255),
	"numinputfield113" numeric(10,0),
	"cominputfield104" varchar(255),
	"cominputfield105" varchar(255),
	"uploadfzfield106" text,
	"textareafield115" varchar(255),
	"cominputfield107" varchar(255),
	"cominputfield108" varchar(255),
	"cominputfield109" varchar(255),
	"cominputfield110" varchar(255),
	"selectfield112" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_inte_assistant" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt294012196562705413 IS '主表';
COMMENT ON COLUMN mt294012196562705413."cominputfield102" IS '姓名';
COMMENT ON COLUMN mt294012196562705413."radiofield103" IS '性别';
COMMENT ON COLUMN mt294012196562705413."numinputfield113" IS '年纪';
COMMENT ON COLUMN mt294012196562705413."cominputfield104" IS '联系电话';
COMMENT ON COLUMN mt294012196562705413."cominputfield105" IS '邮箱';
COMMENT ON COLUMN mt294012196562705413."uploadfzfield106" IS '简历附件';
COMMENT ON COLUMN mt294012196562705413."textareafield115" IS '家庭地址';
COMMENT ON COLUMN mt294012196562705413."cominputfield107" IS '身份证号';
COMMENT ON COLUMN mt294012196562705413."cominputfield108" IS '出生日期';
COMMENT ON COLUMN mt294012196562705413."cominputfield109" IS '毕业院校';
COMMENT ON COLUMN mt294012196562705413."cominputfield110" IS '专业名称';
COMMENT ON COLUMN mt294012196562705413."selectfield112" IS '最高学历';
COMMENT ON COLUMN mt294012196562705413."f_id" IS '主键';
COMMENT ON COLUMN mt294012196562705413."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt294012196562705413."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt294012196562705413."f_inte_assistant" IS '集成助手数据标识';
COMMENT ON COLUMN mt294012196562705413."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt294022926196317189
-- ----------------------------
CREATE TABLE mt294022926196317189 (
	"cominputfield101" varchar(255),
	"radiofield102" varchar(255),
	"selectfield103" varchar(255),
	"cominputfield104" varchar(255),
	"selectfield105" varchar(255),
	"selectfield106" varchar(255),
	"cominputfield107" varchar(255),
	"cominputfield108" varchar(255),
	"cominputfield109" varchar(255),
	"textareafield110" varchar(255),
	"addressfield111" text,
	"cominputfield153" varchar(255),
	"cominputfield114" varchar(255),
	"cominputfield117" varchar(255),
	"selectfield119" varchar(255),
	"selectfield120" varchar(255),
	"selectfield121" varchar(255),
	"selectfield122" varchar(255),
	"cominputfield123" varchar(255),
	"datefield125" timestamp,
	"selectfield126" varchar(255),
	"textareafield127" varchar(255),
	"cominputfield128" varchar(255),
	"cominputfield129" varchar(255),
	"cominputfield130" varchar(255),
	"datefield131" timestamp,
	"cominputfield132" varchar(255),
	"cominputfield133" varchar(255),
	"selectfield134" varchar(255),
	"datefield135" timestamp,
	"addressfield138" text,
	"cominputfield139" varchar(255),
	"cominputfield140" varchar(255),
	"cominputfield141" varchar(255),
	"selectfield142" varchar(255),
	"datefield143" timestamp,
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_inte_assistant" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt294022926196317189 IS '主表';
COMMENT ON COLUMN mt294022926196317189."cominputfield101" IS '姓名';
COMMENT ON COLUMN mt294022926196317189."radiofield102" IS '性别';
COMMENT ON COLUMN mt294022926196317189."selectfield103" IS '送诊';
COMMENT ON COLUMN mt294022926196317189."cominputfield104" IS '送诊地址';
COMMENT ON COLUMN mt294022926196317189."selectfield105" IS '发热';
COMMENT ON COLUMN mt294022926196317189."selectfield106" IS '证件类型';
COMMENT ON COLUMN mt294022926196317189."cominputfield107" IS '证件号';
COMMENT ON COLUMN mt294022926196317189."cominputfield108" IS '联系方式';
COMMENT ON COLUMN mt294022926196317189."cominputfield109" IS '人员状态';
COMMENT ON COLUMN mt294022926196317189."textareafield110" IS '人员状态备注';
COMMENT ON COLUMN mt294022926196317189."addressfield111" IS '区县';
COMMENT ON COLUMN mt294022926196317189."cominputfield153" IS '街道';
COMMENT ON COLUMN mt294022926196317189."cominputfield114" IS '社区';
COMMENT ON COLUMN mt294022926196317189."cominputfield117" IS '具体地址';
COMMENT ON COLUMN mt294022926196317189."selectfield119" IS '管控状态';
COMMENT ON COLUMN mt294022926196317189."selectfield120" IS '管控隔离类型';
COMMENT ON COLUMN mt294022926196317189."selectfield121" IS '人员类型（一级）';
COMMENT ON COLUMN mt294022926196317189."selectfield122" IS '人员类型（二级）';
COMMENT ON COLUMN mt294022926196317189."cominputfield123" IS '密接相关人';
COMMENT ON COLUMN mt294022926196317189."datefield125" IS '返回时间';
COMMENT ON COLUMN mt294022926196317189."selectfield126" IS '交通方式';
COMMENT ON COLUMN mt294022926196317189."textareafield127" IS '返回后活动路径';
COMMENT ON COLUMN mt294022926196317189."cominputfield128" IS '返回经过地';
COMMENT ON COLUMN mt294022926196317189."cominputfield129" IS '同行人员';
COMMENT ON COLUMN mt294022926196317189."cominputfield130" IS '接触人员';
COMMENT ON COLUMN mt294022926196317189."datefield131" IS '填写时间';
COMMENT ON COLUMN mt294022926196317189."cominputfield132" IS '机构名称';
COMMENT ON COLUMN mt294022926196317189."cominputfield133" IS '机构编号';
COMMENT ON COLUMN mt294022926196317189."selectfield134" IS '社区/农村';
COMMENT ON COLUMN mt294022926196317189."datefield135" IS '离开日期';
COMMENT ON COLUMN mt294022926196317189."addressfield138" IS '返回前前出发地';
COMMENT ON COLUMN mt294022926196317189."cominputfield139" IS '核酸检测';
COMMENT ON COLUMN mt294022926196317189."cominputfield140" IS '第一次检测结果';
COMMENT ON COLUMN mt294022926196317189."cominputfield141" IS '第二次检测结果';
COMMENT ON COLUMN mt294022926196317189."selectfield142" IS '是否才去信息化管控';
COMMENT ON COLUMN mt294022926196317189."datefield143" IS '本次管控日期';
COMMENT ON COLUMN mt294022926196317189."f_id" IS '主键';
COMMENT ON COLUMN mt294022926196317189."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt294022926196317189."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt294022926196317189."f_inte_assistant" IS '集成助手数据标识';
COMMENT ON COLUMN mt294022926196317189."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt294027801932110853
-- ----------------------------
CREATE TABLE mt294027801932110853 (
	"cominputfield101" varchar(255),
	"cominputfield102" varchar(255),
	"currorganizefield103" varchar(255),
	"numinputfield104" numeric(10,0),
	"numinputfield105" numeric(10,0),
	"numinputfield106" numeric(10,0),
	"numinputfield107" numeric(10,0),
	"numinputfield108" numeric(10,0),
	"numinputfield109" numeric(10,0),
	"numinputfield110" numeric(10,0),
	"numinputfield111" numeric(10,0),
	"numinputfield112" numeric(10,0),
	"numinputfield113" numeric(10,0),
	"numinputfield114" numeric(10,0),
	"numinputfield115" numeric(10,0),
	"numinputfield116" numeric(10,0),
	"numinputfield117" numeric(10,0),
	"numinputfield118" numeric(10,0),
	"numinputfield119" numeric(10,0),
	"numinputfield120" numeric(10,0),
	"numinputfield121" numeric(10,0),
	"textareafield122" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_inte_assistant" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt294027801932110853 IS '主表';
COMMENT ON COLUMN mt294027801932110853."cominputfield101" IS '姓名';
COMMENT ON COLUMN mt294027801932110853."cominputfield102" IS '工号';
COMMENT ON COLUMN mt294027801932110853."currorganizefield103" IS '部门';
COMMENT ON COLUMN mt294027801932110853."numinputfield104" IS '基本工资';
COMMENT ON COLUMN mt294027801932110853."numinputfield105" IS '岗位工资';
COMMENT ON COLUMN mt294027801932110853."numinputfield106" IS '补贴金额';
COMMENT ON COLUMN mt294027801932110853."numinputfield107" IS '绩效/每月';
COMMENT ON COLUMN mt294027801932110853."numinputfield108" IS '迟到早退扣款';
COMMENT ON COLUMN mt294027801932110853."numinputfield109" IS '病假扣款';
COMMENT ON COLUMN mt294027801932110853."numinputfield110" IS '事假扣款';
COMMENT ON COLUMN mt294027801932110853."numinputfield111" IS '旷工扣款';
COMMENT ON COLUMN mt294027801932110853."numinputfield112" IS '应发工资';
COMMENT ON COLUMN mt294027801932110853."numinputfield113" IS '个人养老保险';
COMMENT ON COLUMN mt294027801932110853."numinputfield114" IS '个人医疗保险';
COMMENT ON COLUMN mt294027801932110853."numinputfield115" IS '个人事业险';
COMMENT ON COLUMN mt294027801932110853."numinputfield116" IS '个人大病险';
COMMENT ON COLUMN mt294027801932110853."numinputfield117" IS '个人公积金';
COMMENT ON COLUMN mt294027801932110853."numinputfield118" IS '累计收入';
COMMENT ON COLUMN mt294027801932110853."numinputfield119" IS '累计扣减个税';
COMMENT ON COLUMN mt294027801932110853."numinputfield120" IS '累计应纳税所得额';
COMMENT ON COLUMN mt294027801932110853."numinputfield121" IS '本期个税';
COMMENT ON COLUMN mt294027801932110853."textareafield122" IS '备注';
COMMENT ON COLUMN mt294027801932110853."f_id" IS '主键';
COMMENT ON COLUMN mt294027801932110853."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt294027801932110853."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt294027801932110853."f_inte_assistant" IS '集成助手数据标识';
COMMENT ON COLUMN mt294027801932110853."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt294031961024928773
-- ----------------------------
CREATE TABLE mt294031961024928773 (
	"selectfield101" varchar(255),
	"userselectfield102" varchar(255),
	"cominputfield118" varchar(255),
	"depselectfield105" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt294031961024928773 IS '主表';
COMMENT ON COLUMN mt294031961024928773."selectfield101" IS '评估周期';
COMMENT ON COLUMN mt294031961024928773."userselectfield102" IS '评估人';
COMMENT ON COLUMN mt294031961024928773."cominputfield118" IS '工号';
COMMENT ON COLUMN mt294031961024928773."depselectfield105" IS '部门';
COMMENT ON COLUMN mt294031961024928773."f_id" IS '主键';
COMMENT ON COLUMN mt294031961024928773."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt294031961024928773."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt294031961024928773."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt294031961024928773."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt294037561750363141
-- ----------------------------
CREATE TABLE mt294037561750363141 (
	"cominputfield101" varchar(255),
	"cominputfield102" varchar(255),
	"cominputfield103" varchar(255),
	"userselectfield104" varchar(255),
	"cominputfield105" varchar(255),
	"createuserfield126" varchar(255),
	"createtimefield123" timestamp,
	"modifytimefield127" timestamp,
	"uploadimgfield106" text,
	"f_id" varchar(50) NOT NULL,
	"f_version" int4,
	"f_flowtaskid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt294037561750363141 IS '主表';
COMMENT ON COLUMN mt294037561750363141."cominputfield101" IS '设备名称';
COMMENT ON COLUMN mt294037561750363141."cominputfield102" IS '设备编号';
COMMENT ON COLUMN mt294037561750363141."cominputfield103" IS '所在位置';
COMMENT ON COLUMN mt294037561750363141."userselectfield104" IS '责任人';
COMMENT ON COLUMN mt294037561750363141."cominputfield105" IS '联系方式';
COMMENT ON COLUMN mt294037561750363141."createuserfield126" IS '提交人';
COMMENT ON COLUMN mt294037561750363141."createtimefield123" IS '创建时间';
COMMENT ON COLUMN mt294037561750363141."modifytimefield127" IS '修改时间';
COMMENT ON COLUMN mt294037561750363141."uploadimgfield106" IS '设备图片';
COMMENT ON COLUMN mt294037561750363141."f_id" IS '主键';
COMMENT ON COLUMN mt294037561750363141."f_version" IS '乐观锁';
COMMENT ON COLUMN mt294037561750363141."f_flowtaskid" IS '流程任务主键';
COMMENT ON COLUMN mt294037561750363141."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt294037561750363141."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt294037561750363141."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt294037561750363141."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt294090217118276613
-- ----------------------------
CREATE TABLE mt294090217118276613 (
	"selectfield102" varchar(255),
	"selectfield103" varchar(255),
	"datefield104" timestamp,
	"datefield105" timestamp,
	"cominputfield106" varchar(255),
	"cominputfield107" varchar(255),
	"selectfield108" varchar(255),
	"cominputfield109" varchar(255),
	"cominputfield110" varchar(255),
	"cominputfield111" varchar(255),
	"cominputfield112" varchar(255),
	"datefield129" timestamp,
	"cominputfield113" varchar(255),
	"userselectfield125" varchar(255),
	"selectfield124" varchar(255),
	"textareafield114" varchar(255),
	"textareafield115" varchar(255),
	"textareafield126" varchar(255),
	"cominputfield130" varchar(255),
	"datefield131" timestamp,
	"selectfield127" varchar(255),
	"selectfield128" varchar(255),
	"selectfield121" varchar(255),
	"selectfield122" varchar(255),
	"uploadfzfield123" text,
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flowid" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_flow_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt294090217118276613 IS '主表';
COMMENT ON COLUMN mt294090217118276613."selectfield102" IS '上报部门';
COMMENT ON COLUMN mt294090217118276613."selectfield103" IS '药剂科分部门';
COMMENT ON COLUMN mt294090217118276613."datefield104" IS '上报时间';
COMMENT ON COLUMN mt294090217118276613."datefield105" IS '差错时间';
COMMENT ON COLUMN mt294090217118276613."cominputfield106" IS '病历/门诊号';
COMMENT ON COLUMN mt294090217118276613."cominputfield107" IS '患者姓名';
COMMENT ON COLUMN mt294090217118276613."selectfield108" IS '性别';
COMMENT ON COLUMN mt294090217118276613."cominputfield109" IS '年龄';
COMMENT ON COLUMN mt294090217118276613."cominputfield110" IS '诊断';
COMMENT ON COLUMN mt294090217118276613."cominputfield111" IS '发现人员';
COMMENT ON COLUMN mt294090217118276613."cominputfield112" IS '差错人员';
COMMENT ON COLUMN mt294090217118276613."datefield129" IS '发生日期';
COMMENT ON COLUMN mt294090217118276613."cominputfield113" IS '药品名称';
COMMENT ON COLUMN mt294090217118276613."userselectfield125" IS '当前处理人';
COMMENT ON COLUMN mt294090217118276613."selectfield124" IS '流程状态';
COMMENT ON COLUMN mt294090217118276613."textareafield114" IS '差错详情';
COMMENT ON COLUMN mt294090217118276613."textareafield115" IS '建议改进措施';
COMMENT ON COLUMN mt294090217118276613."textareafield126" IS '处理结果';
COMMENT ON COLUMN mt294090217118276613."cominputfield130" IS '来文号';
COMMENT ON COLUMN mt294090217118276613."datefield131" IS '来文日期';
COMMENT ON COLUMN mt294090217118276613."selectfield127" IS '环节';
COMMENT ON COLUMN mt294090217118276613."selectfield128" IS '原因';
COMMENT ON COLUMN mt294090217118276613."selectfield121" IS '事件等级';
COMMENT ON COLUMN mt294090217118276613."selectfield122" IS '事件级别';
COMMENT ON COLUMN mt294090217118276613."uploadfzfield123" IS '附件';
COMMENT ON COLUMN mt294090217118276613."f_id" IS '主键';
COMMENT ON COLUMN mt294090217118276613."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt294090217118276613."f_flowid" IS '流程id';
COMMENT ON COLUMN mt294090217118276613."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt294090217118276613."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt294090217118276613."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt294099237023526085
-- ----------------------------
CREATE TABLE mt294099237023526085 (
	"userselectfield101" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt294099237023526085 IS '主表';
COMMENT ON COLUMN mt294099237023526085."userselectfield101" IS '用户选择';
COMMENT ON COLUMN mt294099237023526085."f_id" IS '主键';
COMMENT ON COLUMN mt294099237023526085."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：mt294099893327272965
-- ----------------------------
CREATE TABLE mt294099893327272965 (
	"userselectfield102" varchar(255),
	"currorganizefield103" varchar(255),
	"datefield104" timestamp,
	"datefield105" timestamp,
	"datefield106" timestamp,
	"createuserfield112" varchar(255),
	"createtimefield113" timestamp,
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flowid" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_flow_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt294099893327272965 IS '主表';
COMMENT ON COLUMN mt294099893327272965."userselectfield102" IS '出差申请人';
COMMENT ON COLUMN mt294099893327272965."currorganizefield103" IS '所属部门';
COMMENT ON COLUMN mt294099893327272965."datefield104" IS '申请日期';
COMMENT ON COLUMN mt294099893327272965."datefield105" IS '出差日期';
COMMENT ON COLUMN mt294099893327272965."datefield106" IS '归来日期';
COMMENT ON COLUMN mt294099893327272965."createuserfield112" IS '申请人';
COMMENT ON COLUMN mt294099893327272965."createtimefield113" IS '申请时间';
COMMENT ON COLUMN mt294099893327272965."f_id" IS '主键';
COMMENT ON COLUMN mt294099893327272965."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt294099893327272965."f_flowid" IS '流程id';
COMMENT ON COLUMN mt294099893327272965."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt294099893327272965."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt294099893327272965."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt294104577349819397
-- ----------------------------
CREATE TABLE mt294104577349819397 (
	"depselectfield102" varchar(255),
	"datefield103" timestamp,
	"datefield104" timestamp,
	"datefield105" timestamp,
	"numinputfield107" numeric(10,0),
	"cominputfield108" varchar(255),
	"textareafield109" varchar(255),
	"createuserfield110" varchar(255),
	"createtimefield111" timestamp,
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt294104577349819397 IS '主表';
COMMENT ON COLUMN mt294104577349819397."depselectfield102" IS '部门';
COMMENT ON COLUMN mt294104577349819397."datefield103" IS '当前时间';
COMMENT ON COLUMN mt294104577349819397."datefield104" IS '预算年份';
COMMENT ON COLUMN mt294104577349819397."datefield105" IS '预算月份';
COMMENT ON COLUMN mt294104577349819397."numinputfield107" IS '预算金额';
COMMENT ON COLUMN mt294104577349819397."cominputfield108" IS '金额大写';
COMMENT ON COLUMN mt294104577349819397."textareafield109" IS '备注';
COMMENT ON COLUMN mt294104577349819397."createuserfield110" IS '申请人';
COMMENT ON COLUMN mt294104577349819397."createtimefield111" IS '申请时间';
COMMENT ON COLUMN mt294104577349819397."f_id" IS '主键';
COMMENT ON COLUMN mt294104577349819397."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：mt294376098702073541
-- ----------------------------
CREATE TABLE mt294376098702073541 (
	"billrulefield101" varchar(255),
	"cominputfield102" varchar(255),
	"cominputfield103" varchar(255),
	"textareafield104" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt294376098702073541 IS '主表';
COMMENT ON COLUMN mt294376098702073541."billrulefield101" IS '内部订单号';
COMMENT ON COLUMN mt294376098702073541."cominputfield102" IS '客户名称';
COMMENT ON COLUMN mt294376098702073541."cominputfield103" IS '联系电话';
COMMENT ON COLUMN mt294376098702073541."textareafield104" IS '详细地址';
COMMENT ON COLUMN mt294376098702073541."f_id" IS '主键';
COMMENT ON COLUMN mt294376098702073541."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt294376098702073541."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt294376098702073541."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt294376098702073541."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt294382866144468677
-- ----------------------------
CREATE TABLE mt294382866144468677 (
	"billrulefield102" varchar(255),
	"cominputfield104" varchar(255),
	"selectfield105" varchar(255),
	"depselectfield106" varchar(255),
	"cominputfield108" varchar(255),
	"userselectfield109" varchar(255),
	"uploadfzfield119" text,
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flowid" varchar(50),
	"f_flow_id" varchar(50),
	"f_inte_assistant" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt294382866144468677 IS '主表';
COMMENT ON COLUMN mt294382866144468677."billrulefield102" IS '订单号';
COMMENT ON COLUMN mt294382866144468677."cominputfield104" IS '供应商';
COMMENT ON COLUMN mt294382866144468677."selectfield105" IS '仓库';
COMMENT ON COLUMN mt294382866144468677."depselectfield106" IS '采购部门';
COMMENT ON COLUMN mt294382866144468677."cominputfield108" IS '部门代号';
COMMENT ON COLUMN mt294382866144468677."userselectfield109" IS '业务负责人';
COMMENT ON COLUMN mt294382866144468677."uploadfzfield119" IS '发票上传';
COMMENT ON COLUMN mt294382866144468677."f_id" IS '主键';
COMMENT ON COLUMN mt294382866144468677."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt294382866144468677."f_flowid" IS '流程id';
COMMENT ON COLUMN mt294382866144468677."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt294382866144468677."f_inte_assistant" IS '集成助手数据标识';
COMMENT ON COLUMN mt294382866144468677."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt382811547782648325
-- ----------------------------
CREATE TABLE mt382811547782648325 (
	"cominputfield101" varchar(255),
	"textareafield102" varchar(255),
	"numinputfield103" numeric(65,0),
	"f_flowid" varchar(255),
	"f_version" int4,
	"f_flowtaskid" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_inte_assistant" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt382811547782648325 IS '0111流程表单-主表';
COMMENT ON COLUMN mt382811547782648325."cominputfield101" IS '单行输入';
COMMENT ON COLUMN mt382811547782648325."textareafield102" IS '多行输入';
COMMENT ON COLUMN mt382811547782648325."numinputfield103" IS '数字输入';
COMMENT ON COLUMN mt382811547782648325."f_flowid" IS '流程引擎id';
COMMENT ON COLUMN mt382811547782648325."f_version" IS '乐观锁';
COMMENT ON COLUMN mt382811547782648325."f_flowtaskid" IS '流程任务主键';
COMMENT ON COLUMN mt382811547782648325."f_id" IS '主键';
COMMENT ON COLUMN mt382811547782648325."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt382811547782648325."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt382811547782648325."f_inte_assistant" IS '集成助手数据标识';
COMMENT ON COLUMN mt382811547782648325."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt385453315686752389
-- ----------------------------
CREATE TABLE mt385453315686752389 (
	"depselectfield102" varchar(255),
	"datefield103" timestamp,
	"datefield104" timestamp,
	"datefield105" timestamp,
	"numinputfield107" numeric(65,0),
	"cominputfield108" varchar(255),
	"textareafield109" varchar(255),
	"createuserfield110" varchar(255),
	"createtimefield111" timestamp,
	"f_flowid" varchar(50),
	"f_version" int8,
	"f_flowtaskid" varchar(50),
	"f_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt385453315686752389 IS '预算管理-主表';
COMMENT ON COLUMN mt385453315686752389."depselectfield102" IS '部门';
COMMENT ON COLUMN mt385453315686752389."datefield103" IS '当前时间';
COMMENT ON COLUMN mt385453315686752389."datefield104" IS '预算年份';
COMMENT ON COLUMN mt385453315686752389."datefield105" IS '预算月份';
COMMENT ON COLUMN mt385453315686752389."numinputfield107" IS '预算金额';
COMMENT ON COLUMN mt385453315686752389."cominputfield108" IS '金额大写';
COMMENT ON COLUMN mt385453315686752389."textareafield109" IS '备注';
COMMENT ON COLUMN mt385453315686752389."createuserfield110" IS '申请人';
COMMENT ON COLUMN mt385453315686752389."createtimefield111" IS '申请时间';
COMMENT ON COLUMN mt385453315686752389."f_flowid" IS '流程id';
COMMENT ON COLUMN mt385453315686752389."f_version" IS '乐观锁';
COMMENT ON COLUMN mt385453315686752389."f_flowtaskid" IS '流程任务主键';
COMMENT ON COLUMN mt385453315686752389."f_id" IS '主键';
COMMENT ON COLUMN mt385453315686752389."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt385453315686752389."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt385453315686752389."f_flow_task_id" IS '流程任务Id';
COMMENT ON COLUMN mt385453315686752389."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt395179351563312389
-- ----------------------------
CREATE TABLE mt395179351563312389 (
	"pid" varchar(255),
	"name" varchar(255),
	"encode" varchar(255),
	"f_flowid" varchar(50),
	"f_version" int4,
	"f_flowtaskid" varchar(50),
	"f_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt395179351563312389 IS '列表树形表格-主表';
COMMENT ON COLUMN mt395179351563312389."pid" IS '上级';
COMMENT ON COLUMN mt395179351563312389."name" IS '名称';
COMMENT ON COLUMN mt395179351563312389."encode" IS '编号';
COMMENT ON COLUMN mt395179351563312389."f_flowid" IS '流程id';
COMMENT ON COLUMN mt395179351563312389."f_version" IS '乐观锁';
COMMENT ON COLUMN mt395179351563312389."f_flowtaskid" IS '流程任务主键';
COMMENT ON COLUMN mt395179351563312389."f_id" IS '主键';
COMMENT ON COLUMN mt395179351563312389."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt395179351563312389."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt395179351563312389."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt395179351563312389."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt395899725691230469
-- ----------------------------
CREATE TABLE mt395899725691230469 (
	"cominputfield102" varchar(255),
	"cominputfield103" varchar(255),
	"cominputfield106" varchar(255),
	"selectfield121" varchar(255),
	"uploadfzfield107" text,
	"uploadfzfield108" text,
	"cominputfield118" varchar(255),
	"cominputfield117" varchar(255),
	"cominputfield119" varchar(255),
	"cominputfield120" varchar(255),
	"cominputfield122" varchar(255),
	"cominputfield123" varchar(255),
	"treeselectfield126" varchar(255),
	"f_flowid" varchar(50),
	"f_version" int4,
	"f_flowtaskid" varchar(50),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt395899725691230469 IS '3.4.6新增功能汇总示例-主表';
COMMENT ON COLUMN mt395899725691230469."cominputfield102" IS '设计表单名称显示';
COMMENT ON COLUMN mt395899725691230469."cominputfield103" IS '控件类型中文名';
COMMENT ON COLUMN mt395899725691230469."cominputfield106" IS 'css示例添加';
COMMENT ON COLUMN mt395899725691230469."selectfield121" IS '添加多个快捷入口';
COMMENT ON COLUMN mt395899725691230469."uploadfzfield107" IS '支持自定义路径和分用户存储';
COMMENT ON COLUMN mt395899725691230469."uploadfzfield108" IS '支持文件类型多选';
COMMENT ON COLUMN mt395899725691230469."cominputfield118" IS '打印模板多选';
COMMENT ON COLUMN mt395899725691230469."cominputfield117" IS '数据条件过滤';
COMMENT ON COLUMN mt395899725691230469."cominputfield119" IS '批量打印/下载';
COMMENT ON COLUMN mt395899725691230469."cominputfield120" IS '自定义按钮调整';
COMMENT ON COLUMN mt395899725691230469."cominputfield122" IS '保存并新增';
COMMENT ON COLUMN mt395899725691230469."cominputfield123" IS '支持控件多选查询';
COMMENT ON COLUMN mt395899725691230469."treeselectfield126" IS '列表树形表格';
COMMENT ON COLUMN mt395899725691230469."f_flowid" IS '流程id';
COMMENT ON COLUMN mt395899725691230469."f_version" IS '乐观锁';
COMMENT ON COLUMN mt395899725691230469."f_flowtaskid" IS '流程任务主键';
COMMENT ON COLUMN mt395899725691230469."f_id" IS '主键';
COMMENT ON COLUMN mt395899725691230469."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：mt395964134161651973
-- ----------------------------
CREATE TABLE mt395964134161651973 (
	"relationformfield101" varchar(255),
	"popupselectfield104" varchar(255),
	"f_flowid" varchar(50),
	"f_version" int4,
	"f_flowtaskid" varchar(50),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt395964134161651973 IS '列表数据链接查看详情页-主表';
COMMENT ON COLUMN mt395964134161651973."relationformfield101" IS '产品名称';
COMMENT ON COLUMN mt395964134161651973."popupselectfield104" IS '人员名称';
COMMENT ON COLUMN mt395964134161651973."f_flowid" IS '流程id';
COMMENT ON COLUMN mt395964134161651973."f_version" IS '乐观锁';
COMMENT ON COLUMN mt395964134161651973."f_flowtaskid" IS '流程任务主键';
COMMENT ON COLUMN mt395964134161651973."f_id" IS '主键';
COMMENT ON COLUMN mt395964134161651973."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：mt400655094485373381
-- ----------------------------
CREATE TABLE mt400655094485373381 (
	"cominputfield101" varchar(255),
	"f_flowid" varchar(50),
	"f_version" int4,
	"f_flowtaskid" varchar(50),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt400655094485373381 IS 'cccccc-主表';
COMMENT ON COLUMN mt400655094485373381."cominputfield101" IS '单行输入';
COMMENT ON COLUMN mt400655094485373381."f_flowid" IS '流程id';
COMMENT ON COLUMN mt400655094485373381."f_version" IS '乐观锁';
COMMENT ON COLUMN mt400655094485373381."f_flowtaskid" IS '流程任务主键';
COMMENT ON COLUMN mt400655094485373381."f_id" IS '主键';
COMMENT ON COLUMN mt400655094485373381."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：mt420589912199274117
-- ----------------------------
CREATE TABLE mt420589912199274117 (
	"selectfield101" varchar(255),
	"selectfield102" varchar(255),
	"selectfield103" varchar(255),
	"f_flowid" varchar(50),
	"f_version" int4,
	"f_flowtaskid" varchar(50),
	"f_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt420589912199274117 IS '行政区划联动-主表';
COMMENT ON COLUMN mt420589912199274117."selectfield101" IS '省';
COMMENT ON COLUMN mt420589912199274117."selectfield102" IS '市';
COMMENT ON COLUMN mt420589912199274117."selectfield103" IS '区';
COMMENT ON COLUMN mt420589912199274117."f_flowid" IS '流程id';
COMMENT ON COLUMN mt420589912199274117."f_version" IS '乐观锁';
COMMENT ON COLUMN mt420589912199274117."f_flowtaskid" IS '流程任务主键';
COMMENT ON COLUMN mt420589912199274117."f_id" IS '主键';
COMMENT ON COLUMN mt420589912199274117."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt420589912199274117."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt420589912199274117."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt420589912199274117."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt456990191458975685
-- ----------------------------
CREATE TABLE mt456990191458975685 (
	"f_id" varchar(50) NOT NULL,
	"inputfield101" varchar(500),
	"textareafield102" varchar(500),
	"inputnumberfield103" varchar(500),
	"switchfield104" varchar(500),
	"radiofield105" varchar(500),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE mt456990191458975685 IS 'Test08041';
COMMENT ON COLUMN mt456990191458975685."f_id" IS '主键';
COMMENT ON COLUMN mt456990191458975685."inputfield101" IS '单行输入';
COMMENT ON COLUMN mt456990191458975685."textareafield102" IS '多行输入';
COMMENT ON COLUMN mt456990191458975685."inputnumberfield103" IS '数字输入';
COMMENT ON COLUMN mt456990191458975685."switchfield104" IS '开关';
COMMENT ON COLUMN mt456990191458975685."radiofield105" IS '单选框组';
COMMENT ON COLUMN mt456990191458975685."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：mt469496947087047173
-- ----------------------------
CREATE TABLE mt469496947087047173 (
	"inputfield101" varchar(255),
	"inputnumberfield102" numeric(38,15),
	"datepickerfield111" timestamp,
	"selectfield106" varchar(255),
	"textareafield107" varchar(255),
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_id" varchar(50) NOT NULL,
	"f_inte_assistant" int4

, PRIMARY KEY (f_tenant_id,f_id)
);
COMMENT ON TABLE mt469496947087047173 IS '复杂表头示例-主表';
COMMENT ON COLUMN mt469496947087047173."inputfield101" IS '客户名称';
COMMENT ON COLUMN mt469496947087047173."inputnumberfield102" IS '金额';
COMMENT ON COLUMN mt469496947087047173."datepickerfield111" IS '日期';
COMMENT ON COLUMN mt469496947087047173."selectfield106" IS '方式字典';
COMMENT ON COLUMN mt469496947087047173."textareafield107" IS '备注';
COMMENT ON COLUMN mt469496947087047173."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt469496947087047173."f_version" IS '乐观锁';
COMMENT ON COLUMN mt469496947087047173."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt469496947087047173."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt469496947087047173."f_id" IS '主键';
COMMENT ON COLUMN mt469496947087047173."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt469499339534825989
-- ----------------------------
CREATE TABLE mt469499339534825989 (
	"inputfield112" varchar(255),
	"organizeselectfield105" varchar(255),
	"depselectfield107" varchar(255),
	"posselectfield108" varchar(255),
	"groupselectfield111" varchar(255),
	"userselectfield109" varchar(255),
	"usersselectfield110" varchar(255),
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_id" varchar(50) NOT NULL,
	"f_inte_assistant" int4

, PRIMARY KEY (f_tenant_id,f_id)
);
COMMENT ON TABLE mt469499339534825989 IS '高级控件和默认查询-主表';
COMMENT ON COLUMN mt469499339534825989."inputfield112" IS '姓名';
COMMENT ON COLUMN mt469499339534825989."organizeselectfield105" IS '组织选择';
COMMENT ON COLUMN mt469499339534825989."depselectfield107" IS '部门选择';
COMMENT ON COLUMN mt469499339534825989."posselectfield108" IS '岗位选择';
COMMENT ON COLUMN mt469499339534825989."groupselectfield111" IS '分组选择';
COMMENT ON COLUMN mt469499339534825989."userselectfield109" IS '用户选择';
COMMENT ON COLUMN mt469499339534825989."usersselectfield110" IS '用户组件';
COMMENT ON COLUMN mt469499339534825989."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt469499339534825989."f_version" IS '乐观锁';
COMMENT ON COLUMN mt469499339534825989."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt469499339534825989."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt469499339534825989."f_id" IS '主键';
COMMENT ON COLUMN mt469499339534825989."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt469502670336489989
-- ----------------------------
CREATE TABLE mt469502670336489989 (
	"inputfield104" varchar(255),
	"radiofield106" varchar(255),
	"radiofield101" varchar(255),
	"checkboxfield102" varchar(255),
	"selectfield103" varchar(255),
	"cascaderfield107" varchar(255),
	"treeselectfield108" varchar(255),
	"popuptableselectfield109" varchar(255),
	"autocompletefield111" varchar(255),
	"popupselectfield110" varchar(255),
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_id" varchar(50) NOT NULL,
	"f_inte_assistant" int4

, PRIMARY KEY (f_tenant_id,f_id)
);
COMMENT ON TABLE mt469502670336489989 IS '数据接口字段示例-主表';
COMMENT ON COLUMN mt469502670336489989."inputfield104" IS '姓名';
COMMENT ON COLUMN mt469502670336489989."radiofield106" IS '性别';
COMMENT ON COLUMN mt469502670336489989."radiofield101" IS '单选框组';
COMMENT ON COLUMN mt469502670336489989."checkboxfield102" IS '多选框组';
COMMENT ON COLUMN mt469502670336489989."selectfield103" IS '下拉选择';
COMMENT ON COLUMN mt469502670336489989."cascaderfield107" IS '级联选择';
COMMENT ON COLUMN mt469502670336489989."treeselectfield108" IS '树形';
COMMENT ON COLUMN mt469502670336489989."popuptableselectfield109" IS '下拉表格真分页';
COMMENT ON COLUMN mt469502670336489989."autocompletefield111" IS '下拉补全';
COMMENT ON COLUMN mt469502670336489989."popupselectfield110" IS '弹窗选择';
COMMENT ON COLUMN mt469502670336489989."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt469502670336489989."f_version" IS '乐观锁';
COMMENT ON COLUMN mt469502670336489989."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt469502670336489989."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt469502670336489989."f_id" IS '主键';
COMMENT ON COLUMN mt469502670336489989."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt470888132380721605
-- ----------------------------
CREATE TABLE mt470888132380721605 (
	"uploadimgfield142" text,
	"uploadimgfield143" text,
	"uploadimgfield144" text,
	"uploadimgfield145" text,
	"uploadimgfield147" text,
	"uploadimgfield146" text,
	"uploadimgfield148" text,
	"uploadimgfield178" text,
	"uploadimgfield181" text,
	"uploadimgfield149" text,
	"uploadimgfield150" text,
	"uploadimgfield151" text,
	"uploadimgfield152" text,
	"uploadimgfield153" text,
	"uploadimgfield154" text,
	"uploadimgfield155" text,
	"uploadimgfield156" text,
	"uploadimgfield158" text,
	"uploadimgfield161" text,
	"uploadimgfield162" text,
	"uploadimgfield164" text,
	"uploadimgfield165" text,
	"uploadimgfield166" text,
	"uploadimgfield167" text,
	"uploadimgfield168" text,
	"uploadimgfield169" text,
	"uploadimgfield170" text,
	"uploadimgfield171" text,
	"uploadimgfield172" text,
	"uploadimgfield173" text,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_id" varchar(50) NOT NULL,
	"uploadimgfield157" text,
	"uploadimgfield11" varchar(50),
	"uploadimgfield12" text

, PRIMARY KEY (f_tenant_id,f_id)
);
COMMENT ON TABLE mt470888132380721605 IS '3.5.0更新功能-主表';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield142" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield143" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield144" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield145" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield147" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield146" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield148" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield178" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield181" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield149" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield150" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield151" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield152" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield153" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield154" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield155" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield156" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield158" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield161" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield162" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield164" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield165" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield166" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield167" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield168" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield169" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield170" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield171" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield172" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield173" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt470888132380721605."f_version" IS '乐观锁';
COMMENT ON COLUMN mt470888132380721605."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt470888132380721605."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt470888132380721605."f_id" IS '主键';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield157" IS '图片上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield11" IS '文件上传';
COMMENT ON COLUMN mt470888132380721605."uploadimgfield12" IS '文件上传1';
-- ----------------------------
-- 表名：mt470913062111543749
-- ----------------------------
CREATE TABLE mt470913062111543749 (
	"inputfield101" varchar(255),
	"inputfield102" varchar(255),
	"inputfield103" varchar(255),
	"inputfield104" varchar(255),
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_id" varchar(50) NOT NULL,
	"f_inte_assistant" int4

, PRIMARY KEY (f_tenant_id,f_id)
);
COMMENT ON TABLE mt470913062111543749 IS '集成助手暂存数据表-主表';
COMMENT ON COLUMN mt470913062111543749."inputfield101" IS '单行输入1';
COMMENT ON COLUMN mt470913062111543749."inputfield102" IS '单行输入2';
COMMENT ON COLUMN mt470913062111543749."inputfield103" IS '单行输入3';
COMMENT ON COLUMN mt470913062111543749."inputfield104" IS '单行输入4';
COMMENT ON COLUMN mt470913062111543749."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt470913062111543749."f_version" IS '乐观锁';
COMMENT ON COLUMN mt470913062111543749."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt470913062111543749."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt470913062111543749."f_id" IS '主键';
COMMENT ON COLUMN mt470913062111543749."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt470929966582727173
-- ----------------------------
CREATE TABLE mt470929966582727173 (
	"inputfield101" varchar(255),
	"inputfield102" varchar(255),
	"inputfield103" varchar(255),
	"inputfield104" varchar(255),
	"inputfield105" varchar(255),
	"inputfield106" varchar(255),
	"inputfield107" varchar(255),
	"inputfield108" varchar(255),
	"inputfield109" varchar(255),
	"inputfield110" varchar(255),
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_id" varchar(50) NOT NULL,
	"f_inte_assistant" int4

, PRIMARY KEY (f_tenant_id,f_id)
);
COMMENT ON TABLE mt470929966582727173 IS '客户管理记录表-主表';
COMMENT ON COLUMN mt470929966582727173."inputfield101" IS '内部订单号';
COMMENT ON COLUMN mt470929966582727173."inputfield102" IS '客户名称';
COMMENT ON COLUMN mt470929966582727173."inputfield103" IS '联系电话';
COMMENT ON COLUMN mt470929966582727173."inputfield104" IS '详细地址';
COMMENT ON COLUMN mt470929966582727173."inputfield105" IS '商品名';
COMMENT ON COLUMN mt470929966582727173."inputfield106" IS '编号';
COMMENT ON COLUMN mt470929966582727173."inputfield107" IS '销售价';
COMMENT ON COLUMN mt470929966582727173."inputfield108" IS '当前库存';
COMMENT ON COLUMN mt470929966582727173."inputfield109" IS '数量';
COMMENT ON COLUMN mt470929966582727173."inputfield110" IS '单品总价';
COMMENT ON COLUMN mt470929966582727173."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt470929966582727173."f_version" IS '乐观锁';
COMMENT ON COLUMN mt470929966582727173."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt470929966582727173."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt470929966582727173."f_id" IS '主键';
COMMENT ON COLUMN mt470929966582727173."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt517668914876910661
-- ----------------------------
CREATE TABLE mt517668914876910661 (
	"createtimefield101" timestamp,
	"datepickerfield102" timestamp,
	"datepickerfield104" timestamp,
	"datepickerfield105" timestamp,
	"timepickerfield103" varchar(255),
	"selectfield106" varchar(255),
	"cascaderfield107" varchar(255),
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_id" varchar(50) NOT NULL

, PRIMARY KEY (f_tenant_id,f_id)
);
COMMENT ON TABLE mt517668914876910661 IS '打印回显示例-主表';
COMMENT ON COLUMN mt517668914876910661."createtimefield101" IS '创建时间';
COMMENT ON COLUMN mt517668914876910661."datepickerfield102" IS '年';
COMMENT ON COLUMN mt517668914876910661."datepickerfield104" IS '年月';
COMMENT ON COLUMN mt517668914876910661."datepickerfield105" IS '年月';
COMMENT ON COLUMN mt517668914876910661."timepickerfield103" IS '时间选择';
COMMENT ON COLUMN mt517668914876910661."selectfield106" IS '下拉选择';
COMMENT ON COLUMN mt517668914876910661."cascaderfield107" IS '级联选择';
COMMENT ON COLUMN mt517668914876910661."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt517668914876910661."f_version" IS '乐观锁';
COMMENT ON COLUMN mt517668914876910661."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt517668914876910661."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt517668914876910661."f_id" IS '主键';
-- ----------------------------
-- 表名：mt585077626008240453
-- ----------------------------
CREATE TABLE mt585077626008240453 (
	"billrulefield106" varchar(255),
	"inputfield101" varchar(255),
	"datepickerfield102" timestamp,
	"selectfield103" varchar(255),
	"userselectfield104" varchar(255),
	"userselectfield105" varchar(255),
	"calculatefield116" numeric(38,2),
	"calculatefield117" numeric(38,2),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585077626008240453 IS '采购合同-主表';
COMMENT ON COLUMN mt585077626008240453."billrulefield106" IS '合同编号';
COMMENT ON COLUMN mt585077626008240453."inputfield101" IS '供应商';
COMMENT ON COLUMN mt585077626008240453."datepickerfield102" IS '签订日期';
COMMENT ON COLUMN mt585077626008240453."selectfield103" IS '付款方式';
COMMENT ON COLUMN mt585077626008240453."userselectfield104" IS '经手人';
COMMENT ON COLUMN mt585077626008240453."userselectfield105" IS '审核人';
COMMENT ON COLUMN mt585077626008240453."calculatefield116" IS '总数量';
COMMENT ON COLUMN mt585077626008240453."calculatefield117" IS '合同金额';
COMMENT ON COLUMN mt585077626008240453."f_id" IS '主键';
COMMENT ON COLUMN mt585077626008240453."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585077626008240453."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585077626008240453."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585077626008240453."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt585077626008240453."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt585113061585584645
-- ----------------------------
CREATE TABLE mt585113061585584645 (
	"inputfield106" varchar(255),
	"inputfield107" varchar(255),
	"inputfield111" varchar(255),
	"calculatefield119" numeric(38,2),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585113061585584645 IS '水电费用-主表';
COMMENT ON COLUMN mt585113061585584645."inputfield106" IS '楼层号';
COMMENT ON COLUMN mt585113061585584645."inputfield107" IS '业主姓名';
COMMENT ON COLUMN mt585113061585584645."inputfield111" IS '联系方式';
COMMENT ON COLUMN mt585113061585584645."calculatefield119" IS '水电费用';
COMMENT ON COLUMN mt585113061585584645."f_id" IS '主键';
COMMENT ON COLUMN mt585113061585584645."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585113061585584645."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585113061585584645."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585113061585584645."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt585113061585584645."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt585115948944458245
-- ----------------------------
CREATE TABLE mt585115948944458245 (
	"inputfield101" varchar(255),
	"inputfield102" varchar(255),
	"inputfield106" varchar(255),
	"areaselectfield105" varchar(255),
	"inputfield107" varchar(255),
	"inputfield104" varchar(255),
	"areaselectfield108" varchar(255),
	"inputfield119" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585115948944458245 IS '报价信息-主表';
COMMENT ON COLUMN mt585115948944458245."inputfield101" IS '需方联系员';
COMMENT ON COLUMN mt585115948944458245."inputfield102" IS '需方联系电话';
COMMENT ON COLUMN mt585115948944458245."inputfield106" IS '需方邮编';
COMMENT ON COLUMN mt585115948944458245."areaselectfield105" IS '需方地址';
COMMENT ON COLUMN mt585115948944458245."inputfield107" IS '供方联系人';
COMMENT ON COLUMN mt585115948944458245."inputfield104" IS '供方联系电话';
COMMENT ON COLUMN mt585115948944458245."areaselectfield108" IS '供方邮编';
COMMENT ON COLUMN mt585115948944458245."inputfield119" IS '供方地址';
COMMENT ON COLUMN mt585115948944458245."f_id" IS '主键';
COMMENT ON COLUMN mt585115948944458245."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585115948944458245."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585115948944458245."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585115948944458245."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt585115948944458245."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt585115958712992261
-- ----------------------------
CREATE TABLE mt585115958712992261 (
	"datepickerfield126" timestamp,
	"inputfield101" varchar(255),
	"radiofield102" varchar(255),
	"datepickerfield125" timestamp,
	"inputfield113" varchar(255),
	"selectfield124" varchar(255),
	"selectfield104" varchar(255),
	"inputfield106" varchar(255),
	"areaselectfield107" varchar(255),
	"radiofield110" varchar(255),
	"radiofield111" varchar(255),
	"radiofield112" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585115958712992261 IS '入职申请-主表';
COMMENT ON COLUMN mt585115958712992261."datepickerfield126" IS '填表日期';
COMMENT ON COLUMN mt585115958712992261."inputfield101" IS '姓名';
COMMENT ON COLUMN mt585115958712992261."radiofield102" IS '性别';
COMMENT ON COLUMN mt585115958712992261."datepickerfield125" IS '出生年月';
COMMENT ON COLUMN mt585115958712992261."inputfield113" IS '年龄';
COMMENT ON COLUMN mt585115958712992261."selectfield124" IS '民族';
COMMENT ON COLUMN mt585115958712992261."selectfield104" IS '学历';
COMMENT ON COLUMN mt585115958712992261."inputfield106" IS '联系电话';
COMMENT ON COLUMN mt585115958712992261."areaselectfield107" IS '家庭住址';
COMMENT ON COLUMN mt585115958712992261."radiofield110" IS '能否加班';
COMMENT ON COLUMN mt585115958712992261."radiofield111" IS '能否出差';
COMMENT ON COLUMN mt585115958712992261."radiofield112" IS '能否接受调动';
COMMENT ON COLUMN mt585115958712992261."f_id" IS '主键';
COMMENT ON COLUMN mt585115958712992261."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585115958712992261."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585115958712992261."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585115958712992261."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt585115958712992261."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt585385026032501317
-- ----------------------------
CREATE TABLE mt585385026032501317 (
	"billrulefield101" varchar(255),
	"inputfield102" varchar(255),
	"inputfield103" varchar(255),
	"inputfield104" varchar(255),
	"inputfield105" varchar(255),
	"inputfield106" varchar(255),
	"inputfield130" varchar(255),
	"inputfield110" varchar(255),
	"inputfield111" varchar(255),
	"inputfield112" varchar(255),
	"inputfield113" varchar(255),
	"inputfield114" varchar(255),
	"inputfield131" varchar(255),
	"selectfield132" varchar(255),
	"inputnumberfield118" numeric(38,0),
	"inputnumberfield126" numeric(38,15),
	"inputnumberfield127" numeric(38,15),
	"inputnumberfield119" numeric(38,15),
	"signfield120" text,
	"datepickerfield122" timestamp,
	"inputfield123" varchar(255),
	"signfield124" text,
	"datepickerfield128" timestamp,
	"signfield129" text,
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585385026032501317 IS '套打示例-主表';
COMMENT ON COLUMN mt585385026032501317."billrulefield101" IS '订单号';
COMMENT ON COLUMN mt585385026032501317."inputfield102" IS '收件邮编';
COMMENT ON COLUMN mt585385026032501317."inputfield103" IS '寄达局';
COMMENT ON COLUMN mt585385026032501317."inputfield104" IS '收件人姓名';
COMMENT ON COLUMN mt585385026032501317."inputfield105" IS '收件人电话';
COMMENT ON COLUMN mt585385026032501317."inputfield106" IS '单位名称';
COMMENT ON COLUMN mt585385026032501317."inputfield130" IS '详细地址';
COMMENT ON COLUMN mt585385026032501317."inputfield110" IS '寄件人姓名';
COMMENT ON COLUMN mt585385026032501317."inputfield111" IS '寄件人电话';
COMMENT ON COLUMN mt585385026032501317."inputfield112" IS '单位名称';
COMMENT ON COLUMN mt585385026032501317."inputfield113" IS '详细地址';
COMMENT ON COLUMN mt585385026032501317."inputfield114" IS '大客户代码';
COMMENT ON COLUMN mt585385026032501317."inputfield131" IS '邮政编码';
COMMENT ON COLUMN mt585385026032501317."selectfield132" IS '品名';
COMMENT ON COLUMN mt585385026032501317."inputnumberfield118" IS '数量';
COMMENT ON COLUMN mt585385026032501317."inputnumberfield126" IS '重量';
COMMENT ON COLUMN mt585385026032501317."inputnumberfield127" IS '金额';
COMMENT ON COLUMN mt585385026032501317."inputnumberfield119" IS '收款金额';
COMMENT ON COLUMN mt585385026032501317."signfield120" IS '寄件人签名';
COMMENT ON COLUMN mt585385026032501317."datepickerfield122" IS '收寄日期';
COMMENT ON COLUMN mt585385026032501317."inputfield123" IS '收寄局名';
COMMENT ON COLUMN mt585385026032501317."signfield124" IS '收寄人签名';
COMMENT ON COLUMN mt585385026032501317."datepickerfield128" IS '收件日期';
COMMENT ON COLUMN mt585385026032501317."signfield129" IS '收件人签名';
COMMENT ON COLUMN mt585385026032501317."f_id" IS '主键';
COMMENT ON COLUMN mt585385026032501317."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585385026032501317."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585385026032501317."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585385026032501317."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt585385026032501317."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt585398421410546245
-- ----------------------------
CREATE TABLE mt585398421410546245 (
	"datepickerfield102" timestamp,
	"depselectfield101" varchar(255),
	"userselectfield108" varchar(255),
	"textareafield109" varchar(255),
	"inputfield105" varchar(255),
	"inputfield106" varchar(255),
	"inputnumberfield107" numeric(38,15),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585398421410546245 IS '付款申请-主表';
COMMENT ON COLUMN mt585398421410546245."datepickerfield102" IS '申请日期';
COMMENT ON COLUMN mt585398421410546245."depselectfield101" IS '申请部门';
COMMENT ON COLUMN mt585398421410546245."userselectfield108" IS '申请人';
COMMENT ON COLUMN mt585398421410546245."textareafield109" IS '申请事由';
COMMENT ON COLUMN mt585398421410546245."inputfield105" IS '开户银行';
COMMENT ON COLUMN mt585398421410546245."inputfield106" IS '账户';
COMMENT ON COLUMN mt585398421410546245."inputnumberfield107" IS '款项金额';
COMMENT ON COLUMN mt585398421410546245."f_id" IS '主键';
COMMENT ON COLUMN mt585398421410546245."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585398421410546245."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585398421410546245."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585398421410546245."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt585398421410546245."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt585441085065528069
-- ----------------------------
CREATE TABLE mt585441085065528069 (
	"datepickerfield107" timestamp,
	"depselectfield102" varchar(255),
	"userselectfield101" varchar(255),
	"inputfield104" varchar(255),
	"inputfield105" varchar(255),
	"inputnumberfield106" numeric(38,15),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585441085065528069 IS '采购申请-主表';
COMMENT ON COLUMN mt585441085065528069."datepickerfield107" IS '申请日期';
COMMENT ON COLUMN mt585441085065528069."depselectfield102" IS '所属部门';
COMMENT ON COLUMN mt585441085065528069."userselectfield101" IS '申请人';
COMMENT ON COLUMN mt585441085065528069."inputfield104" IS '请购物资';
COMMENT ON COLUMN mt585441085065528069."inputfield105" IS '规格型号';
COMMENT ON COLUMN mt585441085065528069."inputnumberfield106" IS '请购数量';
COMMENT ON COLUMN mt585441085065528069."f_id" IS '主键';
COMMENT ON COLUMN mt585441085065528069."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585441085065528069."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585441085065528069."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585441085065528069."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt585441095630979845
-- ----------------------------
CREATE TABLE mt585441095630979845 (
	"datepickerfield107" timestamp,
	"depselectfield101" varchar(255),
	"userselectfield102" varchar(255),
	"inputfield103" varchar(255),
	"inputfield104" varchar(255),
	"inputnumberfield105" numeric(38,15),
	"textareafield106" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"inputfield107" varchar(255),
	"f_inte_assistant" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585441095630979845 IS '物资申请-主表';
COMMENT ON COLUMN mt585441095630979845."datepickerfield107" IS '申请日期';
COMMENT ON COLUMN mt585441095630979845."depselectfield101" IS '申请部门';
COMMENT ON COLUMN mt585441095630979845."userselectfield102" IS '申请人';
COMMENT ON COLUMN mt585441095630979845."inputfield103" IS '申请物资';
COMMENT ON COLUMN mt585441095630979845."inputfield104" IS '规格型号';
COMMENT ON COLUMN mt585441095630979845."inputnumberfield105" IS '数量';
COMMENT ON COLUMN mt585441095630979845."textareafield106" IS '用途';
COMMENT ON COLUMN mt585441095630979845."f_id" IS '主键';
COMMENT ON COLUMN mt585441095630979845."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585441095630979845."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585441095630979845."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585441095630979845."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt585441095630979845."inputfield107" IS '库存';
COMMENT ON COLUMN mt585441095630979845."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：mt585484941698007941
-- ----------------------------
CREATE TABLE mt585484941698007941 (
	"inputfield101" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585484941698007941 IS 'JS控制列表上按钮的颜色-主表';
COMMENT ON COLUMN mt585484941698007941."inputfield101" IS '单行输入';
COMMENT ON COLUMN mt585484941698007941."f_id" IS '主键';
COMMENT ON COLUMN mt585484941698007941."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585484941698007941."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585484941698007941."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585484941698007941."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt585806222716830853
-- ----------------------------
CREATE TABLE mt585806222716830853 (
	"depselectfield101" varchar(255),
	"inputfield102" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585806222716830853 IS '列表左侧树-主表';
COMMENT ON COLUMN mt585806222716830853."depselectfield101" IS '部门选择';
COMMENT ON COLUMN mt585806222716830853."inputfield102" IS '单行输入';
COMMENT ON COLUMN mt585806222716830853."f_id" IS '主键';
COMMENT ON COLUMN mt585806222716830853."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585806222716830853."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585806222716830853."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585806222716830853."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt585825608643118213
-- ----------------------------
CREATE TABLE mt585825608643118213 (
	"selectfield101" varchar(255),
	"inputfield102" varchar(255),
	"textareafield103" varchar(255),
	"inputnumberfield104" numeric(38,15),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585825608643118213 IS '列表标签面板-主表';
COMMENT ON COLUMN mt585825608643118213."selectfield101" IS '客户分类';
COMMENT ON COLUMN mt585825608643118213."inputfield102" IS '客户名称';
COMMENT ON COLUMN mt585825608643118213."textareafield103" IS '备注';
COMMENT ON COLUMN mt585825608643118213."inputnumberfield104" IS '需求数量';
COMMENT ON COLUMN mt585825608643118213."f_id" IS '主键';
COMMENT ON COLUMN mt585825608643118213."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585825608643118213."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585825608643118213."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585825608643118213."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt585831812765320325
-- ----------------------------
CREATE TABLE mt585831812765320325 (
	"inputfield102" varchar(255),
	"selectfield103" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt585831812765320325 IS 'js列表按钮显隐-主表';
COMMENT ON COLUMN mt585831812765320325."inputfield102" IS '单行输入';
COMMENT ON COLUMN mt585831812765320325."selectfield103" IS '下拉选择';
COMMENT ON COLUMN mt585831812765320325."f_id" IS '主键';
COMMENT ON COLUMN mt585831812765320325."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt585831812765320325."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt585831812765320325."f_version" IS '乐观锁';
COMMENT ON COLUMN mt585831812765320325."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt623163332936859845
-- ----------------------------
CREATE TABLE mt623163332936859845 (
	"inputfielde343ea" varchar(255),
	"depselectfield3e4be5" varchar(255),
	"userselectfieldde46f0" varchar(255),
	"datepickerfield8796e7" timestamp,
	"radiofieldc7dbea" varchar(255),
	"textareafield5bece7" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt623163332936859845 IS '离职申请-主表';
COMMENT ON COLUMN mt623163332936859845."inputfielde343ea" IS '工号';
COMMENT ON COLUMN mt623163332936859845."depselectfield3e4be5" IS '所在部门';
COMMENT ON COLUMN mt623163332936859845."userselectfieldde46f0" IS '姓名';
COMMENT ON COLUMN mt623163332936859845."datepickerfield8796e7" IS '预计离职日期';
COMMENT ON COLUMN mt623163332936859845."radiofieldc7dbea" IS '离职类型';
COMMENT ON COLUMN mt623163332936859845."textareafield5bece7" IS '离职原因';
COMMENT ON COLUMN mt623163332936859845."f_id" IS '主键';
COMMENT ON COLUMN mt623163332936859845."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt623163332936859845."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt623163332936859845."f_version" IS '乐观锁';
COMMENT ON COLUMN mt623163332936859845."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt623163941190631621
-- ----------------------------
CREATE TABLE mt623163941190631621 (
	"inputfieldb9b2fb" varchar(255),
	"userselectfield168af6" varchar(255),
	"depselectfield5a4271" varchar(255),
	"datepickerfield21a50a" timestamp,
	"inputfield08827c" varchar(255),
	"inputfield7cdfad" varchar(255),
	"inputfielda4e0a4" varchar(255),
	"textareafielde9424d" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50),
	"f_dateht" timestamp

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt623163941190631621 IS '员工信息-主表';
COMMENT ON COLUMN mt623163941190631621."inputfieldb9b2fb" IS '工号';
COMMENT ON COLUMN mt623163941190631621."userselectfield168af6" IS '姓名';
COMMENT ON COLUMN mt623163941190631621."depselectfield5a4271" IS '部门';
COMMENT ON COLUMN mt623163941190631621."datepickerfield21a50a" IS '入职日期';
COMMENT ON COLUMN mt623163941190631621."inputfield08827c" IS '在职状态';
COMMENT ON COLUMN mt623163941190631621."inputfield7cdfad" IS '联系方式';
COMMENT ON COLUMN mt623163941190631621."inputfielda4e0a4" IS '身份证号';
COMMENT ON COLUMN mt623163941190631621."textareafielde9424d" IS '家庭住址';
COMMENT ON COLUMN mt623163941190631621."f_id" IS '主键';
COMMENT ON COLUMN mt623163941190631621."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt623163941190631621."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt623163941190631621."f_version" IS '乐观锁';
COMMENT ON COLUMN mt623163941190631621."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN mt623163941190631621."f_dateht" IS '合同到期时间';
-- ----------------------------
-- 表名：mt623183981692584133
-- ----------------------------
CREATE TABLE mt623183981692584133 (
	"inputfield9ee228" varchar(255),
	"depselectfieldf77c52" varchar(255),
	"userselectfield39fc3a" varchar(255),
	"datepickerfield21e750" timestamp,
	"inputfield73d616" varchar(255),
	"textareafield406675" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt623183981692584133 IS '离职员工表-主表';
COMMENT ON COLUMN mt623183981692584133."inputfield9ee228" IS '工号';
COMMENT ON COLUMN mt623183981692584133."depselectfieldf77c52" IS '部门';
COMMENT ON COLUMN mt623183981692584133."userselectfield39fc3a" IS '姓名';
COMMENT ON COLUMN mt623183981692584133."datepickerfield21e750" IS '离职日期';
COMMENT ON COLUMN mt623183981692584133."inputfield73d616" IS '离职类型';
COMMENT ON COLUMN mt623183981692584133."textareafield406675" IS '离职原因';
COMMENT ON COLUMN mt623183981692584133."f_id" IS '主键';
COMMENT ON COLUMN mt623183981692584133."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt623183981692584133."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt623183981692584133."f_version" IS '乐观锁';
COMMENT ON COLUMN mt623183981692584133."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt623417550885093381
-- ----------------------------
CREATE TABLE mt623417550885093381 (
	"userselectfieldc1737e" varchar(255),
	"depselectfieldca3bda" varchar(255),
	"datepickerfield6e1b8e" timestamp,
	"inputfield0120f5" varchar(255),
	"textareafield5131eb" varchar(255),
	"textareafield240d59" varchar(255),
	"uploadfilefield567e4d" text,
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt623417550885093381 IS '离职交接表-主表';
COMMENT ON COLUMN mt623417550885093381."userselectfieldc1737e" IS '离职员工';
COMMENT ON COLUMN mt623417550885093381."depselectfieldca3bda" IS '所在部门';
COMMENT ON COLUMN mt623417550885093381."datepickerfield6e1b8e" IS '离职日期';
COMMENT ON COLUMN mt623417550885093381."inputfield0120f5" IS '离职原因';
COMMENT ON COLUMN mt623417550885093381."textareafield5131eb" IS '工作事项';
COMMENT ON COLUMN mt623417550885093381."textareafield240d59" IS '未完成事项';
COMMENT ON COLUMN mt623417550885093381."uploadfilefield567e4d" IS '文件交接';
COMMENT ON COLUMN mt623417550885093381."f_id" IS '主键';
COMMENT ON COLUMN mt623417550885093381."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt623417550885093381."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt623417550885093381."f_version" IS '乐观锁';
COMMENT ON COLUMN mt623417550885093381."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt623425084727492613
-- ----------------------------
CREATE TABLE mt623425084727492613 (
	"inputfield16dc57" varchar(255),
	"userselectfieldd17ae6" varchar(255),
	"depselectfielde34b42" varchar(255),
	"inputfieldcd3bc7" varchar(255),
	"datepickerfield2032c2" timestamp,
	"uploadfilefieldb4e26c" text,
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt623425084727492613 IS '劳动合同续签-主表';
COMMENT ON COLUMN mt623425084727492613."inputfield16dc57" IS '工号';
COMMENT ON COLUMN mt623425084727492613."userselectfieldd17ae6" IS '姓名';
COMMENT ON COLUMN mt623425084727492613."depselectfielde34b42" IS '所在部门';
COMMENT ON COLUMN mt623425084727492613."inputfieldcd3bc7" IS '合同类型';
COMMENT ON COLUMN mt623425084727492613."datepickerfield2032c2" IS '合同到期日';
COMMENT ON COLUMN mt623425084727492613."uploadfilefieldb4e26c" IS '合同附件';
COMMENT ON COLUMN mt623425084727492613."f_id" IS '主键';
COMMENT ON COLUMN mt623425084727492613."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt623425084727492613."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt623425084727492613."f_version" IS '乐观锁';
COMMENT ON COLUMN mt623425084727492613."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt624164005967037317
-- ----------------------------
CREATE TABLE mt624164005967037317 (
	"inputfield44a3a9" varchar(255),
	"userselectfield570fc8" varchar(255),
	"depselectfield0c00ce" varchar(255),
	"datepickerfieldf1981d" timestamp,
	"inputfield5fe3ce" varchar(255),
	"inputfield8f47fd" varchar(255),
	"inputfield51c3c2" varchar(255),
	"textareafield700cef" varchar(255),
	"datepickerfieldcced1f" timestamp,
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt624164005967037317 IS '入职申请-主表';
COMMENT ON COLUMN mt624164005967037317."inputfield44a3a9" IS '工号';
COMMENT ON COLUMN mt624164005967037317."userselectfield570fc8" IS '姓名';
COMMENT ON COLUMN mt624164005967037317."depselectfield0c00ce" IS '部门';
COMMENT ON COLUMN mt624164005967037317."datepickerfieldf1981d" IS '入职时间';
COMMENT ON COLUMN mt624164005967037317."inputfield5fe3ce" IS '在职状态';
COMMENT ON COLUMN mt624164005967037317."inputfield8f47fd" IS '联系方式';
COMMENT ON COLUMN mt624164005967037317."inputfield51c3c2" IS '身份证';
COMMENT ON COLUMN mt624164005967037317."textareafield700cef" IS '家庭住址';
COMMENT ON COLUMN mt624164005967037317."datepickerfieldcced1f" IS '合同到期时间';
COMMENT ON COLUMN mt624164005967037317."f_id" IS '主键';
COMMENT ON COLUMN mt624164005967037317."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt624164005967037317."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt624164005967037317."f_version" IS '乐观锁';
COMMENT ON COLUMN mt624164005967037317."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：mt624165616286172037
-- ----------------------------
CREATE TABLE mt624165616286172037 (
	"inputfield5facef" varchar(255),
	"userselectfieldd6fa6c" varchar(255),
	"depselectfield0312fd" varchar(255),
	"inputfielda924aa" varchar(255),
	"datepickerfield2f5617" timestamp,
	"selectfield1ce6ab" varchar(255),
	"textareafield0ef029" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_version" int4,
	"f_flow_task_id" varchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE mt624165616286172037 IS '员工培训-主表';
COMMENT ON COLUMN mt624165616286172037."inputfield5facef" IS '工号';
COMMENT ON COLUMN mt624165616286172037."userselectfieldd6fa6c" IS '培训申请人';
COMMENT ON COLUMN mt624165616286172037."depselectfield0312fd" IS '所在部门';
COMMENT ON COLUMN mt624165616286172037."inputfielda924aa" IS '培训项目';
COMMENT ON COLUMN mt624165616286172037."datepickerfield2f5617" IS '申请时间';
COMMENT ON COLUMN mt624165616286172037."selectfield1ce6ab" IS '培训方式';
COMMENT ON COLUMN mt624165616286172037."textareafield0ef029" IS '培训目的';
COMMENT ON COLUMN mt624165616286172037."f_id" IS '主键';
COMMENT ON COLUMN mt624165616286172037."f_tenant_id" IS '租户id';
COMMENT ON COLUMN mt624165616286172037."f_flow_id" IS '流程id';
COMMENT ON COLUMN mt624165616286172037."f_version" IS '乐观锁';
COMMENT ON COLUMN mt624165616286172037."f_flow_task_id" IS '流程任务主键';
-- ----------------------------
-- 表名：report_charts
-- ----------------------------
CREATE TABLE report_charts (
	"id" varchar(50) NOT NULL,
	"qybm" varchar(255),
	"fxdmc" varchar(255),
	"fxdj" varchar(255),
	"pgry" varchar(255),
	"pgrq" varchar(255),
	"fxfxff" varchar(255),
	"lece" varchar(255),
	"lecc" varchar(255),
	"lsl" varchar(255),
	"lss" varchar(255),
	"pgfxz" varchar(255),
	"fprq" varchar(255),
	"status" varchar(255),
	"createdate" varchar(255),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (ID,f_tenant_id)
);
COMMENT ON TABLE report_charts IS '报表图表';
COMMENT ON COLUMN report_charts."id" IS '';
COMMENT ON COLUMN report_charts."qybm" IS '';
COMMENT ON COLUMN report_charts."fxdmc" IS '';
COMMENT ON COLUMN report_charts."fxdj" IS '';
COMMENT ON COLUMN report_charts."pgry" IS '';
COMMENT ON COLUMN report_charts."pgrq" IS '';
COMMENT ON COLUMN report_charts."fxfxff" IS '';
COMMENT ON COLUMN report_charts."lece" IS '';
COMMENT ON COLUMN report_charts."lecc" IS '';
COMMENT ON COLUMN report_charts."lsl" IS '';
COMMENT ON COLUMN report_charts."lss" IS '';
COMMENT ON COLUMN report_charts."pgfxz" IS '';
COMMENT ON COLUMN report_charts."fprq" IS '';
COMMENT ON COLUMN report_charts."status" IS '';
COMMENT ON COLUMN report_charts."createdate" IS '';
COMMENT ON COLUMN report_charts."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：report_department
-- ----------------------------
CREATE TABLE report_department (
	"id" varchar(50) NOT NULL,
	"departmentname" varchar(255),
	"departmentnum" varchar(11),
	"organizationname" varchar(255),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
COMMENT ON TABLE report_department IS '报表部门示例';
COMMENT ON COLUMN report_department."id" IS '';
COMMENT ON COLUMN report_department."departmentname" IS '';
COMMENT ON COLUMN report_department."departmentnum" IS '';
COMMENT ON COLUMN report_department."organizationname" IS '';
COMMENT ON COLUMN report_department."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：report_template
-- ----------------------------
CREATE TABLE report_template (
	"f_id" varchar(50) NOT NULL,
	"f_version_id" varchar(50),
	"f_full_name" varchar(200) NOT NULL,
	"f_en_code" varchar(50) NOT NULL,
	"f_category" varchar(50) NOT NULL,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_allow_export" int4,
	"f_allow_print" int4,
	"f_platform_release" varchar(100)

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE report_template IS '报表模板';
COMMENT ON COLUMN report_template."f_id" IS '主键';
COMMENT ON COLUMN report_template."f_version_id" IS '版本主键';
COMMENT ON COLUMN report_template."f_full_name" IS '名称';
COMMENT ON COLUMN report_template."f_en_code" IS '编码';
COMMENT ON COLUMN report_template."f_category" IS '分类';
COMMENT ON COLUMN report_template."f_description" IS '描述或说明';
COMMENT ON COLUMN report_template."f_enabled_mark" IS '有效标志';
COMMENT ON COLUMN report_template."f_sort_code" IS '排序';
COMMENT ON COLUMN report_template."f_creator_time" IS '创建时间';
COMMENT ON COLUMN report_template."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN report_template."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN report_template."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN report_template."f_delete_time" IS '删除时间';
COMMENT ON COLUMN report_template."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN report_template."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN report_template."f_tenant_id" IS '租户id';
COMMENT ON COLUMN report_template."f_allow_export" IS '是否导出';
COMMENT ON COLUMN report_template."f_allow_print" IS '是否打印';
COMMENT ON COLUMN report_template."f_platform_release" IS '发布选中平台';
-- ----------------------------
-- 表名：report_user
-- ----------------------------
CREATE TABLE report_user (
	"id" varchar(255) NOT NULL,
	"username" varchar(255),
	"education" varchar(255),
	"sex" varchar(255),
	"salary" numeric(10,2),
	"departmentnum" varchar(255),
	"peoplenum" varchar(255),
	"month" int4,
	"year" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
COMMENT ON TABLE report_user IS '报表用户示例';
COMMENT ON COLUMN report_user."id" IS '';
COMMENT ON COLUMN report_user."username" IS '';
COMMENT ON COLUMN report_user."education" IS '';
COMMENT ON COLUMN report_user."sex" IS '';
COMMENT ON COLUMN report_user."salary" IS '';
COMMENT ON COLUMN report_user."departmentnum" IS '';
COMMENT ON COLUMN report_user."peoplenum" IS '';
COMMENT ON COLUMN report_user."month" IS '';
COMMENT ON COLUMN report_user."year" IS '';
COMMENT ON COLUMN report_user."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：report_version
-- ----------------------------
CREATE TABLE report_version (
	"f_id" varchar(50) NOT NULL,
	"f_template_id" varchar(50),
	"f_state" int4,
	"f_version" int4,
	"f_cells" text,
	"f_snapshot" text,
	"f_query_list" text,
	"f_convert_config" text,
	"f_sort_code" int8,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL,
	"f_sort_list" text

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE report_version IS '报表版本记录';
COMMENT ON COLUMN report_version."f_id" IS '主键';
COMMENT ON COLUMN report_version."f_template_id" IS '报表模板id';
COMMENT ON COLUMN report_version."f_state" IS '状态：0-设计中，1-启用中，2-已归档';
COMMENT ON COLUMN report_version."f_version" IS '版本';
COMMENT ON COLUMN report_version."f_cells" IS '模板json';
COMMENT ON COLUMN report_version."f_snapshot" IS '模板json';
COMMENT ON COLUMN report_version."f_query_list" IS '模板json';
COMMENT ON COLUMN report_version."f_convert_config" IS '模板json';
COMMENT ON COLUMN report_version."f_sort_code" IS '排序';
COMMENT ON COLUMN report_version."f_description" IS '描述或说明';
COMMENT ON COLUMN report_version."f_enabled_mark" IS '有效标志';
COMMENT ON COLUMN report_version."f_creator_time" IS '创建时间';
COMMENT ON COLUMN report_version."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN report_version."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN report_version."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN report_version."f_delete_time" IS '删除时间';
COMMENT ON COLUMN report_version."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN report_version."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN report_version."f_tenant_id" IS '租户id';
COMMENT ON COLUMN report_version."f_sort_list" IS '模板json';
-- ----------------------------
-- 表名：test_carapplication
-- ----------------------------
CREATE TABLE test_carapplication (
	"f_id" varchar(50) NOT NULL,
	"f_applicationno" varchar(50),
	"f_applicant" varchar(100),
	"f_applicantdate" timestamp,
	"f_destination" varchar(100),
	"f_startdate" timestamp,
	"f_enddate" timestamp,
	"f_vehiclenumber" varchar(100),
	"f_driver" varchar(100),
	"f_estimated" varchar(200),
	"f_entourage" varchar(500),
	"f_reasons" varchar(300),
	"f_remarks" varchar(300),
	"f_creatoruserid" varchar(50),
	"f_creatortime" timestamp,
	"f_lastmodifytime" timestamp,
	"f_lastmodifyuserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_carapplication IS '用车申请表';
COMMENT ON COLUMN test_carapplication."f_id" IS '主键';
COMMENT ON COLUMN test_carapplication."f_applicationno" IS '申请单号';
COMMENT ON COLUMN test_carapplication."f_applicant" IS '申请人';
COMMENT ON COLUMN test_carapplication."f_applicantdate" IS '申请日期';
COMMENT ON COLUMN test_carapplication."f_destination" IS '目的地';
COMMENT ON COLUMN test_carapplication."f_startdate" IS '起始时间';
COMMENT ON COLUMN test_carapplication."f_enddate" IS '结束时间';
COMMENT ON COLUMN test_carapplication."f_vehiclenumber" IS '车辆号码';
COMMENT ON COLUMN test_carapplication."f_driver" IS '驾驶员';
COMMENT ON COLUMN test_carapplication."f_estimated" IS '预计里程/KM';
COMMENT ON COLUMN test_carapplication."f_entourage" IS '随行人员';
COMMENT ON COLUMN test_carapplication."f_reasons" IS '用车事由';
COMMENT ON COLUMN test_carapplication."f_remarks" IS '备注';
COMMENT ON COLUMN test_carapplication."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_carapplication."f_creatortime" IS '创建时间';
COMMENT ON COLUMN test_carapplication."f_lastmodifytime" IS '修改时间';
COMMENT ON COLUMN test_carapplication."f_lastmodifyuserid" IS '修改用户';
COMMENT ON COLUMN test_carapplication."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：test_cost
-- ----------------------------
CREATE TABLE test_cost (
	"f_id" varchar(50) NOT NULL,
	"f_reimbursementid" varchar(50),
	"f_cost_classes" varchar(200),
	"f_amount" numeric(18,2),
	"f_remarks" varchar(200),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_cost IS '费用明细表';
COMMENT ON COLUMN test_cost."f_id" IS '主键';
COMMENT ON COLUMN test_cost."f_reimbursementid" IS '主表主键';
COMMENT ON COLUMN test_cost."f_cost_classes" IS '费用类别';
COMMENT ON COLUMN test_cost."f_amount" IS '报销金额';
COMMENT ON COLUMN test_cost."f_remarks" IS '备注';
COMMENT ON COLUMN test_cost."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：test_customer
-- ----------------------------
CREATE TABLE test_customer (
	"f_id" varchar(50) NOT NULL,
	"f_sortcode" varchar(50),
	"f_depname" varchar(255),
	"f_username" varchar(50),
	"f_type" varchar(50),
	"f_grade" varchar(50),
	"f_customername" varchar(200),
	"f_leveladdress" varchar(500),
	"f_channel" varchar(200),
	"f_trade" varchar(200),
	"f_nature" varchar(500),
	"f_model" varchar(500),
	"f_address" varchar(500),
	"f_creatortime" timestamp,
	"f_creatoruserid" varchar(50),
	"f_lastmodifytime" timestamp,
	"f_lastmodifyuserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_customer IS '大客户信息表';
COMMENT ON COLUMN test_customer."f_id" IS '主键';
COMMENT ON COLUMN test_customer."f_sortcode" IS '序号';
COMMENT ON COLUMN test_customer."f_depname" IS '所属部门';
COMMENT ON COLUMN test_customer."f_username" IS '业务员姓名';
COMMENT ON COLUMN test_customer."f_type" IS '客户类型';
COMMENT ON COLUMN test_customer."f_grade" IS '客户等级';
COMMENT ON COLUMN test_customer."f_customername" IS '客户全称';
COMMENT ON COLUMN test_customer."f_leveladdress" IS '省份';
COMMENT ON COLUMN test_customer."f_channel" IS '渠道全称';
COMMENT ON COLUMN test_customer."f_trade" IS '行业';
COMMENT ON COLUMN test_customer."f_nature" IS '企业性质';
COMMENT ON COLUMN test_customer."f_model" IS '企业规模';
COMMENT ON COLUMN test_customer."f_address" IS '企业地址（详细地址）';
COMMENT ON COLUMN test_customer."f_creatortime" IS '创建时间';
COMMENT ON COLUMN test_customer."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_customer."f_lastmodifytime" IS '修改时间';
COMMENT ON COLUMN test_customer."f_lastmodifyuserid" IS '修改用户';
COMMENT ON COLUMN test_customer."f_tenant_id" IS '租户id';
COMMENT ON COLUMN test_customer."f_flow_id" IS '流程id';
COMMENT ON COLUMN test_customer."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN test_customer."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：test_details
-- ----------------------------
CREATE TABLE test_details (
	"f_id" varchar(50) NOT NULL,
	"f_receivableid" varchar(50),
	"f_month" varchar(200),
	"f_rent" numeric(18,2),
	"f_water_rent" numeric(18,2),
	"f_powerrate" numeric(18,2),
	"f_property" numeric(18,2),
	"f_cleaning" numeric(18,2),
	"f_pollutant" numeric(18,2),
	"f_totalbilling" numeric(18,2),
	"f_creatortime" timestamp,
	"f_creatoruserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_details IS '应收费用明细表';
COMMENT ON COLUMN test_details."f_id" IS '主键';
COMMENT ON COLUMN test_details."f_receivableid" IS '主表主键';
COMMENT ON COLUMN test_details."f_month" IS '缴费月份';
COMMENT ON COLUMN test_details."f_rent" IS '房租';
COMMENT ON COLUMN test_details."f_water_rent" IS '水费';
COMMENT ON COLUMN test_details."f_powerrate" IS '电费';
COMMENT ON COLUMN test_details."f_property" IS '物业费';
COMMENT ON COLUMN test_details."f_cleaning" IS '垃圾费';
COMMENT ON COLUMN test_details."f_pollutant" IS '排污费';
COMMENT ON COLUMN test_details."f_totalbilling" IS '累计应收费用';
COMMENT ON COLUMN test_details."f_creatortime" IS '创建时间';
COMMENT ON COLUMN test_details."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_details."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：test_position
-- ----------------------------
CREATE TABLE test_position (
	"f_id" varchar(50) NOT NULL,
	"f_applys" varchar(50),
	"f_dep_name" varchar(255),
	"f_station_name" varchar(100),
	"f_arrival_date" timestamp,
	"f_drade" varchar(50),
	"f_worknature" varchar(100),
	"f_stationpay" varchar(100),
	"f_add_number" varchar(50),
	"f_education" varchar(50),
	"f_gender" varchar(50),
	"f_working_seniority" varchar(100),
	"f_marriage" varchar(50),
	"f_age" varchar(50),
	"f_stationpays" varchar(100),
	"f_duty" varchar(50),
	"f_stationask" varchar(50),
	"f_stationkey" varchar(50),
	"f_creator_time" timestamp,
	"f_creator_userid" varchar(50),
	"f_lastmodify_time" timestamp,
	"f_lastmodify_userid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_position IS '招聘表';
COMMENT ON COLUMN test_position."f_id" IS '主键';
COMMENT ON COLUMN test_position."f_applys" IS '申请人';
COMMENT ON COLUMN test_position."f_dep_name" IS '所属部门';
COMMENT ON COLUMN test_position."f_station_name" IS '岗位名称';
COMMENT ON COLUMN test_position."f_arrival_date" IS '期望到岗日期';
COMMENT ON COLUMN test_position."f_drade" IS '优先级';
COMMENT ON COLUMN test_position."f_worknature" IS '工作性质';
COMMENT ON COLUMN test_position."f_stationpay" IS '岗位平均薪资';
COMMENT ON COLUMN test_position."f_add_number" IS '增补原因';
COMMENT ON COLUMN test_position."f_education" IS '最低学历';
COMMENT ON COLUMN test_position."f_gender" IS '性别';
COMMENT ON COLUMN test_position."f_working_seniority" IS '工作经验年限';
COMMENT ON COLUMN test_position."f_marriage" IS '婚姻状况';
COMMENT ON COLUMN test_position."f_age" IS '年龄范围';
COMMENT ON COLUMN test_position."f_stationpays" IS '薪资范围';
COMMENT ON COLUMN test_position."f_duty" IS '职责描述';
COMMENT ON COLUMN test_position."f_stationask" IS '岗位要求';
COMMENT ON COLUMN test_position."f_stationkey" IS '岗位关键字';
COMMENT ON COLUMN test_position."f_creator_time" IS '创建时间';
COMMENT ON COLUMN test_position."f_creator_userid" IS '创建用户';
COMMENT ON COLUMN test_position."f_lastmodify_time" IS '修改时间';
COMMENT ON COLUMN test_position."f_lastmodify_userid" IS '修改用户';
COMMENT ON COLUMN test_position."f_tenant_id" IS '租户id';
COMMENT ON COLUMN test_position."f_flow_id" IS '流程id';
COMMENT ON COLUMN test_position."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN test_position."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：test_projects
-- ----------------------------
CREATE TABLE test_projects (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_projectname" varchar(200),
	"f_projecttype" varchar(10),
	"f_projectcode" varchar(50),
	"f_projectfunding" numeric(18,2),
	"f_depname" varchar(255),
	"f_person" varchar(100),
	"f_degree" varchar(10),
	"f_creatortime" timestamp,
	"f_creatoruserid" varchar(50),
	"f_lastmodifytime" timestamp,
	"f_lastmodifyuserid" varchar(50),
	"billno" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_task_id" varchar(50),
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_projects IS '项目立项申请表';
COMMENT ON COLUMN test_projects."f_id" IS '主键';
COMMENT ON COLUMN test_projects."f_flowid" IS '流程主键';
COMMENT ON COLUMN test_projects."f_projectname" IS '项目名称';
COMMENT ON COLUMN test_projects."f_projecttype" IS '项目类型';
COMMENT ON COLUMN test_projects."f_projectcode" IS '项目编号';
COMMENT ON COLUMN test_projects."f_projectfunding" IS '项目经费';
COMMENT ON COLUMN test_projects."f_depname" IS '负责部门';
COMMENT ON COLUMN test_projects."f_person" IS '负责人';
COMMENT ON COLUMN test_projects."f_degree" IS '项目密级';
COMMENT ON COLUMN test_projects."f_creatortime" IS '创建时间';
COMMENT ON COLUMN test_projects."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_projects."f_lastmodifytime" IS '修改时间';
COMMENT ON COLUMN test_projects."f_lastmodifyuserid" IS '修改用户';
COMMENT ON COLUMN test_projects."billno" IS '单据规则';
COMMENT ON COLUMN test_projects."f_tenant_id" IS '租户id';
COMMENT ON COLUMN test_projects."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN test_projects."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：test_purchase
-- ----------------------------
CREATE TABLE test_purchase (
	"f_id" varchar(50) NOT NULL,
	"f_purchase_number" varchar(50),
	"f_sort_code" varchar(50),
	"f_applys" varchar(50),
	"f_dep_name" varchar(255),
	"f_purchase" timestamp,
	"f_reasons" varchar(100),
	"f_remarks" varchar(500),
	"f_creatortime" timestamp,
	"f_creatoruserid" varchar(50),
	"f_lastmodifytime" timestamp,
	"f_lastmodifyuserid" varchar(50),
	"f_descz" int8,
	"f_sasa" time,
	"f_asad" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_purchase IS '采购申请表';
COMMENT ON COLUMN test_purchase."f_id" IS '主键';
COMMENT ON COLUMN test_purchase."f_purchase_number" IS '采购单号';
COMMENT ON COLUMN test_purchase."f_sort_code" IS '排序';
COMMENT ON COLUMN test_purchase."f_applys" IS '采购申请人';
COMMENT ON COLUMN test_purchase."f_dep_name" IS '所属部门';
COMMENT ON COLUMN test_purchase."f_purchase" IS '采购申请日期';
COMMENT ON COLUMN test_purchase."f_reasons" IS '采购原因';
COMMENT ON COLUMN test_purchase."f_remarks" IS '备注';
COMMENT ON COLUMN test_purchase."f_creatortime" IS '创建时间';
COMMENT ON COLUMN test_purchase."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_purchase."f_lastmodifytime" IS '修改时间';
COMMENT ON COLUMN test_purchase."f_lastmodifyuserid" IS '修改用户';
COMMENT ON COLUMN test_purchase."f_descz" IS '';
COMMENT ON COLUMN test_purchase."f_sasa" IS '';
COMMENT ON COLUMN test_purchase."f_asad" IS '';
COMMENT ON COLUMN test_purchase."f_tenant_id" IS '租户id';
COMMENT ON COLUMN test_purchase."f_flow_id" IS '流程id';
COMMENT ON COLUMN test_purchase."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN test_purchase."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：test_purchase_form
-- ----------------------------
CREATE TABLE test_purchase_form (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_supplier_code" varchar(50),
	"f_sortcode" varchar(50),
	"f_buyer" varchar(50),
	"f_depname" varchar(255),
	"f_purchase_date" timestamp,
	"f_statuss" varchar(100),
	"f_totals" numeric(38,0),
	"f_supplier" varchar(100),
	"f_phone" varchar(50),
	"f_add_ress" varchar(200),
	"f_creator_time" timestamp,
	"f_creatoruserid" varchar(50),
	"f_lastmodifytime" timestamp,
	"f_lastmodifyuserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_task_id" varchar(50),
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_purchase_form IS '采购订单表';
COMMENT ON COLUMN test_purchase_form."f_id" IS '主键';
COMMENT ON COLUMN test_purchase_form."f_flowid" IS '流程主键';
COMMENT ON COLUMN test_purchase_form."f_supplier_code" IS '供应商识别码';
COMMENT ON COLUMN test_purchase_form."f_sortcode" IS '排序';
COMMENT ON COLUMN test_purchase_form."f_buyer" IS '采购员';
COMMENT ON COLUMN test_purchase_form."f_depname" IS '所属部门';
COMMENT ON COLUMN test_purchase_form."f_purchase_date" IS '采购日期';
COMMENT ON COLUMN test_purchase_form."f_statuss" IS '入库状态';
COMMENT ON COLUMN test_purchase_form."f_totals" IS '订单合计金额';
COMMENT ON COLUMN test_purchase_form."f_supplier" IS '供应商对接人';
COMMENT ON COLUMN test_purchase_form."f_phone" IS '联系电话';
COMMENT ON COLUMN test_purchase_form."f_add_ress" IS '收货地址';
COMMENT ON COLUMN test_purchase_form."f_creator_time" IS '创建时间';
COMMENT ON COLUMN test_purchase_form."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_purchase_form."f_lastmodifytime" IS '修改时间';
COMMENT ON COLUMN test_purchase_form."f_lastmodifyuserid" IS '修改用户';
COMMENT ON COLUMN test_purchase_form."f_tenant_id" IS '租户id';
COMMENT ON COLUMN test_purchase_form."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN test_purchase_form."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：test_purchase_form_order
-- ----------------------------
CREATE TABLE test_purchase_form_order (
	"f_id" varchar(50) NOT NULL,
	"f_purchase_id" varchar(50),
	"f_product" varchar(50),
	"f_product_name_2" varchar(50),
	"f_product_code" varchar(50),
	"f_product_category" varchar(50),
	"f_specifications" varchar(50),
	"f_unit" numeric(18,2),
	"f_unitprice" numeric(18,2),
	"f_discount" numeric(18,2),
	"f_actualunit_price_name" numeric(18,2),
	"f_numbers" numeric(18,2),
	"f_creatortime" timestamp,
	"f_creatoruserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_purchase_form_order IS '采购订单明细表';
COMMENT ON COLUMN test_purchase_form_order."f_id" IS '主键';
COMMENT ON COLUMN test_purchase_form_order."f_purchase_id" IS '主表主键';
COMMENT ON COLUMN test_purchase_form_order."f_product" IS '产品';
COMMENT ON COLUMN test_purchase_form_order."f_product_name_2" IS '产品名称';
COMMENT ON COLUMN test_purchase_form_order."f_product_code" IS '产品编码';
COMMENT ON COLUMN test_purchase_form_order."f_product_category" IS '产品分类';
COMMENT ON COLUMN test_purchase_form_order."f_specifications" IS '规格';
COMMENT ON COLUMN test_purchase_form_order."f_unit" IS '单位';
COMMENT ON COLUMN test_purchase_form_order."f_unitprice" IS '单价';
COMMENT ON COLUMN test_purchase_form_order."f_discount" IS '折扣（%）';
COMMENT ON COLUMN test_purchase_form_order."f_actualunit_price_name" IS '实际单价（元）';
COMMENT ON COLUMN test_purchase_form_order."f_numbers" IS '数量';
COMMENT ON COLUMN test_purchase_form_order."f_creatortime" IS '创建时间';
COMMENT ON COLUMN test_purchase_form_order."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_purchase_form_order."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：test_purchaseorder
-- ----------------------------
CREATE TABLE test_purchaseorder (
	"f_id" varchar(50) NOT NULL,
	"f_purchaseid" varchar(50),
	"f_product" varchar(50),
	"f_product_name" varchar(50),
	"f_product_code" varchar(50),
	"f_product_category" varchar(50),
	"f_specifications" varchar(100),
	"f_unit" varchar(50),
	"f_numbers" numeric(18,2),
	"f_creatortime" timestamp,
	"f_creatoruserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_purchaseorder IS '采购单明细表';
COMMENT ON COLUMN test_purchaseorder."f_id" IS '主键';
COMMENT ON COLUMN test_purchaseorder."f_purchaseid" IS '主表主键';
COMMENT ON COLUMN test_purchaseorder."f_product" IS '产品';
COMMENT ON COLUMN test_purchaseorder."f_product_name" IS '产品名称';
COMMENT ON COLUMN test_purchaseorder."f_product_code" IS '产品编码';
COMMENT ON COLUMN test_purchaseorder."f_product_category" IS '产品分类';
COMMENT ON COLUMN test_purchaseorder."f_specifications" IS '规格';
COMMENT ON COLUMN test_purchaseorder."f_unit" IS 'F_Unit';
COMMENT ON COLUMN test_purchaseorder."f_numbers" IS '数量';
COMMENT ON COLUMN test_purchaseorder."f_creatortime" IS '创建时间';
COMMENT ON COLUMN test_purchaseorder."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_purchaseorder."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：test_receivable
-- ----------------------------
CREATE TABLE test_receivable (
	"f_id" varchar(50) NOT NULL,
	"f_building" varchar(100),
	"f_room" varchar(100),
	"f_company_name" varchar(50),
	"f_userid" varchar(50),
	"f_phone" varchar(50),
	"f_ost" varchar(50),
	"f_sort_code" int8,
	"f_enabledmark" int4,
	"f_creatortime" timestamp,
	"f_creatoruserid" varchar(50),
	"f_lastmodifytime" timestamp,
	"f_lastmodifyuserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_version" int4,
	"f_flowtaskid" varchar(50),
	"f_flow_id" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_inte_assistant" int4

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_receivable IS '应收费用主表';
COMMENT ON COLUMN test_receivable."f_id" IS '主键';
COMMENT ON COLUMN test_receivable."f_building" IS '楼宇号';
COMMENT ON COLUMN test_receivable."f_room" IS '房间号';
COMMENT ON COLUMN test_receivable."f_company_name" IS '公司名称';
COMMENT ON COLUMN test_receivable."f_userid" IS '对接人';
COMMENT ON COLUMN test_receivable."f_phone" IS '联系方式';
COMMENT ON COLUMN test_receivable."f_ost" IS '职务';
COMMENT ON COLUMN test_receivable."f_sort_code" IS '排序';
COMMENT ON COLUMN test_receivable."f_enabledmark" IS '有效标志';
COMMENT ON COLUMN test_receivable."f_creatortime" IS '创建时间';
COMMENT ON COLUMN test_receivable."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_receivable."f_lastmodifytime" IS '修改时间';
COMMENT ON COLUMN test_receivable."f_lastmodifyuserid" IS '修改用户';
COMMENT ON COLUMN test_receivable."f_tenant_id" IS '租户id';
COMMENT ON COLUMN test_receivable."f_version" IS '乐观锁';
COMMENT ON COLUMN test_receivable."f_flowtaskid" IS '流程任务主键';
COMMENT ON COLUMN test_receivable."f_flow_id" IS '流程id';
COMMENT ON COLUMN test_receivable."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN test_receivable."f_inte_assistant" IS '集成助手数据标识';
-- ----------------------------
-- 表名：test_reimbursement
-- ----------------------------
CREATE TABLE test_reimbursement (
	"f_id" varchar(50) NOT NULL,
	"f_reimburse_ment" varchar(50),
	"f_reimbursement_date_ap" varchar(50),
	"f_userid" varchar(200),
	"f_dep_name" varchar(255),
	"f_totala_mount" numeric(18,2),
	"f_reasons" varchar(300),
	"f_remarks" varchar(500),
	"f_creatortime" timestamp,
	"f_creatoruserid" varchar(50),
	"f_lastmodify_time" timestamp,
	"f_lastmodify_userid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_reimbursement IS '财务报销信息表';
COMMENT ON COLUMN test_reimbursement."f_id" IS '主键';
COMMENT ON COLUMN test_reimbursement."f_reimburse_ment" IS '报销单号';
COMMENT ON COLUMN test_reimbursement."f_reimbursement_date_ap" IS '项目名称';
COMMENT ON COLUMN test_reimbursement."f_userid" IS '报销人';
COMMENT ON COLUMN test_reimbursement."f_dep_name" IS '所属部门';
COMMENT ON COLUMN test_reimbursement."f_totala_mount" IS '总金额';
COMMENT ON COLUMN test_reimbursement."f_reasons" IS '报销事由';
COMMENT ON COLUMN test_reimbursement."f_remarks" IS '备注';
COMMENT ON COLUMN test_reimbursement."f_creatortime" IS '创建时间';
COMMENT ON COLUMN test_reimbursement."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_reimbursement."f_lastmodify_time" IS '修改时间';
COMMENT ON COLUMN test_reimbursement."f_lastmodify_userid" IS '修改用户';
COMMENT ON COLUMN test_reimbursement."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：test_subpackage
-- ----------------------------
CREATE TABLE test_subpackage (
	"f_id" varchar(50) NOT NULL,
	"f_sort_code" int8,
	"f_applys" varchar(500),
	"f_arrival_date" timestamp,
	"f_project_s" varchar(200),
	"f_dep_name_a" varchar(255),
	"f_contractor" varchar(100),
	"f_signer" varchar(100),
	"f_firstparty" varchar(300),
	"f_contract" varchar(100),
	"f_contract_number" varchar(100),
	"f_contract_date" timestamp,
	"f_start_date_aa" timestamp,
	"f_enddate_qp" timestamp,
	"f_contract_money" numeric(18,2),
	"f_remarks" varchar(1000),
	"f_fujian" text,
	"f_invoiced" numeric(18,2),
	"f_creatoruserid" varchar(50),
	"f_creatortime" timestamp,
	"f_lastmodifytime" timestamp,
	"f_lastmodifyuserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flowid" varchar(50),
	"f_flow_task_id" varchar(50),
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_subpackage IS '分包合同表';
COMMENT ON COLUMN test_subpackage."f_id" IS '主键';
COMMENT ON COLUMN test_subpackage."f_sort_code" IS '序号';
COMMENT ON COLUMN test_subpackage."f_applys" IS '填单人';
COMMENT ON COLUMN test_subpackage."f_arrival_date" IS '填单日期';
COMMENT ON COLUMN test_subpackage."f_project_s" IS '所属项目';
COMMENT ON COLUMN test_subpackage."f_dep_name_a" IS '所属部门';
COMMENT ON COLUMN test_subpackage."f_contractor" IS '承包方';
COMMENT ON COLUMN test_subpackage."f_signer" IS '合同签订人';
COMMENT ON COLUMN test_subpackage."f_firstparty" IS '客户名称';
COMMENT ON COLUMN test_subpackage."f_contract" IS '合同';
COMMENT ON COLUMN test_subpackage."f_contract_number" IS '合同编号';
COMMENT ON COLUMN test_subpackage."f_contract_date" IS '合同签订日期';
COMMENT ON COLUMN test_subpackage."f_start_date_aa" IS '开始日期';
COMMENT ON COLUMN test_subpackage."f_enddate_qp" IS '结束日期';
COMMENT ON COLUMN test_subpackage."f_contract_money" IS '合同金额';
COMMENT ON COLUMN test_subpackage."f_remarks" IS '备注';
COMMENT ON COLUMN test_subpackage."f_fujian" IS '附件';
COMMENT ON COLUMN test_subpackage."f_invoiced" IS '已付款金额';
COMMENT ON COLUMN test_subpackage."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_subpackage."f_creatortime" IS '创建时间';
COMMENT ON COLUMN test_subpackage."f_lastmodifytime" IS '修改时间';
COMMENT ON COLUMN test_subpackage."f_lastmodifyuserid" IS '修改用户';
COMMENT ON COLUMN test_subpackage."f_tenant_id" IS '租户id';
COMMENT ON COLUMN test_subpackage."f_flowid" IS '流程id';
COMMENT ON COLUMN test_subpackage."f_flow_task_id" IS '流程任务主键';
COMMENT ON COLUMN test_subpackage."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：test_vehicleinfo
-- ----------------------------
CREATE TABLE test_vehicleinfo (
	"f_id" varchar(50) NOT NULL,
	"f_sortcode" varchar(50),
	"f_numberplate" varchar(50),
	"f_brand" varchar(50),
	"f_model" varchar(50),
	"f_type" varchar(50),
	"f_colour" varchar(50),
	"f_number" varchar(50),
	"f_purchaseprice" varchar(50),
	"f_purchasedate" timestamp,
	"f_subordinate" varchar(50),
	"f_depname" varchar(255),
	"f_enablemark" varchar(50),
	"f_mileagetraveled" varchar(50),
	"f_credentials" varchar(50),
	"f_remarks" varchar(500),
	"f_creatortime" timestamp,
	"f_creatoruserid" varchar(50),
	"f_lastmodifytime" timestamp,
	"f_lastmodifyuserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_vehicleinfo IS '车辆信息表';
COMMENT ON COLUMN test_vehicleinfo."f_id" IS '主键';
COMMENT ON COLUMN test_vehicleinfo."f_sortcode" IS '序号';
COMMENT ON COLUMN test_vehicleinfo."f_numberplate" IS '车辆号牌';
COMMENT ON COLUMN test_vehicleinfo."f_brand" IS '车辆品牌';
COMMENT ON COLUMN test_vehicleinfo."f_model" IS '车辆型号';
COMMENT ON COLUMN test_vehicleinfo."f_type" IS '车辆类型';
COMMENT ON COLUMN test_vehicleinfo."f_colour" IS '车身颜色';
COMMENT ON COLUMN test_vehicleinfo."f_number" IS '乘坐人数';
COMMENT ON COLUMN test_vehicleinfo."f_purchaseprice" IS '购置价格';
COMMENT ON COLUMN test_vehicleinfo."f_purchasedate" IS '购置日期';
COMMENT ON COLUMN test_vehicleinfo."f_subordinate" IS '所属领导';
COMMENT ON COLUMN test_vehicleinfo."f_depname" IS '所属部门';
COMMENT ON COLUMN test_vehicleinfo."f_enablemark" IS '车辆状态';
COMMENT ON COLUMN test_vehicleinfo."f_mileagetraveled" IS '已行驶里程/KM';
COMMENT ON COLUMN test_vehicleinfo."f_credentials" IS '随车证件';
COMMENT ON COLUMN test_vehicleinfo."f_remarks" IS '其他信息';
COMMENT ON COLUMN test_vehicleinfo."f_creatortime" IS '创建时间';
COMMENT ON COLUMN test_vehicleinfo."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_vehicleinfo."f_lastmodifytime" IS '修改时间';
COMMENT ON COLUMN test_vehicleinfo."f_lastmodifyuserid" IS '修改用户';
COMMENT ON COLUMN test_vehicleinfo."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：test_warehousing
-- ----------------------------
CREATE TABLE test_warehousing (
	"f_id" varchar(50) NOT NULL,
	"f_purchase_number" varchar(50),
	"f_sort_code" varchar(50),
	"f_applys" varchar(50),
	"f_dep_name" varchar(255),
	"f_purchase" timestamp,
	"f_creator_time" timestamp,
	"f_creator_userid" varchar(50),
	"f_lastmodify_time" timestamp,
	"f_lastmodifyuserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_warehousing IS '采购入库表';
COMMENT ON COLUMN test_warehousing."f_id" IS '主键';
COMMENT ON COLUMN test_warehousing."f_purchase_number" IS '入库单号';
COMMENT ON COLUMN test_warehousing."f_sort_code" IS '排序';
COMMENT ON COLUMN test_warehousing."f_applys" IS '入库员';
COMMENT ON COLUMN test_warehousing."f_dep_name" IS '所属部门';
COMMENT ON COLUMN test_warehousing."f_purchase" IS '入库日期';
COMMENT ON COLUMN test_warehousing."f_creator_time" IS '创建时间';
COMMENT ON COLUMN test_warehousing."f_creator_userid" IS '创建用户';
COMMENT ON COLUMN test_warehousing."f_lastmodify_time" IS '修改时间';
COMMENT ON COLUMN test_warehousing."f_lastmodifyuserid" IS '修改用户';
COMMENT ON COLUMN test_warehousing."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：test_warehousingorder
-- ----------------------------
CREATE TABLE test_warehousingorder (
	"f_id" varchar(50) NOT NULL,
	"f_purchaseid" varchar(50),
	"f_product" varchar(50),
	"f_product_name" varchar(50),
	"f_product_code" varchar(50),
	"f_product_category_bb" varchar(50),
	"f_specifications" varchar(100),
	"f_unit" varchar(50),
	"f_actualunitprice" numeric(18,2),
	"f_numbers" numeric(18,2),
	"f_creator_time" timestamp,
	"f_creatoruserid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE test_warehousingorder IS '入库单明细表';
COMMENT ON COLUMN test_warehousingorder."f_id" IS '主键';
COMMENT ON COLUMN test_warehousingorder."f_purchaseid" IS '主表主键';
COMMENT ON COLUMN test_warehousingorder."f_product" IS '产品';
COMMENT ON COLUMN test_warehousingorder."f_product_name" IS '产品名称';
COMMENT ON COLUMN test_warehousingorder."f_product_code" IS '产品编码';
COMMENT ON COLUMN test_warehousingorder."f_product_category_bb" IS '产品分类';
COMMENT ON COLUMN test_warehousingorder."f_specifications" IS '规格';
COMMENT ON COLUMN test_warehousingorder."f_unit" IS '单位';
COMMENT ON COLUMN test_warehousingorder."f_actualunitprice" IS '单价';
COMMENT ON COLUMN test_warehousingorder."f_numbers" IS '采购数量';
COMMENT ON COLUMN test_warehousingorder."f_creator_time" IS '创建时间';
COMMENT ON COLUMN test_warehousingorder."f_creatoruserid" IS '创建用户';
COMMENT ON COLUMN test_warehousingorder."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：undo_log
-- ----------------------------
CREATE TABLE undo_log (
	"id" SERIAL,
	"branch_id" int8 NOT NULL,
	"xid" varchar(100) NOT NULL,
	"context" varchar(128) NOT NULL,
	"rollback_info" bytea NOT NULL,
	"log_status" int4 NOT NULL,
	"log_created" timestamp,
	"log_modified" timestamp,
	"ext" varchar(100),
	"f_tenant_id" varchar(50)

, PRIMARY KEY (id)
);
COMMENT ON TABLE undo_log IS '事务表';
COMMENT ON COLUMN undo_log."id" IS '';
COMMENT ON COLUMN undo_log."branch_id" IS '';
COMMENT ON COLUMN undo_log."xid" IS '';
COMMENT ON COLUMN undo_log."context" IS '';
COMMENT ON COLUMN undo_log."rollback_info" IS '';
COMMENT ON COLUMN undo_log."log_status" IS '';
COMMENT ON COLUMN undo_log."log_created" IS '';
COMMENT ON COLUMN undo_log."log_modified" IS '';
COMMENT ON COLUMN undo_log."ext" IS '';
COMMENT ON COLUMN undo_log."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：wform_applybanquet
-- ----------------------------
CREATE TABLE wform_applybanquet (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_position" varchar(50),
	"f_applydate" timestamp,
	"f_banquetnum" varchar(50),
	"f_banquetpeople" text,
	"f_total" varchar(50),
	"f_place" varchar(50),
	"f_expectedcost" numeric(18,2),
	"f_description" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_applybanquet IS '宴请申请';
COMMENT ON COLUMN wform_applybanquet."f_id" IS '自然主键';
COMMENT ON COLUMN wform_applybanquet."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_applybanquet."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_applybanquet."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_applybanquet."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_applybanquet."f_applyuser" IS '申请人员';
COMMENT ON COLUMN wform_applybanquet."f_position" IS '所属职务';
COMMENT ON COLUMN wform_applybanquet."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_applybanquet."f_banquetnum" IS '宴请人数';
COMMENT ON COLUMN wform_applybanquet."f_banquetpeople" IS '宴请人员';
COMMENT ON COLUMN wform_applybanquet."f_total" IS '人员总数';
COMMENT ON COLUMN wform_applybanquet."f_place" IS '宴请地点';
COMMENT ON COLUMN wform_applybanquet."f_expectedcost" IS '预计费用';
COMMENT ON COLUMN wform_applybanquet."f_description" IS '备注';
COMMENT ON COLUMN wform_applybanquet."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_applybanquet."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_applydelivergoods
-- ----------------------------
CREATE TABLE wform_applydelivergoods (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_customername" varchar(50),
	"f_contacts" varchar(50),
	"f_contactphone" varchar(50),
	"f_customeraddres" varchar(50),
	"f_goodsbelonged" varchar(50),
	"f_invoicedate" timestamp,
	"f_freightcompany" varchar(50),
	"f_deliverytype" varchar(50),
	"f_rransportnum" varchar(50),
	"f_freightcharges" numeric(18,2),
	"f_cargoinsurance" numeric(18,2),
	"f_description" text,
	"f_invoicevalue" numeric(18,2),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_applydelivergoods IS '发货申请单';
COMMENT ON COLUMN wform_applydelivergoods."f_id" IS '自然主键';
COMMENT ON COLUMN wform_applydelivergoods."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_applydelivergoods."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_applydelivergoods."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_applydelivergoods."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_applydelivergoods."f_customername" IS '客户名称';
COMMENT ON COLUMN wform_applydelivergoods."f_contacts" IS '联系人';
COMMENT ON COLUMN wform_applydelivergoods."f_contactphone" IS '联系电话';
COMMENT ON COLUMN wform_applydelivergoods."f_customeraddres" IS '客户地址';
COMMENT ON COLUMN wform_applydelivergoods."f_goodsbelonged" IS '货品所属';
COMMENT ON COLUMN wform_applydelivergoods."f_invoicedate" IS '发货日期';
COMMENT ON COLUMN wform_applydelivergoods."f_freightcompany" IS '货运公司';
COMMENT ON COLUMN wform_applydelivergoods."f_deliverytype" IS '发货类型';
COMMENT ON COLUMN wform_applydelivergoods."f_rransportnum" IS '货运单号';
COMMENT ON COLUMN wform_applydelivergoods."f_freightcharges" IS '货运费';
COMMENT ON COLUMN wform_applydelivergoods."f_cargoinsurance" IS '保险金额';
COMMENT ON COLUMN wform_applydelivergoods."f_description" IS '备注';
COMMENT ON COLUMN wform_applydelivergoods."f_invoicevalue" IS '发货金额';
COMMENT ON COLUMN wform_applydelivergoods."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_applydelivergoods."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_applydelivergoodsentry
-- ----------------------------
CREATE TABLE wform_applydelivergoodsentry (
	"f_id" varchar(50) NOT NULL,
	"f_invoiceid" varchar(50),
	"f_goodsname" varchar(50),
	"f_specifications" varchar(50),
	"f_unit" text,
	"f_qty" varchar(50),
	"f_price" numeric(18,2),
	"f_amount" numeric(18,2),
	"f_description" text,
	"f_sortcode" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_applydelivergoodsentry IS '发货明细';
COMMENT ON COLUMN wform_applydelivergoodsentry."f_id" IS '自然主键';
COMMENT ON COLUMN wform_applydelivergoodsentry."f_invoiceid" IS '发货主键';
COMMENT ON COLUMN wform_applydelivergoodsentry."f_goodsname" IS '商品名称';
COMMENT ON COLUMN wform_applydelivergoodsentry."f_specifications" IS '规格型号';
COMMENT ON COLUMN wform_applydelivergoodsentry."f_unit" IS '单位';
COMMENT ON COLUMN wform_applydelivergoodsentry."f_qty" IS '数量';
COMMENT ON COLUMN wform_applydelivergoodsentry."f_price" IS '单价';
COMMENT ON COLUMN wform_applydelivergoodsentry."f_amount" IS '金额';
COMMENT ON COLUMN wform_applydelivergoodsentry."f_description" IS '描述';
COMMENT ON COLUMN wform_applydelivergoodsentry."f_sortcode" IS '排序码';
COMMENT ON COLUMN wform_applydelivergoodsentry."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：wform_applymeeting
-- ----------------------------
CREATE TABLE wform_applymeeting (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_position" varchar(50),
	"f_conferencename" varchar(50),
	"f_conferencetheme" varchar(50),
	"f_conferencetype" varchar(50),
	"f_estimatepeople" varchar(50),
	"f_conferenceroom" varchar(50),
	"f_administrator" varchar(50),
	"f_lookpeople" varchar(50),
	"f_memo" varchar(50),
	"f_attendees" varchar(50),
	"f_applymaterial" varchar(50),
	"f_estimatedamount" numeric(18,2),
	"f_otherattendee" varchar(50),
	"f_startdate" timestamp,
	"f_enddate" timestamp,
	"f_filejson" text,
	"f_describe" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_applymeeting IS '会议申请';
COMMENT ON COLUMN wform_applymeeting."f_id" IS '自然主键';
COMMENT ON COLUMN wform_applymeeting."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_applymeeting."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_applymeeting."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_applymeeting."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_applymeeting."f_applyuser" IS '申请人';
COMMENT ON COLUMN wform_applymeeting."f_position" IS '所属职务';
COMMENT ON COLUMN wform_applymeeting."f_conferencename" IS '会议名称';
COMMENT ON COLUMN wform_applymeeting."f_conferencetheme" IS '会议主题';
COMMENT ON COLUMN wform_applymeeting."f_conferencetype" IS '会议类型';
COMMENT ON COLUMN wform_applymeeting."f_estimatepeople" IS '预计人数';
COMMENT ON COLUMN wform_applymeeting."f_conferenceroom" IS '会议室';
COMMENT ON COLUMN wform_applymeeting."f_administrator" IS '管理人';
COMMENT ON COLUMN wform_applymeeting."f_lookpeople" IS '查看人';
COMMENT ON COLUMN wform_applymeeting."f_memo" IS '纪要员';
COMMENT ON COLUMN wform_applymeeting."f_attendees" IS '出席人';
COMMENT ON COLUMN wform_applymeeting."f_applymaterial" IS '申请材料';
COMMENT ON COLUMN wform_applymeeting."f_estimatedamount" IS '预计金额';
COMMENT ON COLUMN wform_applymeeting."f_otherattendee" IS '其他出席人';
COMMENT ON COLUMN wform_applymeeting."f_startdate" IS '开始时间';
COMMENT ON COLUMN wform_applymeeting."f_enddate" IS '结束时间';
COMMENT ON COLUMN wform_applymeeting."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_applymeeting."f_describe" IS '会议描述';
COMMENT ON COLUMN wform_applymeeting."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_applymeeting."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_archivalborrow
-- ----------------------------
CREATE TABLE wform_archivalborrow (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_borrowingdepartment" varchar(255),
	"f_archivesname" varchar(50),
	"f_archivalattributes" varchar(50),
	"f_borrowmode" varchar(50),
	"f_applyreason" text,
	"f_archivesid" varchar(50),
	"f_borrowingdate" timestamp,
	"f_returndate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_archivalborrow IS '档案借阅申请';
COMMENT ON COLUMN wform_archivalborrow."f_id" IS '自然主键';
COMMENT ON COLUMN wform_archivalborrow."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_archivalborrow."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_archivalborrow."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_archivalborrow."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_archivalborrow."f_applyuser" IS '申请人';
COMMENT ON COLUMN wform_archivalborrow."f_borrowingdepartment" IS '借阅部门';
COMMENT ON COLUMN wform_archivalborrow."f_archivesname" IS '档案名称';
COMMENT ON COLUMN wform_archivalborrow."f_archivalattributes" IS '档案属性';
COMMENT ON COLUMN wform_archivalborrow."f_borrowmode" IS '借阅方式';
COMMENT ON COLUMN wform_archivalborrow."f_applyreason" IS '申请原因';
COMMENT ON COLUMN wform_archivalborrow."f_archivesid" IS '档案编号';
COMMENT ON COLUMN wform_archivalborrow."f_borrowingdate" IS '借阅时间';
COMMENT ON COLUMN wform_archivalborrow."f_returndate" IS '归还时间';
COMMENT ON COLUMN wform_archivalborrow."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_archivalborrow."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_articleswarehous
-- ----------------------------
CREATE TABLE wform_articleswarehous (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_department" varchar(255),
	"f_articles" varchar(50),
	"f_classification" varchar(50),
	"f_articlesid" varchar(50),
	"f_company" varchar(50),
	"f_estimatepeople" varchar(50),
	"f_applyreasons" text,
	"f_applydate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_articleswarehous IS '用品入库申请表';
COMMENT ON COLUMN wform_articleswarehous."f_id" IS '自然主键';
COMMENT ON COLUMN wform_articleswarehous."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_articleswarehous."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_articleswarehous."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_articleswarehous."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_articleswarehous."f_applyuser" IS '申请人';
COMMENT ON COLUMN wform_articleswarehous."f_department" IS '所属部门';
COMMENT ON COLUMN wform_articleswarehous."f_articles" IS '用品库存';
COMMENT ON COLUMN wform_articleswarehous."f_classification" IS '用品分类';
COMMENT ON COLUMN wform_articleswarehous."f_articlesid" IS '用品编号';
COMMENT ON COLUMN wform_articleswarehous."f_company" IS '单位';
COMMENT ON COLUMN wform_articleswarehous."f_estimatepeople" IS '数量';
COMMENT ON COLUMN wform_articleswarehous."f_applyreasons" IS '申请原因';
COMMENT ON COLUMN wform_articleswarehous."f_applydate" IS '申请时间';
COMMENT ON COLUMN wform_articleswarehous."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_articleswarehous."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_batchpack
-- ----------------------------
CREATE TABLE wform_batchpack (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_productname" varchar(50),
	"f_production" varchar(50),
	"f_compactor" varchar(50),
	"f_compactordate" timestamp,
	"f_standard" varchar(50),
	"f_warehousno" varchar(50),
	"f_productionquty" varchar(50),
	"f_operationdate" timestamp,
	"f_regulations" varchar(50),
	"f_packing" varchar(50),
	"f_description" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_batchpack IS '批包装指令';
COMMENT ON COLUMN wform_batchpack."f_id" IS '自然主键';
COMMENT ON COLUMN wform_batchpack."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_batchpack."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_batchpack."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_batchpack."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_batchpack."f_productname" IS '产品名称';
COMMENT ON COLUMN wform_batchpack."f_production" IS '生产车间';
COMMENT ON COLUMN wform_batchpack."f_compactor" IS '编制人员';
COMMENT ON COLUMN wform_batchpack."f_compactordate" IS '编制日期';
COMMENT ON COLUMN wform_batchpack."f_standard" IS '产品规格';
COMMENT ON COLUMN wform_batchpack."f_warehousno" IS '入库序号';
COMMENT ON COLUMN wform_batchpack."f_productionquty" IS '批产数量';
COMMENT ON COLUMN wform_batchpack."f_operationdate" IS '操作日期';
COMMENT ON COLUMN wform_batchpack."f_regulations" IS '工艺规程';
COMMENT ON COLUMN wform_batchpack."f_packing" IS '包装规格';
COMMENT ON COLUMN wform_batchpack."f_description" IS '备注';
COMMENT ON COLUMN wform_batchpack."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_batchpack."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_batchtable
-- ----------------------------
CREATE TABLE wform_batchtable (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_filetitle" varchar(50),
	"f_draftedperson" varchar(50),
	"f_fillnum" varchar(50),
	"f_sendunit" varchar(50),
	"f_typing" varchar(50),
	"f_writingdate" timestamp,
	"f_sharenum" varchar(50),
	"f_filejson" text,
	"f_description" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_batchtable IS '行文呈批表';
COMMENT ON COLUMN wform_batchtable."f_id" IS '自然主键';
COMMENT ON COLUMN wform_batchtable."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_batchtable."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_batchtable."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_batchtable."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_batchtable."f_filetitle" IS '文件标题';
COMMENT ON COLUMN wform_batchtable."f_draftedperson" IS '主办单位';
COMMENT ON COLUMN wform_batchtable."f_fillnum" IS '文件编号';
COMMENT ON COLUMN wform_batchtable."f_sendunit" IS '发往单位';
COMMENT ON COLUMN wform_batchtable."f_typing" IS '打字';
COMMENT ON COLUMN wform_batchtable."f_writingdate" IS '发文日期';
COMMENT ON COLUMN wform_batchtable."f_sharenum" IS '份数';
COMMENT ON COLUMN wform_batchtable."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_batchtable."f_description" IS '备注';
COMMENT ON COLUMN wform_batchtable."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_batchtable."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_conbilling
-- ----------------------------
CREATE TABLE wform_conbilling (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_drawer" varchar(50),
	"f_billdate" timestamp,
	"f_companyname" varchar(50),
	"f_conname" varchar(50),
	"f_bank" varchar(50),
	"f_amount" varchar(50),
	"f_billamount" numeric(18,2),
	"f_taxid" varchar(50),
	"f_invoiceid" varchar(50),
	"f_invoaddress" varchar(50),
	"f_payamount" numeric(18,2),
	"f_filejson" text,
	"f_description" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_conbilling IS '合同开票流程';
COMMENT ON COLUMN wform_conbilling."f_id" IS '自然主键';
COMMENT ON COLUMN wform_conbilling."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_conbilling."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_conbilling."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_conbilling."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_conbilling."f_drawer" IS '开票人';
COMMENT ON COLUMN wform_conbilling."f_billdate" IS '开票日期';
COMMENT ON COLUMN wform_conbilling."f_companyname" IS '公司名称';
COMMENT ON COLUMN wform_conbilling."f_conname" IS '关联名称';
COMMENT ON COLUMN wform_conbilling."f_bank" IS '开户银行';
COMMENT ON COLUMN wform_conbilling."f_amount" IS '开户账号';
COMMENT ON COLUMN wform_conbilling."f_billamount" IS '开票金额';
COMMENT ON COLUMN wform_conbilling."f_taxid" IS '税号';
COMMENT ON COLUMN wform_conbilling."f_invoiceid" IS '发票号';
COMMENT ON COLUMN wform_conbilling."f_invoaddress" IS '发票地址';
COMMENT ON COLUMN wform_conbilling."f_payamount" IS '付款金额';
COMMENT ON COLUMN wform_conbilling."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_conbilling."f_description" IS '备注';
COMMENT ON COLUMN wform_conbilling."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_conbilling."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_contractapproval
-- ----------------------------
CREATE TABLE wform_contractapproval (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_firstpartyunit" varchar(50),
	"f_secondpartyunit" varchar(50),
	"f_firstpartyperson" varchar(50),
	"f_secondpartyperson" varchar(50),
	"f_firstpartycontact" varchar(50),
	"f_secondpartycontact" varchar(50),
	"f_contractname" varchar(50),
	"f_contractclass" varchar(50),
	"f_contracttype" varchar(50),
	"f_contractid" varchar(50),
	"f_businessperson" varchar(50),
	"f_incomeamount" numeric(18,2),
	"f_inputperson" varchar(50),
	"f_filejson" text,
	"f_primarycoverage" text,
	"f_description" text,
	"f_signingdate" timestamp,
	"f_startdate" timestamp,
	"f_enddate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_contractapproval IS '合同审批';
COMMENT ON COLUMN wform_contractapproval."f_id" IS '自然主键';
COMMENT ON COLUMN wform_contractapproval."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_contractapproval."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_contractapproval."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_contractapproval."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_contractapproval."f_firstpartyunit" IS '甲方单位';
COMMENT ON COLUMN wform_contractapproval."f_secondpartyunit" IS '乙方单位';
COMMENT ON COLUMN wform_contractapproval."f_firstpartyperson" IS '甲方负责人';
COMMENT ON COLUMN wform_contractapproval."f_secondpartyperson" IS '乙方负责人';
COMMENT ON COLUMN wform_contractapproval."f_firstpartycontact" IS '甲方联系方式';
COMMENT ON COLUMN wform_contractapproval."f_secondpartycontact" IS '乙方联系方式';
COMMENT ON COLUMN wform_contractapproval."f_contractname" IS '合同名称';
COMMENT ON COLUMN wform_contractapproval."f_contractclass" IS '合同分类';
COMMENT ON COLUMN wform_contractapproval."f_contracttype" IS '合同类型';
COMMENT ON COLUMN wform_contractapproval."f_contractid" IS '合同编号';
COMMENT ON COLUMN wform_contractapproval."f_businessperson" IS '业务人员';
COMMENT ON COLUMN wform_contractapproval."f_incomeamount" IS '收入金额';
COMMENT ON COLUMN wform_contractapproval."f_inputperson" IS '填写人员';
COMMENT ON COLUMN wform_contractapproval."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_contractapproval."f_primarycoverage" IS '主要内容';
COMMENT ON COLUMN wform_contractapproval."f_description" IS '备注';
COMMENT ON COLUMN wform_contractapproval."f_signingdate" IS '签约时间';
COMMENT ON COLUMN wform_contractapproval."f_startdate" IS '开始时间';
COMMENT ON COLUMN wform_contractapproval."f_enddate" IS '结束时间';
COMMENT ON COLUMN wform_contractapproval."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_contractapproval."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_contractapprovalsheet
-- ----------------------------
CREATE TABLE wform_contractapprovalsheet (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_applydate" timestamp,
	"f_contractid" varchar(50),
	"f_contractnum" varchar(50),
	"f_firstparty" varchar(50),
	"f_secondparty" varchar(50),
	"f_contractname" varchar(50),
	"f_contracttype" varchar(50),
	"f_personcharge" varchar(50),
	"f_leaddepartment" varchar(255),
	"f_signarea" varchar(50),
	"f_incomeamount" numeric(18,2),
	"f_totalexpenditure" numeric(18,2),
	"f_contractperiod" varchar(50),
	"f_paymentmethod" varchar(50),
	"f_budgetaryapproval" varchar(50),
	"f_startcontractdate" timestamp,
	"f_endcontractdate" timestamp,
	"f_filejson" text,
	"f_contractcontent" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_contractapprovalsheet IS '合同申请单表';
COMMENT ON COLUMN wform_contractapprovalsheet."f_id" IS '自然主键';
COMMENT ON COLUMN wform_contractapprovalsheet."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_contractapprovalsheet."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_contractapprovalsheet."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_contractapprovalsheet."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_contractapprovalsheet."f_applyuser" IS '申请人';
COMMENT ON COLUMN wform_contractapprovalsheet."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_contractapprovalsheet."f_contractid" IS '编号支出';
COMMENT ON COLUMN wform_contractapprovalsheet."f_contractnum" IS '合同号';
COMMENT ON COLUMN wform_contractapprovalsheet."f_firstparty" IS '签署方(甲方)';
COMMENT ON COLUMN wform_contractapprovalsheet."f_secondparty" IS '乙方';
COMMENT ON COLUMN wform_contractapprovalsheet."f_contractname" IS '合同名称';
COMMENT ON COLUMN wform_contractapprovalsheet."f_contracttype" IS '合同类型';
COMMENT ON COLUMN wform_contractapprovalsheet."f_personcharge" IS '合作负责人';
COMMENT ON COLUMN wform_contractapprovalsheet."f_leaddepartment" IS '所属部门';
COMMENT ON COLUMN wform_contractapprovalsheet."f_signarea" IS '签订地区';
COMMENT ON COLUMN wform_contractapprovalsheet."f_incomeamount" IS '收入金额';
COMMENT ON COLUMN wform_contractapprovalsheet."f_totalexpenditure" IS '支出总额';
COMMENT ON COLUMN wform_contractapprovalsheet."f_contractperiod" IS '合同期限';
COMMENT ON COLUMN wform_contractapprovalsheet."f_paymentmethod" IS '付款方式';
COMMENT ON COLUMN wform_contractapprovalsheet."f_budgetaryapproval" IS '预算批付';
COMMENT ON COLUMN wform_contractapprovalsheet."f_startcontractdate" IS '开始时间';
COMMENT ON COLUMN wform_contractapprovalsheet."f_endcontractdate" IS '';
COMMENT ON COLUMN wform_contractapprovalsheet."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_contractapprovalsheet."f_contractcontent" IS '内容简要';
COMMENT ON COLUMN wform_contractapprovalsheet."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_contractapprovalsheet."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_debitbill
-- ----------------------------
CREATE TABLE wform_debitbill (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_departmental" varchar(255),
	"f_applydate" timestamp,
	"f_staffname" varchar(50),
	"f_staffpost" varchar(50),
	"f_staffid" varchar(50),
	"f_loanmode" varchar(50),
	"f_amountdebit" numeric(18,2),
	"f_transferaccount" varchar(50),
	"f_repaymentbill" varchar(50),
	"f_teachingdate" timestamp,
	"f_paymentmethod" varchar(50),
	"f_reason" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_debitbill IS '借支单';
COMMENT ON COLUMN wform_debitbill."f_id" IS '自然主键';
COMMENT ON COLUMN wform_debitbill."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_debitbill."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_debitbill."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_debitbill."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_debitbill."f_departmental" IS '工作部门';
COMMENT ON COLUMN wform_debitbill."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_debitbill."f_staffname" IS '员工姓名';
COMMENT ON COLUMN wform_debitbill."f_staffpost" IS '员工职务';
COMMENT ON COLUMN wform_debitbill."f_staffid" IS '员工编号';
COMMENT ON COLUMN wform_debitbill."f_loanmode" IS '借款方式';
COMMENT ON COLUMN wform_debitbill."f_amountdebit" IS '借支金额';
COMMENT ON COLUMN wform_debitbill."f_transferaccount" IS '转账账户';
COMMENT ON COLUMN wform_debitbill."f_repaymentbill" IS '还款票据';
COMMENT ON COLUMN wform_debitbill."f_teachingdate" IS '还款日期';
COMMENT ON COLUMN wform_debitbill."f_paymentmethod" IS '支付方式';
COMMENT ON COLUMN wform_debitbill."f_reason" IS '借款原因';
COMMENT ON COLUMN wform_debitbill."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_debitbill."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_documentapproval
-- ----------------------------
CREATE TABLE wform_documentapproval (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_filename" varchar(50),
	"f_draftedperson" varchar(50),
	"f_serviceunit" varchar(50),
	"f_fillpreparation" varchar(50),
	"f_fillnum" varchar(50),
	"f_receiptdate" timestamp,
	"f_filejson" text,
	"f_modifyopinion" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_documentapproval IS '文件签批意见表';
COMMENT ON COLUMN wform_documentapproval."f_id" IS '自然主键';
COMMENT ON COLUMN wform_documentapproval."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_documentapproval."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_documentapproval."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_documentapproval."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_documentapproval."f_filename" IS '文件名称';
COMMENT ON COLUMN wform_documentapproval."f_draftedperson" IS '拟稿人';
COMMENT ON COLUMN wform_documentapproval."f_serviceunit" IS '发文单位';
COMMENT ON COLUMN wform_documentapproval."f_fillpreparation" IS '文件拟办';
COMMENT ON COLUMN wform_documentapproval."f_fillnum" IS '文件编号';
COMMENT ON COLUMN wform_documentapproval."f_receiptdate" IS '收文日期';
COMMENT ON COLUMN wform_documentapproval."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_documentapproval."f_modifyopinion" IS '修改意见';
COMMENT ON COLUMN wform_documentapproval."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_documentapproval."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_documentsigning
-- ----------------------------
CREATE TABLE wform_documentsigning (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_filename" varchar(50),
	"f_fillnum" varchar(50),
	"f_draftedperson" varchar(50),
	"f_reader" varchar(50),
	"f_fillpreparation" varchar(50),
	"f_checkdate" timestamp,
	"f_publicationdate" timestamp,
	"f_filejson" text,
	"f_documentcontent" text,
	"f_advicecolumn" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_documentsigning IS '文件签阅表';
COMMENT ON COLUMN wform_documentsigning."f_id" IS '自然主键';
COMMENT ON COLUMN wform_documentsigning."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_documentsigning."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_documentsigning."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_documentsigning."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_documentsigning."f_filename" IS '文件名称';
COMMENT ON COLUMN wform_documentsigning."f_fillnum" IS '文件编号';
COMMENT ON COLUMN wform_documentsigning."f_draftedperson" IS '拟稿人';
COMMENT ON COLUMN wform_documentsigning."f_reader" IS '签阅人';
COMMENT ON COLUMN wform_documentsigning."f_fillpreparation" IS '文件拟办';
COMMENT ON COLUMN wform_documentsigning."f_checkdate" IS '签阅时间';
COMMENT ON COLUMN wform_documentsigning."f_publicationdate" IS '发稿日期';
COMMENT ON COLUMN wform_documentsigning."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_documentsigning."f_documentcontent" IS '文件内容';
COMMENT ON COLUMN wform_documentsigning."f_advicecolumn" IS '建议栏';
COMMENT ON COLUMN wform_documentsigning."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_documentsigning."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_expenseexpenditure
-- ----------------------------
CREATE TABLE wform_expenseexpenditure (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_department" varchar(255),
	"f_applydate" timestamp,
	"f_contractnum" varchar(50),
	"f_noncontract" varchar(50),
	"f_accountopeningbank" varchar(50),
	"f_bankaccount" varchar(50),
	"f_openaccount" varchar(50),
	"f_total" numeric(18,2),
	"f_paymentmethod" varchar(50),
	"f_amountpayment" numeric(18,2),
	"f_description" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_expenseexpenditure IS '费用支出单';
COMMENT ON COLUMN wform_expenseexpenditure."f_id" IS '自然主键';
COMMENT ON COLUMN wform_expenseexpenditure."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_expenseexpenditure."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_expenseexpenditure."f_flowurgent" IS '流程等级';
COMMENT ON COLUMN wform_expenseexpenditure."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_expenseexpenditure."f_applyuser" IS '申请人员';
COMMENT ON COLUMN wform_expenseexpenditure."f_department" IS '所在部门';
COMMENT ON COLUMN wform_expenseexpenditure."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_expenseexpenditure."f_contractnum" IS '合同编号';
COMMENT ON COLUMN wform_expenseexpenditure."f_noncontract" IS '非合同支出';
COMMENT ON COLUMN wform_expenseexpenditure."f_accountopeningbank" IS '开户银行';
COMMENT ON COLUMN wform_expenseexpenditure."f_bankaccount" IS '银行账号';
COMMENT ON COLUMN wform_expenseexpenditure."f_openaccount" IS '开户姓名';
COMMENT ON COLUMN wform_expenseexpenditure."f_total" IS '合计费用';
COMMENT ON COLUMN wform_expenseexpenditure."f_paymentmethod" IS '支付方式';
COMMENT ON COLUMN wform_expenseexpenditure."f_amountpayment" IS '支付金额';
COMMENT ON COLUMN wform_expenseexpenditure."f_description" IS '备注';
COMMENT ON COLUMN wform_expenseexpenditure."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_expenseexpenditure."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_finishedproduct
-- ----------------------------
CREATE TABLE wform_finishedproduct (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_warehousename" varchar(50),
	"f_warehouse" varchar(50),
	"f_description" text,
	"f_reservoirdate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_finishedproduct IS '成品入库单';
COMMENT ON COLUMN wform_finishedproduct."f_id" IS '自然主键';
COMMENT ON COLUMN wform_finishedproduct."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_finishedproduct."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_finishedproduct."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_finishedproduct."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_finishedproduct."f_warehousename" IS '入库人';
COMMENT ON COLUMN wform_finishedproduct."f_warehouse" IS '仓库';
COMMENT ON COLUMN wform_finishedproduct."f_description" IS '备注';
COMMENT ON COLUMN wform_finishedproduct."f_reservoirdate" IS '入库时间';
COMMENT ON COLUMN wform_finishedproduct."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_finishedproduct."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_finishedproductentry
-- ----------------------------
CREATE TABLE wform_finishedproductentry (
	"f_id" varchar(50) NOT NULL,
	"f_warehouseid" varchar(50),
	"f_goodsname" varchar(50),
	"f_specifications" varchar(50),
	"f_unit" varchar(50),
	"f_qty" varchar(50),
	"f_price" numeric(18,2),
	"f_amount" numeric(18,2),
	"f_description" text,
	"f_sortcode" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_finishedproductentry IS '成品入库单明细';
COMMENT ON COLUMN wform_finishedproductentry."f_id" IS '自然主键';
COMMENT ON COLUMN wform_finishedproductentry."f_warehouseid" IS '入库单号';
COMMENT ON COLUMN wform_finishedproductentry."f_goodsname" IS '商品名称';
COMMENT ON COLUMN wform_finishedproductentry."f_specifications" IS '规格型号';
COMMENT ON COLUMN wform_finishedproductentry."f_unit" IS '单位';
COMMENT ON COLUMN wform_finishedproductentry."f_qty" IS '数量';
COMMENT ON COLUMN wform_finishedproductentry."f_price" IS '单价';
COMMENT ON COLUMN wform_finishedproductentry."f_amount" IS '金额';
COMMENT ON COLUMN wform_finishedproductentry."f_description" IS '备注';
COMMENT ON COLUMN wform_finishedproductentry."f_sortcode" IS '排序号';
COMMENT ON COLUMN wform_finishedproductentry."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：wform_incomerecognition
-- ----------------------------
CREATE TABLE wform_incomerecognition (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_settlementmonth" varchar(50),
	"f_customername" varchar(50),
	"f_contractnum" varchar(50),
	"f_totalamount" numeric(18,2),
	"f_moneybank" varchar(50),
	"f_actualamount" numeric(18,2),
	"f_contactname" varchar(50),
	"f_contacphone" varchar(50),
	"f_contactqq" varchar(50),
	"f_unpaidamount" numeric(18,2),
	"f_amountpaid" numeric(18,2),
	"f_description" text,
	"f_paymentdate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_incomerecognition IS '收入确认分析表';
COMMENT ON COLUMN wform_incomerecognition."f_id" IS '自然主键';
COMMENT ON COLUMN wform_incomerecognition."f_flowid" IS '流程主题';
COMMENT ON COLUMN wform_incomerecognition."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_incomerecognition."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_incomerecognition."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_incomerecognition."f_settlementmonth" IS '结算月份';
COMMENT ON COLUMN wform_incomerecognition."f_customername" IS '客户名称';
COMMENT ON COLUMN wform_incomerecognition."f_contractnum" IS '合同编号';
COMMENT ON COLUMN wform_incomerecognition."f_totalamount" IS '合同金额';
COMMENT ON COLUMN wform_incomerecognition."f_moneybank" IS '到款银行';
COMMENT ON COLUMN wform_incomerecognition."f_actualamount" IS '到款金额';
COMMENT ON COLUMN wform_incomerecognition."f_contactname" IS '联系人姓名';
COMMENT ON COLUMN wform_incomerecognition."f_contacphone" IS '联系电话';
COMMENT ON COLUMN wform_incomerecognition."f_contactqq" IS '联系QQ';
COMMENT ON COLUMN wform_incomerecognition."f_unpaidamount" IS '未付金额';
COMMENT ON COLUMN wform_incomerecognition."f_amountpaid" IS '已付金额';
COMMENT ON COLUMN wform_incomerecognition."f_description" IS '备注';
COMMENT ON COLUMN wform_incomerecognition."f_paymentdate" IS '到款日期';
COMMENT ON COLUMN wform_incomerecognition."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_incomerecognition."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_leaveapply
-- ----------------------------
CREATE TABLE wform_leaveapply (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(200),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_applydept" varchar(255),
	"f_applypost" varchar(50),
	"f_leavetype" varchar(50),
	"f_leavereason" text,
	"f_leavedaycount" varchar(50),
	"f_leavehour" varchar(50),
	"f_filejson" text,
	"f_description" text,
	"f_applydate" timestamp,
	"f_leavestarttime" timestamp,
	"f_leaveendtime" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_leaveapply IS '流程表单【请假申请】';
COMMENT ON COLUMN wform_leaveapply."f_id" IS '自然主键';
COMMENT ON COLUMN wform_leaveapply."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_leaveapply."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_leaveapply."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_leaveapply."f_billno" IS '单据编号';
COMMENT ON COLUMN wform_leaveapply."f_applyuser" IS '申请人员';
COMMENT ON COLUMN wform_leaveapply."f_applydept" IS '申请部门';
COMMENT ON COLUMN wform_leaveapply."f_applypost" IS '申请职位';
COMMENT ON COLUMN wform_leaveapply."f_leavetype" IS '请假类别';
COMMENT ON COLUMN wform_leaveapply."f_leavereason" IS '请假原因';
COMMENT ON COLUMN wform_leaveapply."f_leavedaycount" IS '请假天数';
COMMENT ON COLUMN wform_leaveapply."f_leavehour" IS '请假小时';
COMMENT ON COLUMN wform_leaveapply."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_leaveapply."f_description" IS '备注';
COMMENT ON COLUMN wform_leaveapply."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_leaveapply."f_leavestarttime" IS '请假时间';
COMMENT ON COLUMN wform_leaveapply."f_leaveendtime" IS '结束时间';
COMMENT ON COLUMN wform_leaveapply."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：wform_letterservice
-- ----------------------------
CREATE TABLE wform_letterservice (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_hostunit" varchar(50),
	"f_title" varchar(50),
	"f_issuednum" varchar(50),
	"f_writingdate" timestamp,
	"f_sharenum" varchar(50),
	"f_maindelivery" varchar(50),
	"f_copy" varchar(50),
	"f_filejson" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_letterservice IS '发文单';
COMMENT ON COLUMN wform_letterservice."f_id" IS '自然主键';
COMMENT ON COLUMN wform_letterservice."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_letterservice."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_letterservice."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_letterservice."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_letterservice."f_hostunit" IS '主办单位';
COMMENT ON COLUMN wform_letterservice."f_title" IS '发文标题';
COMMENT ON COLUMN wform_letterservice."f_issuednum" IS '发文字号';
COMMENT ON COLUMN wform_letterservice."f_writingdate" IS '发文日期';
COMMENT ON COLUMN wform_letterservice."f_sharenum" IS '份数';
COMMENT ON COLUMN wform_letterservice."f_maindelivery" IS '主送';
COMMENT ON COLUMN wform_letterservice."f_copy" IS '抄送';
COMMENT ON COLUMN wform_letterservice."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_letterservice."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_letterservice."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_materialrequisition
-- ----------------------------
CREATE TABLE wform_materialrequisition (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_leadpeople" varchar(50),
	"f_leaddepartment" varchar(255),
	"f_leaddate" timestamp,
	"f_warehouse" varchar(50),
	"f_description" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_materialrequisition IS '领料单';
COMMENT ON COLUMN wform_materialrequisition."f_id" IS '自然主键';
COMMENT ON COLUMN wform_materialrequisition."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_materialrequisition."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_materialrequisition."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_materialrequisition."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_materialrequisition."f_leadpeople" IS '领料人';
COMMENT ON COLUMN wform_materialrequisition."f_leaddepartment" IS '领料部门';
COMMENT ON COLUMN wform_materialrequisition."f_leaddate" IS '领料日期';
COMMENT ON COLUMN wform_materialrequisition."f_warehouse" IS '仓库';
COMMENT ON COLUMN wform_materialrequisition."f_description" IS '备注';
COMMENT ON COLUMN wform_materialrequisition."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_materialrequisition."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_materialrequisitionentry
-- ----------------------------
CREATE TABLE wform_materialrequisitionentry (
	"f_id" varchar(50) NOT NULL,
	"f_leadeid" varchar(50),
	"f_goodsname" varchar(50),
	"f_specifications" varchar(50),
	"f_unit" varchar(50),
	"f_materialdemand" varchar(50),
	"f_proportioning" varchar(50),
	"f_price" numeric(18,2),
	"f_amount" numeric(18,2),
	"f_description" text,
	"f_sortcode" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_materialrequisitionentry IS '领料明细';
COMMENT ON COLUMN wform_materialrequisitionentry."f_id" IS '自然主键';
COMMENT ON COLUMN wform_materialrequisitionentry."f_leadeid" IS '领料主键';
COMMENT ON COLUMN wform_materialrequisitionentry."f_goodsname" IS '商品名称';
COMMENT ON COLUMN wform_materialrequisitionentry."f_specifications" IS '规格型号';
COMMENT ON COLUMN wform_materialrequisitionentry."f_unit" IS '单位';
COMMENT ON COLUMN wform_materialrequisitionentry."f_materialdemand" IS '需数量';
COMMENT ON COLUMN wform_materialrequisitionentry."f_proportioning" IS '配数量';
COMMENT ON COLUMN wform_materialrequisitionentry."f_price" IS '单价';
COMMENT ON COLUMN wform_materialrequisitionentry."f_amount" IS '金额';
COMMENT ON COLUMN wform_materialrequisitionentry."f_description" IS '备注';
COMMENT ON COLUMN wform_materialrequisitionentry."f_sortcode" IS '排序码';
COMMENT ON COLUMN wform_materialrequisitionentry."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：wform_monthlyreport
-- ----------------------------
CREATE TABLE wform_monthlyreport (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_applydate" timestamp,
	"f_applydept" varchar(255),
	"f_applypost" varchar(50),
	"f_planendtime" timestamp,
	"f_overalevaluat" text,
	"f_npworkmatter" varchar(50),
	"f_npfinishtime" timestamp,
	"f_nfinishmethod" text,
	"f_filejson" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_monthlyreport IS '月工作总结';
COMMENT ON COLUMN wform_monthlyreport."f_id" IS '自然主键';
COMMENT ON COLUMN wform_monthlyreport."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_monthlyreport."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_monthlyreport."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_monthlyreport."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_monthlyreport."f_applyuser" IS '创建人';
COMMENT ON COLUMN wform_monthlyreport."f_applydate" IS '创建日期';
COMMENT ON COLUMN wform_monthlyreport."f_applydept" IS '所属部门';
COMMENT ON COLUMN wform_monthlyreport."f_applypost" IS '所属职务';
COMMENT ON COLUMN wform_monthlyreport."f_planendtime" IS '完成时间';
COMMENT ON COLUMN wform_monthlyreport."f_overalevaluat" IS '总体评价';
COMMENT ON COLUMN wform_monthlyreport."f_npworkmatter" IS '工作事项';
COMMENT ON COLUMN wform_monthlyreport."f_npfinishtime" IS '次月日期';
COMMENT ON COLUMN wform_monthlyreport."f_nfinishmethod" IS '次月目标';
COMMENT ON COLUMN wform_monthlyreport."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_monthlyreport."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_monthlyreport."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_officesupplies
-- ----------------------------
CREATE TABLE wform_officesupplies (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(255),
	"f_department" varchar(255),
	"f_usestock" varchar(50),
	"f_classification" varchar(50),
	"f_articlesname" varchar(50),
	"f_articlesnum" varchar(50),
	"f_articlesid" varchar(50),
	"f_applyreasons" text,
	"f_applydate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_officesupplies IS '领用办公用品申请表';
COMMENT ON COLUMN wform_officesupplies."f_id" IS '自然主键';
COMMENT ON COLUMN wform_officesupplies."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_officesupplies."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_officesupplies."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_officesupplies."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_officesupplies."f_applyuser" IS '申请部门';
COMMENT ON COLUMN wform_officesupplies."f_department" IS '所属部门';
COMMENT ON COLUMN wform_officesupplies."f_usestock" IS '领用仓库';
COMMENT ON COLUMN wform_officesupplies."f_classification" IS '用品分类';
COMMENT ON COLUMN wform_officesupplies."f_articlesname" IS '用品名称';
COMMENT ON COLUMN wform_officesupplies."f_articlesnum" IS '用品数量';
COMMENT ON COLUMN wform_officesupplies."f_articlesid" IS '用品编号';
COMMENT ON COLUMN wform_officesupplies."f_applyreasons" IS '申请原因';
COMMENT ON COLUMN wform_officesupplies."f_applydate" IS '申请时间';
COMMENT ON COLUMN wform_officesupplies."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_officesupplies."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_outboundorder
-- ----------------------------
CREATE TABLE wform_outboundorder (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_customername" varchar(50),
	"f_warehouse" varchar(50),
	"f_outstorage" varchar(50),
	"f_businesspeople" varchar(50),
	"f_businesstype" varchar(50),
	"f_outbounddate" timestamp,
	"f_description" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_outboundorder IS '出库单';
COMMENT ON COLUMN wform_outboundorder."f_id" IS '自然主键';
COMMENT ON COLUMN wform_outboundorder."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_outboundorder."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_outboundorder."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_outboundorder."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_outboundorder."f_customername" IS '客户名称';
COMMENT ON COLUMN wform_outboundorder."f_warehouse" IS '仓库';
COMMENT ON COLUMN wform_outboundorder."f_outstorage" IS '仓库人';
COMMENT ON COLUMN wform_outboundorder."f_businesspeople" IS '业务人员';
COMMENT ON COLUMN wform_outboundorder."f_businesstype" IS '业务类型';
COMMENT ON COLUMN wform_outboundorder."f_outbounddate" IS '出库日期';
COMMENT ON COLUMN wform_outboundorder."f_description" IS '备注';
COMMENT ON COLUMN wform_outboundorder."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_outboundorder."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_outboundorderentry
-- ----------------------------
CREATE TABLE wform_outboundorderentry (
	"f_id" varchar(50) NOT NULL,
	"f_outboundid" varchar(50),
	"f_goodsname" varchar(50),
	"f_specifications" varchar(50),
	"f_unit" varchar(50),
	"f_qty" varchar(50),
	"f_price" numeric(18,2),
	"f_amount" numeric(18,2),
	"f_description" text,
	"f_sortcode" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_outboundorderentry IS '出库单明细';
COMMENT ON COLUMN wform_outboundorderentry."f_id" IS '自然主键';
COMMENT ON COLUMN wform_outboundorderentry."f_outboundid" IS '出库单号';
COMMENT ON COLUMN wform_outboundorderentry."f_goodsname" IS '商品名称';
COMMENT ON COLUMN wform_outboundorderentry."f_specifications" IS '规格型号';
COMMENT ON COLUMN wform_outboundorderentry."f_unit" IS '单位';
COMMENT ON COLUMN wform_outboundorderentry."f_qty" IS '数量';
COMMENT ON COLUMN wform_outboundorderentry."f_price" IS '单价';
COMMENT ON COLUMN wform_outboundorderentry."f_amount" IS '金额';
COMMENT ON COLUMN wform_outboundorderentry."f_description" IS '备注';
COMMENT ON COLUMN wform_outboundorderentry."f_sortcode" IS '排序码';
COMMENT ON COLUMN wform_outboundorderentry."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：wform_outgoingapply
-- ----------------------------
CREATE TABLE wform_outgoingapply (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_department" varchar(255),
	"f_applydate" timestamp,
	"f_outgoingtotle" varchar(50),
	"f_starttime" timestamp,
	"f_endtime" timestamp,
	"f_destination" varchar(50),
	"f_filejson" text,
	"f_outgoingcause" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_outgoingapply IS '外出申请单';
COMMENT ON COLUMN wform_outgoingapply."f_id" IS '自然主键';
COMMENT ON COLUMN wform_outgoingapply."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_outgoingapply."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_outgoingapply."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_outgoingapply."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_outgoingapply."f_applyuser" IS '申请人';
COMMENT ON COLUMN wform_outgoingapply."f_department" IS '所在部门';
COMMENT ON COLUMN wform_outgoingapply."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_outgoingapply."f_outgoingtotle" IS '外出总计';
COMMENT ON COLUMN wform_outgoingapply."f_starttime" IS '开始时间';
COMMENT ON COLUMN wform_outgoingapply."f_endtime" IS '结束时间';
COMMENT ON COLUMN wform_outgoingapply."f_destination" IS '目的地';
COMMENT ON COLUMN wform_outgoingapply."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_outgoingapply."f_outgoingcause" IS '外出事由';
COMMENT ON COLUMN wform_outgoingapply."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_outgoingapply."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_paydistribution
-- ----------------------------
CREATE TABLE wform_paydistribution (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_month" varchar(50),
	"f_issuingunit" varchar(50),
	"f_department" varchar(255),
	"f_position" varchar(50),
	"f_basesalary" numeric(18,2),
	"f_actualattendance" varchar(50),
	"f_allowance" numeric(18,2),
	"f_incometax" numeric(18,2),
	"f_insurance" numeric(18,2),
	"f_performance" numeric(18,2),
	"f_overtimepay" numeric(18,2),
	"f_grosspay" numeric(18,2),
	"f_payroll" numeric(18,2),
	"f_description" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_paydistribution IS '薪酬发放';
COMMENT ON COLUMN wform_paydistribution."f_id" IS '自然主键';
COMMENT ON COLUMN wform_paydistribution."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_paydistribution."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_paydistribution."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_paydistribution."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_paydistribution."f_month" IS '所属月份';
COMMENT ON COLUMN wform_paydistribution."f_issuingunit" IS '发放单位';
COMMENT ON COLUMN wform_paydistribution."f_department" IS '员工部门';
COMMENT ON COLUMN wform_paydistribution."f_position" IS '员工职位';
COMMENT ON COLUMN wform_paydistribution."f_basesalary" IS '基本薪资';
COMMENT ON COLUMN wform_paydistribution."f_actualattendance" IS '出勤天数';
COMMENT ON COLUMN wform_paydistribution."f_allowance" IS '员工津贴';
COMMENT ON COLUMN wform_paydistribution."f_incometax" IS '所得税';
COMMENT ON COLUMN wform_paydistribution."f_insurance" IS '员工保险';
COMMENT ON COLUMN wform_paydistribution."f_performance" IS '员工绩效';
COMMENT ON COLUMN wform_paydistribution."f_overtimepay" IS '加班费用';
COMMENT ON COLUMN wform_paydistribution."f_grosspay" IS '应发工资';
COMMENT ON COLUMN wform_paydistribution."f_payroll" IS '实发工资';
COMMENT ON COLUMN wform_paydistribution."f_description" IS '备注';
COMMENT ON COLUMN wform_paydistribution."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_paydistribution."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_paymentapply
-- ----------------------------
CREATE TABLE wform_paymentapply (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_departmental" varchar(255),
	"f_purposename" varchar(50),
	"f_projectcategory" varchar(50),
	"f_projectleader" varchar(50),
	"f_openingbank" varchar(50),
	"f_beneficiaryaccount" varchar(50),
	"f_receivablecontact" varchar(50),
	"f_paymentunit" varchar(50),
	"f_applyamount" numeric(18,2),
	"f_settlementmethod" varchar(50),
	"f_paymenttype" varchar(50),
	"f_amountpaid" numeric(18,2),
	"f_description" text,
	"f_applydate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_paymentapply IS '付款申请单';
COMMENT ON COLUMN wform_paymentapply."f_id" IS '自然主键';
COMMENT ON COLUMN wform_paymentapply."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_paymentapply."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_paymentapply."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_paymentapply."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_paymentapply."f_applyuser" IS '申请人';
COMMENT ON COLUMN wform_paymentapply."f_departmental" IS '申请部门';
COMMENT ON COLUMN wform_paymentapply."f_purposename" IS '用途名称';
COMMENT ON COLUMN wform_paymentapply."f_projectcategory" IS '项目类别';
COMMENT ON COLUMN wform_paymentapply."f_projectleader" IS '项目负责人';
COMMENT ON COLUMN wform_paymentapply."f_openingbank" IS '开户银行';
COMMENT ON COLUMN wform_paymentapply."f_beneficiaryaccount" IS '收款账号';
COMMENT ON COLUMN wform_paymentapply."f_receivablecontact" IS '联系方式';
COMMENT ON COLUMN wform_paymentapply."f_paymentunit" IS '付款单位';
COMMENT ON COLUMN wform_paymentapply."f_applyamount" IS '申请金额';
COMMENT ON COLUMN wform_paymentapply."f_settlementmethod" IS '结算方式';
COMMENT ON COLUMN wform_paymentapply."f_paymenttype" IS '付款类型';
COMMENT ON COLUMN wform_paymentapply."f_amountpaid" IS '付款金额';
COMMENT ON COLUMN wform_paymentapply."f_description" IS '备注';
COMMENT ON COLUMN wform_paymentapply."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_paymentapply."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_paymentapply."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_postbatchtab
-- ----------------------------
CREATE TABLE wform_postbatchtab (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_filetitle" varchar(50),
	"f_draftedperson" varchar(50),
	"f_sendunit" varchar(50),
	"f_writingnum" varchar(50),
	"f_writingdate" timestamp,
	"f_sharenum" varchar(50),
	"f_filejson" text,
	"f_description" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_postbatchtab IS '发文呈批表';
COMMENT ON COLUMN wform_postbatchtab."f_id" IS '自然主键';
COMMENT ON COLUMN wform_postbatchtab."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_postbatchtab."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_postbatchtab."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_postbatchtab."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_postbatchtab."f_filetitle" IS '文件标题';
COMMENT ON COLUMN wform_postbatchtab."f_draftedperson" IS '主办单位';
COMMENT ON COLUMN wform_postbatchtab."f_sendunit" IS '发往单位';
COMMENT ON COLUMN wform_postbatchtab."f_writingnum" IS '发文编号';
COMMENT ON COLUMN wform_postbatchtab."f_writingdate" IS '发文日期';
COMMENT ON COLUMN wform_postbatchtab."f_sharenum" IS '份数';
COMMENT ON COLUMN wform_postbatchtab."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_postbatchtab."f_description" IS '备注';
COMMENT ON COLUMN wform_postbatchtab."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_postbatchtab."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_procurementmaterial
-- ----------------------------
CREATE TABLE wform_procurementmaterial (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_departmental" varchar(255),
	"f_applydate" timestamp,
	"f_purchaseunit" varchar(50),
	"f_deliverymode" varchar(50),
	"f_deliveryaddress" varchar(50),
	"f_paymentmethod" varchar(50),
	"f_paymentmoney" numeric(18,2),
	"f_filejson" text,
	"f_reason" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_procurementmaterial IS '采购原材料';
COMMENT ON COLUMN wform_procurementmaterial."f_id" IS '自然主键';
COMMENT ON COLUMN wform_procurementmaterial."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_procurementmaterial."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_procurementmaterial."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_procurementmaterial."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_procurementmaterial."f_applyuser" IS '申请人';
COMMENT ON COLUMN wform_procurementmaterial."f_departmental" IS '申请部门';
COMMENT ON COLUMN wform_procurementmaterial."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_procurementmaterial."f_purchaseunit" IS '采购单位';
COMMENT ON COLUMN wform_procurementmaterial."f_deliverymode" IS '送货方式';
COMMENT ON COLUMN wform_procurementmaterial."f_deliveryaddress" IS '送货地址';
COMMENT ON COLUMN wform_procurementmaterial."f_paymentmethod" IS '付款方式';
COMMENT ON COLUMN wform_procurementmaterial."f_paymentmoney" IS '付款金额';
COMMENT ON COLUMN wform_procurementmaterial."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_procurementmaterial."f_reason" IS '用途原因';
COMMENT ON COLUMN wform_procurementmaterial."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_procurementmaterial."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_procurementmaterialentry
-- ----------------------------
CREATE TABLE wform_procurementmaterialentry (
	"f_id" varchar(50) NOT NULL,
	"f_procurementid" varchar(50),
	"f_goodsname" varchar(50),
	"f_specifications" varchar(50),
	"f_unit" text,
	"f_qty" varchar(50),
	"f_price" numeric(18,2),
	"f_amount" numeric(18,2),
	"f_description" text,
	"f_sortcode" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_procurementmaterialentry IS '采购明细';
COMMENT ON COLUMN wform_procurementmaterialentry."f_id" IS '自然主键';
COMMENT ON COLUMN wform_procurementmaterialentry."f_procurementid" IS '采购主键';
COMMENT ON COLUMN wform_procurementmaterialentry."f_goodsname" IS '商品名称';
COMMENT ON COLUMN wform_procurementmaterialentry."f_specifications" IS '规格型号';
COMMENT ON COLUMN wform_procurementmaterialentry."f_unit" IS '单位';
COMMENT ON COLUMN wform_procurementmaterialentry."f_qty" IS '数量';
COMMENT ON COLUMN wform_procurementmaterialentry."f_price" IS '单价';
COMMENT ON COLUMN wform_procurementmaterialentry."f_amount" IS '金额';
COMMENT ON COLUMN wform_procurementmaterialentry."f_description" IS '备注';
COMMENT ON COLUMN wform_procurementmaterialentry."f_sortcode" IS '排序码';
COMMENT ON COLUMN wform_procurementmaterialentry."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：wform_purchaselist
-- ----------------------------
CREATE TABLE wform_purchaselist (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_departmental" varchar(255),
	"f_vendorname" varchar(50),
	"f_buyer" varchar(50),
	"f_purchasedate" timestamp,
	"f_warehouse" varchar(50),
	"f_telephone" varchar(50),
	"f_paymentmethod" varchar(50),
	"f_paymentmoney" numeric(18,2),
	"f_filejson" text,
	"f_reason" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_purchaselist IS '日常物品采购清单';
COMMENT ON COLUMN wform_purchaselist."f_id" IS '自然主键';
COMMENT ON COLUMN wform_purchaselist."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_purchaselist."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_purchaselist."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_purchaselist."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_purchaselist."f_applyuser" IS '申请人';
COMMENT ON COLUMN wform_purchaselist."f_departmental" IS '所在部门';
COMMENT ON COLUMN wform_purchaselist."f_vendorname" IS '供应商名称';
COMMENT ON COLUMN wform_purchaselist."f_buyer" IS '采购人员';
COMMENT ON COLUMN wform_purchaselist."f_purchasedate" IS '采购日期';
COMMENT ON COLUMN wform_purchaselist."f_warehouse" IS '仓库';
COMMENT ON COLUMN wform_purchaselist."f_telephone" IS '联系方式';
COMMENT ON COLUMN wform_purchaselist."f_paymentmethod" IS '支付方式';
COMMENT ON COLUMN wform_purchaselist."f_paymentmoney" IS '支付总额';
COMMENT ON COLUMN wform_purchaselist."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_purchaselist."f_reason" IS '用途原因';
COMMENT ON COLUMN wform_purchaselist."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_purchaselist."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_purchaselistentry
-- ----------------------------
CREATE TABLE wform_purchaselistentry (
	"f_id" varchar(50) NOT NULL,
	"f_purchaseid" varchar(50),
	"f_goodsname" varchar(50),
	"f_specifications" varchar(50),
	"f_unit" varchar(50),
	"f_qty" varchar(50),
	"f_price" numeric(18,2),
	"f_amount" numeric(18,2),
	"f_description" text,
	"f_sortcode" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_purchaselistentry IS '日常物品采购清单';
COMMENT ON COLUMN wform_purchaselistentry."f_id" IS '自然主键';
COMMENT ON COLUMN wform_purchaselistentry."f_purchaseid" IS '采购主键';
COMMENT ON COLUMN wform_purchaselistentry."f_goodsname" IS '商品名称';
COMMENT ON COLUMN wform_purchaselistentry."f_specifications" IS '规格型号';
COMMENT ON COLUMN wform_purchaselistentry."f_unit" IS '单位';
COMMENT ON COLUMN wform_purchaselistentry."f_qty" IS '数量';
COMMENT ON COLUMN wform_purchaselistentry."f_price" IS '单价';
COMMENT ON COLUMN wform_purchaselistentry."f_amount" IS '金额';
COMMENT ON COLUMN wform_purchaselistentry."f_description" IS '备注';
COMMENT ON COLUMN wform_purchaselistentry."f_sortcode" IS '排序码';
COMMENT ON COLUMN wform_purchaselistentry."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：wform_quotationapproval
-- ----------------------------
CREATE TABLE wform_quotationapproval (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_writer" varchar(50),
	"f_writedate" timestamp,
	"f_customername" varchar(50),
	"f_quotationtype" varchar(50),
	"f_partnername" varchar(50),
	"f_standardfile" varchar(50),
	"f_custsituation" text,
	"f_filejson" text,
	"f_type" varchar(255),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_quotationapproval IS '报价审批表';
COMMENT ON COLUMN wform_quotationapproval."f_id" IS '自然主键';
COMMENT ON COLUMN wform_quotationapproval."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_quotationapproval."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_quotationapproval."f_flowurgent" IS '流程等级';
COMMENT ON COLUMN wform_quotationapproval."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_quotationapproval."f_writer" IS '填报人';
COMMENT ON COLUMN wform_quotationapproval."f_writedate" IS '填表日期';
COMMENT ON COLUMN wform_quotationapproval."f_customername" IS '客户名称';
COMMENT ON COLUMN wform_quotationapproval."f_quotationtype" IS '类型';
COMMENT ON COLUMN wform_quotationapproval."f_partnername" IS '合作人名';
COMMENT ON COLUMN wform_quotationapproval."f_standardfile" IS '模板参考';
COMMENT ON COLUMN wform_quotationapproval."f_custsituation" IS '情况描述';
COMMENT ON COLUMN wform_quotationapproval."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_quotationapproval."f_type" IS '报价类型';
COMMENT ON COLUMN wform_quotationapproval."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_quotationapproval."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_receiptprocessing
-- ----------------------------
CREATE TABLE wform_receiptprocessing (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_filetitle" varchar(50),
	"f_communicationunit" varchar(50),
	"f_letternum" varchar(50),
	"f_receiptdate" timestamp,
	"f_filejson" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_receiptprocessing IS '收文处理表';
COMMENT ON COLUMN wform_receiptprocessing."f_id" IS '自然主键';
COMMENT ON COLUMN wform_receiptprocessing."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_receiptprocessing."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_receiptprocessing."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_receiptprocessing."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_receiptprocessing."f_filetitle" IS '文件标题';
COMMENT ON COLUMN wform_receiptprocessing."f_communicationunit" IS '来文单位';
COMMENT ON COLUMN wform_receiptprocessing."f_letternum" IS '来文字号';
COMMENT ON COLUMN wform_receiptprocessing."f_receiptdate" IS '收文日期';
COMMENT ON COLUMN wform_receiptprocessing."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_receiptprocessing."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_receiptprocessing."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_receiptsign
-- ----------------------------
CREATE TABLE wform_receiptsign (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_receipttitle" varchar(50),
	"f_department" varchar(255),
	"f_collector" varchar(50),
	"f_filejson" text,
	"f_receiptpaper" text,
	"f_receiptdate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_receiptsign IS '收文签呈单';
COMMENT ON COLUMN wform_receiptsign."f_id" IS '自然主键';
COMMENT ON COLUMN wform_receiptsign."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_receiptsign."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_receiptsign."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_receiptsign."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_receiptsign."f_receipttitle" IS '收文标题';
COMMENT ON COLUMN wform_receiptsign."f_department" IS '收文部门';
COMMENT ON COLUMN wform_receiptsign."f_collector" IS '收文人';
COMMENT ON COLUMN wform_receiptsign."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_receiptsign."f_receiptpaper" IS '收文简述';
COMMENT ON COLUMN wform_receiptsign."f_receiptdate" IS '收文日期';
COMMENT ON COLUMN wform_receiptsign."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_receiptsign."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_rewardpunishment
-- ----------------------------
CREATE TABLE wform_rewardpunishment (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_fullname" varchar(50),
	"f_fillfromdate" timestamp,
	"f_department" varchar(255),
	"f_position" varchar(50),
	"f_rewardpun" numeric(18,2),
	"f_reason" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_rewardpunishment IS '行政赏罚单';
COMMENT ON COLUMN wform_rewardpunishment."f_id" IS '自然主键';
COMMENT ON COLUMN wform_rewardpunishment."f_flowid" IS '主键';
COMMENT ON COLUMN wform_rewardpunishment."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_rewardpunishment."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_rewardpunishment."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_rewardpunishment."f_fullname" IS '员工姓名';
COMMENT ON COLUMN wform_rewardpunishment."f_fillfromdate" IS '填表日期';
COMMENT ON COLUMN wform_rewardpunishment."f_department" IS '员工部门';
COMMENT ON COLUMN wform_rewardpunishment."f_position" IS '员工职位';
COMMENT ON COLUMN wform_rewardpunishment."f_rewardpun" IS '赏罚金额';
COMMENT ON COLUMN wform_rewardpunishment."f_reason" IS '赏罚原因';
COMMENT ON COLUMN wform_rewardpunishment."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_rewardpunishment."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_salesorder
-- ----------------------------
CREATE TABLE wform_salesorder (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_salesman" varchar(50),
	"f_customername" varchar(50),
	"f_contacts" varchar(50),
	"f_contactphone" varchar(50),
	"f_customeraddres" varchar(50),
	"f_ticketnum" varchar(50),
	"f_invoicetype" varchar(50),
	"f_paymentmethod" varchar(50),
	"f_paymentmoney" numeric(18,2),
	"f_salesdate" timestamp,
	"f_filejson" text,
	"f_description" text,
	"f_ticketdate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_salesorder IS '销售订单';
COMMENT ON COLUMN wform_salesorder."f_id" IS '自然主键';
COMMENT ON COLUMN wform_salesorder."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_salesorder."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_salesorder."f_flowurgent" IS '流程等级';
COMMENT ON COLUMN wform_salesorder."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_salesorder."f_salesman" IS '业务人员';
COMMENT ON COLUMN wform_salesorder."f_customername" IS '客户名称';
COMMENT ON COLUMN wform_salesorder."f_contacts" IS '联系人';
COMMENT ON COLUMN wform_salesorder."f_contactphone" IS '联系电话';
COMMENT ON COLUMN wform_salesorder."f_customeraddres" IS '客户地址';
COMMENT ON COLUMN wform_salesorder."f_ticketnum" IS '发票编号';
COMMENT ON COLUMN wform_salesorder."f_invoicetype" IS '发票类型';
COMMENT ON COLUMN wform_salesorder."f_paymentmethod" IS '付款方式';
COMMENT ON COLUMN wform_salesorder."f_paymentmoney" IS '付款金额';
COMMENT ON COLUMN wform_salesorder."f_salesdate" IS '销售日期';
COMMENT ON COLUMN wform_salesorder."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_salesorder."f_description" IS '描述';
COMMENT ON COLUMN wform_salesorder."f_ticketdate" IS '开票日期';
COMMENT ON COLUMN wform_salesorder."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：wform_salesorderentry
-- ----------------------------
CREATE TABLE wform_salesorderentry (
	"f_id" varchar(50) NOT NULL,
	"f_salesorderid" varchar(50),
	"f_goodsname" varchar(50),
	"f_specifications" varchar(50),
	"f_unit" text,
	"f_qty" varchar(50),
	"f_price" numeric(18,2),
	"f_amount" numeric(18,2),
	"f_description" text,
	"f_sortcode" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_salesorderentry IS '销售订单明细';
COMMENT ON COLUMN wform_salesorderentry."f_id" IS '自然主键';
COMMENT ON COLUMN wform_salesorderentry."f_salesorderid" IS '订单主键';
COMMENT ON COLUMN wform_salesorderentry."f_goodsname" IS '商品名称';
COMMENT ON COLUMN wform_salesorderentry."f_specifications" IS '规格型号';
COMMENT ON COLUMN wform_salesorderentry."f_unit" IS '单位';
COMMENT ON COLUMN wform_salesorderentry."f_qty" IS '数量';
COMMENT ON COLUMN wform_salesorderentry."f_price" IS '单价';
COMMENT ON COLUMN wform_salesorderentry."f_amount" IS '金额';
COMMENT ON COLUMN wform_salesorderentry."f_description" IS '描述';
COMMENT ON COLUMN wform_salesorderentry."f_sortcode" IS '';
COMMENT ON COLUMN wform_salesorderentry."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：wform_salessupport
-- ----------------------------
CREATE TABLE wform_salessupport (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_applydate" timestamp,
	"f_applydept" varchar(255),
	"f_customer" varchar(50),
	"f_project" varchar(50),
	"f_psalesupinfo" varchar(50),
	"f_startdate" timestamp,
	"f_enddate" timestamp,
	"f_psalesupdays" varchar(50),
	"f_psalepredays" varchar(50),
	"f_consulmanager" varchar(50),
	"f_psalsupconsul" varchar(50),
	"f_filejson" text,
	"f_salsupconclu" text,
	"f_consultresult" text,
	"f_ievaluation" text,
	"f_conclusion" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_salessupport IS '销售支持表';
COMMENT ON COLUMN wform_salessupport."f_id" IS '自然主键';
COMMENT ON COLUMN wform_salessupport."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_salessupport."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_salessupport."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_salessupport."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_salessupport."f_applyuser" IS '申请人';
COMMENT ON COLUMN wform_salessupport."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_salessupport."f_applydept" IS '申请部门';
COMMENT ON COLUMN wform_salessupport."f_customer" IS '相关客户';
COMMENT ON COLUMN wform_salessupport."f_project" IS '相关项目';
COMMENT ON COLUMN wform_salessupport."f_psalesupinfo" IS '售前支持';
COMMENT ON COLUMN wform_salessupport."f_startdate" IS '开始时间';
COMMENT ON COLUMN wform_salessupport."f_enddate" IS '结束日期';
COMMENT ON COLUMN wform_salessupport."f_psalesupdays" IS '支持天数';
COMMENT ON COLUMN wform_salessupport."f_psalepredays" IS '准备天数';
COMMENT ON COLUMN wform_salessupport."f_consulmanager" IS '机构咨询';
COMMENT ON COLUMN wform_salessupport."f_psalsupconsul" IS '售前顾问';
COMMENT ON COLUMN wform_salessupport."f_filejson" IS '';
COMMENT ON COLUMN wform_salessupport."f_salsupconclu" IS '销售总结';
COMMENT ON COLUMN wform_salessupport."f_consultresult" IS '交付说明';
COMMENT ON COLUMN wform_salessupport."f_ievaluation" IS '咨询评价';
COMMENT ON COLUMN wform_salessupport."f_conclusion" IS '发起人总结';
COMMENT ON COLUMN wform_salessupport."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_salessupport."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_staffovertime
-- ----------------------------
CREATE TABLE wform_staffovertime (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_department" varchar(255),
	"f_applydate" timestamp,
	"f_totletime" varchar(50),
	"f_starttime" timestamp,
	"f_endtime" timestamp,
	"f_category" varchar(50),
	"f_cause" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_staffovertime IS '员工加班申请表';
COMMENT ON COLUMN wform_staffovertime."f_id" IS '自然主键';
COMMENT ON COLUMN wform_staffovertime."f_flowid" IS '流程标题';
COMMENT ON COLUMN wform_staffovertime."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_staffovertime."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_staffovertime."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_staffovertime."f_applyuser" IS '申请人';
COMMENT ON COLUMN wform_staffovertime."f_department" IS '申请部门';
COMMENT ON COLUMN wform_staffovertime."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_staffovertime."f_totletime" IS '总计时间';
COMMENT ON COLUMN wform_staffovertime."f_starttime" IS '开始时间';
COMMENT ON COLUMN wform_staffovertime."f_endtime" IS '结束时间';
COMMENT ON COLUMN wform_staffovertime."f_category" IS '记入类别';
COMMENT ON COLUMN wform_staffovertime."f_cause" IS '加班事由';
COMMENT ON COLUMN wform_staffovertime."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_staffovertime."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_supplementcard
-- ----------------------------
CREATE TABLE wform_supplementcard (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_fullname" varchar(50),
	"f_department" varchar(255),
	"f_position" varchar(50),
	"f_witness" varchar(50),
	"f_supplementnum" varchar(50),
	"f_description" text,
	"f_applydate" timestamp,
	"f_starttime" timestamp,
	"f_endtime" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_supplementcard IS '补卡申请';
COMMENT ON COLUMN wform_supplementcard."f_id" IS '自然主键';
COMMENT ON COLUMN wform_supplementcard."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_supplementcard."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_supplementcard."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_supplementcard."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_supplementcard."f_fullname" IS '员工姓名';
COMMENT ON COLUMN wform_supplementcard."f_department" IS '所在部门';
COMMENT ON COLUMN wform_supplementcard."f_position" IS '所在职务';
COMMENT ON COLUMN wform_supplementcard."f_witness" IS '证明人';
COMMENT ON COLUMN wform_supplementcard."f_supplementnum" IS '补卡次数';
COMMENT ON COLUMN wform_supplementcard."f_description" IS '备注';
COMMENT ON COLUMN wform_supplementcard."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_supplementcard."f_starttime" IS '开始时间';
COMMENT ON COLUMN wform_supplementcard."f_endtime" IS '结束日期';
COMMENT ON COLUMN wform_supplementcard."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_supplementcard."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_travelapply
-- ----------------------------
CREATE TABLE wform_travelapply (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_travelman" varchar(50),
	"f_applydate" timestamp,
	"f_departmental" varchar(255),
	"f_position" varchar(50),
	"f_startdate" timestamp,
	"f_enddate" timestamp,
	"f_startplace" varchar(50),
	"f_destination" varchar(50),
	"f_prepaidtravel" numeric(18,2),
	"f_description" text,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_travelapply IS '出差预支申请单';
COMMENT ON COLUMN wform_travelapply."f_id" IS '自然主键';
COMMENT ON COLUMN wform_travelapply."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_travelapply."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_travelapply."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_travelapply."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_travelapply."f_travelman" IS '出差人';
COMMENT ON COLUMN wform_travelapply."f_applydate" IS '申请日期';
COMMENT ON COLUMN wform_travelapply."f_departmental" IS '所属部门';
COMMENT ON COLUMN wform_travelapply."f_position" IS '所属职务';
COMMENT ON COLUMN wform_travelapply."f_startdate" IS '开始日期';
COMMENT ON COLUMN wform_travelapply."f_enddate" IS '结束日期';
COMMENT ON COLUMN wform_travelapply."f_startplace" IS '起始地点';
COMMENT ON COLUMN wform_travelapply."f_destination" IS '目的地';
COMMENT ON COLUMN wform_travelapply."f_prepaidtravel" IS '预支旅费';
COMMENT ON COLUMN wform_travelapply."f_description" IS '备注';
COMMENT ON COLUMN wform_travelapply."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_travelapply."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_travelreimbursement
-- ----------------------------
CREATE TABLE wform_travelreimbursement (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_applyuser" varchar(50),
	"f_departmental" varchar(255),
	"f_billsnum" varchar(50),
	"f_businessmission" text,
	"f_setoutdate" timestamp,
	"f_returndate" timestamp,
	"f_destination" varchar(50),
	"f_planeticket" numeric(18,2),
	"f_fare" numeric(18,2),
	"f_getaccommodation" numeric(18,2),
	"f_travelallowance" numeric(18,2),
	"f_other" numeric(18,2),
	"f_total" numeric(18,2),
	"f_reimbursementamount" numeric(18,2),
	"f_loanamount" numeric(18,2),
	"f_sumofmoney" numeric(18,2),
	"f_traveleruser" varchar(50),
	"f_vehiclemileage" numeric(18,2),
	"f_roadfee" numeric(18,2),
	"f_parkingrate" numeric(18,2),
	"f_mealallowance" numeric(18,2),
	"f_breakdownfee" numeric(18,2),
	"f_reimbursementid" varchar(50),
	"f_railtransit" numeric(18,2),
	"f_applydate" timestamp,
	"f_versions" int4,
	"f_flowtaskid" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_travelreimbursement IS '差旅报销申请表';
COMMENT ON COLUMN wform_travelreimbursement."f_id" IS '自然主键';
COMMENT ON COLUMN wform_travelreimbursement."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_travelreimbursement."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_travelreimbursement."f_flowurgent" IS '流程等级';
COMMENT ON COLUMN wform_travelreimbursement."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_travelreimbursement."f_applyuser" IS '申请人';
COMMENT ON COLUMN wform_travelreimbursement."f_departmental" IS '申请部门';
COMMENT ON COLUMN wform_travelreimbursement."f_billsnum" IS '票据数';
COMMENT ON COLUMN wform_travelreimbursement."f_businessmission" IS '出差任务';
COMMENT ON COLUMN wform_travelreimbursement."f_setoutdate" IS '出发日期';
COMMENT ON COLUMN wform_travelreimbursement."f_returndate" IS '回归日期';
COMMENT ON COLUMN wform_travelreimbursement."f_destination" IS '到达地';
COMMENT ON COLUMN wform_travelreimbursement."f_planeticket" IS '机票费';
COMMENT ON COLUMN wform_travelreimbursement."f_fare" IS '车船费';
COMMENT ON COLUMN wform_travelreimbursement."f_getaccommodation" IS '住宿费用';
COMMENT ON COLUMN wform_travelreimbursement."f_travelallowance" IS '出差补助';
COMMENT ON COLUMN wform_travelreimbursement."f_other" IS '其他费用';
COMMENT ON COLUMN wform_travelreimbursement."f_total" IS '合计';
COMMENT ON COLUMN wform_travelreimbursement."f_reimbursementamount" IS '报销金额';
COMMENT ON COLUMN wform_travelreimbursement."f_loanamount" IS '借款金额';
COMMENT ON COLUMN wform_travelreimbursement."f_sumofmoney" IS '补找金额';
COMMENT ON COLUMN wform_travelreimbursement."f_traveleruser" IS '';
COMMENT ON COLUMN wform_travelreimbursement."f_vehiclemileage" IS '车辆里程';
COMMENT ON COLUMN wform_travelreimbursement."f_roadfee" IS '过路费';
COMMENT ON COLUMN wform_travelreimbursement."f_parkingrate" IS '停车费';
COMMENT ON COLUMN wform_travelreimbursement."f_mealallowance" IS '餐补费用';
COMMENT ON COLUMN wform_travelreimbursement."f_breakdownfee" IS '故障报修费';
COMMENT ON COLUMN wform_travelreimbursement."f_reimbursementid" IS '报销编号';
COMMENT ON COLUMN wform_travelreimbursement."f_railtransit" IS '轨道交通费';
COMMENT ON COLUMN wform_travelreimbursement."f_applydate" IS '申请时间';
COMMENT ON COLUMN wform_travelreimbursement."f_versions" IS '乐观锁';
COMMENT ON COLUMN wform_travelreimbursement."f_flowtaskid" IS '流程任务主键';
COMMENT ON COLUMN wform_travelreimbursement."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_travelreimbursement."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_vehicleapply
-- ----------------------------
CREATE TABLE wform_vehicleapply (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_carman" varchar(50),
	"f_department" varchar(255),
	"f_platenum" varchar(50),
	"f_destination" varchar(50),
	"f_roadfee" numeric(18,2),
	"f_kilometrenum" varchar(50),
	"f_entourage" varchar(50),
	"f_description" text,
	"f_startdate" timestamp,
	"f_enddate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_vehicleapply IS '车辆申请';
COMMENT ON COLUMN wform_vehicleapply."f_id" IS '自然主键';
COMMENT ON COLUMN wform_vehicleapply."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_vehicleapply."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_vehicleapply."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_vehicleapply."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_vehicleapply."f_carman" IS '用车人';
COMMENT ON COLUMN wform_vehicleapply."f_department" IS '所在部门';
COMMENT ON COLUMN wform_vehicleapply."f_platenum" IS '车牌号';
COMMENT ON COLUMN wform_vehicleapply."f_destination" IS '目的地';
COMMENT ON COLUMN wform_vehicleapply."f_roadfee" IS '路费金额';
COMMENT ON COLUMN wform_vehicleapply."f_kilometrenum" IS '公里数';
COMMENT ON COLUMN wform_vehicleapply."f_entourage" IS '随行人数';
COMMENT ON COLUMN wform_vehicleapply."f_description" IS '备注';
COMMENT ON COLUMN wform_vehicleapply."f_startdate" IS '开始日期';
COMMENT ON COLUMN wform_vehicleapply."f_enddate" IS '结束日期';
COMMENT ON COLUMN wform_vehicleapply."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_vehicleapply."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_violationhandling
-- ----------------------------
CREATE TABLE wform_violationhandling (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_platenum" varchar(50),
	"f_driver" varchar(50),
	"f_leadingofficial" varchar(50),
	"f_violationsite" varchar(50),
	"f_violationbehavior" varchar(50),
	"f_deduction" varchar(50),
	"f_amountmoney" numeric(18,2),
	"f_description" text,
	"f_noticedate" timestamp,
	"f_peccancydate" timestamp,
	"f_limitdate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_violationhandling IS '违章处理申请表';
COMMENT ON COLUMN wform_violationhandling."f_id" IS '自然主键';
COMMENT ON COLUMN wform_violationhandling."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_violationhandling."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_violationhandling."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_violationhandling."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_violationhandling."f_platenum" IS '车牌号';
COMMENT ON COLUMN wform_violationhandling."f_driver" IS '驾驶人';
COMMENT ON COLUMN wform_violationhandling."f_leadingofficial" IS '负责人';
COMMENT ON COLUMN wform_violationhandling."f_violationsite" IS '违章地点';
COMMENT ON COLUMN wform_violationhandling."f_violationbehavior" IS '违章行为';
COMMENT ON COLUMN wform_violationhandling."f_deduction" IS '违章扣分';
COMMENT ON COLUMN wform_violationhandling."f_amountmoney" IS '违章罚款';
COMMENT ON COLUMN wform_violationhandling."f_description" IS '备注';
COMMENT ON COLUMN wform_violationhandling."f_noticedate" IS '通知日期';
COMMENT ON COLUMN wform_violationhandling."f_peccancydate" IS '违章日期';
COMMENT ON COLUMN wform_violationhandling."f_limitdate" IS '限处理日期';
COMMENT ON COLUMN wform_violationhandling."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_violationhandling."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_warehousereceipt
-- ----------------------------
CREATE TABLE wform_warehousereceipt (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_suppliername" varchar(50),
	"f_contactphone" varchar(50),
	"f_warehouscategory" varchar(50),
	"f_warehouse" varchar(50),
	"f_warehousespeople" varchar(50),
	"f_deliveryno" varchar(50),
	"f_warehouseno" varchar(50),
	"f_warehousdate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_warehousereceipt IS '入库申请单';
COMMENT ON COLUMN wform_warehousereceipt."f_id" IS '自然主键';
COMMENT ON COLUMN wform_warehousereceipt."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_warehousereceipt."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_warehousereceipt."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_warehousereceipt."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_warehousereceipt."f_suppliername" IS '供应商名称';
COMMENT ON COLUMN wform_warehousereceipt."f_contactphone" IS '联系电话';
COMMENT ON COLUMN wform_warehousereceipt."f_warehouscategory" IS '入库类别';
COMMENT ON COLUMN wform_warehousereceipt."f_warehouse" IS '仓库';
COMMENT ON COLUMN wform_warehousereceipt."f_warehousespeople" IS '入库人';
COMMENT ON COLUMN wform_warehousereceipt."f_deliveryno" IS '送货单号';
COMMENT ON COLUMN wform_warehousereceipt."f_warehouseno" IS '入库单号';
COMMENT ON COLUMN wform_warehousereceipt."f_warehousdate" IS '入库日期';
COMMENT ON COLUMN wform_warehousereceipt."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_warehousereceipt."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_warehousereceiptentry
-- ----------------------------
CREATE TABLE wform_warehousereceiptentry (
	"f_id" varchar(50) NOT NULL,
	"f_warehouseid" varchar(50),
	"f_goodsname" varchar(50),
	"f_specifications" varchar(50),
	"f_unit" varchar(50),
	"f_qty" varchar(50),
	"f_price" numeric(18,2),
	"f_amount" numeric(18,2),
	"f_description" text,
	"f_sortcode" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_warehousereceiptentry IS '出库单明细';
COMMENT ON COLUMN wform_warehousereceiptentry."f_id" IS '自然主键';
COMMENT ON COLUMN wform_warehousereceiptentry."f_warehouseid" IS '入库主键';
COMMENT ON COLUMN wform_warehousereceiptentry."f_goodsname" IS '商品名称';
COMMENT ON COLUMN wform_warehousereceiptentry."f_specifications" IS '规格型号';
COMMENT ON COLUMN wform_warehousereceiptentry."f_unit" IS '单位';
COMMENT ON COLUMN wform_warehousereceiptentry."f_qty" IS '数量';
COMMENT ON COLUMN wform_warehousereceiptentry."f_price" IS '单价';
COMMENT ON COLUMN wform_warehousereceiptentry."f_amount" IS '金额';
COMMENT ON COLUMN wform_warehousereceiptentry."f_description" IS '备注';
COMMENT ON COLUMN wform_warehousereceiptentry."f_sortcode" IS '排序码';
COMMENT ON COLUMN wform_warehousereceiptentry."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：wform_workcontactsheet
-- ----------------------------
CREATE TABLE wform_workcontactsheet (
	"f_id" varchar(50) NOT NULL,
	"f_flowid" varchar(50),
	"f_flowtitle" varchar(50),
	"f_flowurgent" int4,
	"f_billno" varchar(50),
	"f_drawpeople" varchar(50),
	"f_issuingdepartment" varchar(255),
	"f_servicedepartment" varchar(255),
	"f_recipients" varchar(50),
	"f_coordination" text,
	"f_filejson" text,
	"f_todate" timestamp,
	"f_collectiondate" timestamp,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_flow_id" varchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
COMMENT ON TABLE wform_workcontactsheet IS '工作联系单';
COMMENT ON COLUMN wform_workcontactsheet."f_id" IS '自然主键';
COMMENT ON COLUMN wform_workcontactsheet."f_flowid" IS '流程主键';
COMMENT ON COLUMN wform_workcontactsheet."f_flowtitle" IS '流程标题';
COMMENT ON COLUMN wform_workcontactsheet."f_flowurgent" IS '紧急程度';
COMMENT ON COLUMN wform_workcontactsheet."f_billno" IS '流程单据';
COMMENT ON COLUMN wform_workcontactsheet."f_drawpeople" IS '发件人';
COMMENT ON COLUMN wform_workcontactsheet."f_issuingdepartment" IS '发件部门';
COMMENT ON COLUMN wform_workcontactsheet."f_servicedepartment" IS '收件部门';
COMMENT ON COLUMN wform_workcontactsheet."f_recipients" IS '收件人';
COMMENT ON COLUMN wform_workcontactsheet."f_coordination" IS '协调事项';
COMMENT ON COLUMN wform_workcontactsheet."f_filejson" IS '相关附件';
COMMENT ON COLUMN wform_workcontactsheet."f_todate" IS '发件日期';
COMMENT ON COLUMN wform_workcontactsheet."f_collectiondate" IS '收件日期';
COMMENT ON COLUMN wform_workcontactsheet."f_tenant_id" IS '租户id';
COMMENT ON COLUMN wform_workcontactsheet."f_flow_id" IS '流程id';
-- ----------------------------
-- 表名：wform_zjf_wikxqi
-- ----------------------------
CREATE TABLE wform_zjf_wikxqi (
	"userselectfield101" varchar(255),
	"f_id" varchar(50) NOT NULL,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE wform_zjf_wikxqi IS '主表';
COMMENT ON COLUMN wform_zjf_wikxqi."userselectfield101" IS '用户选择';
COMMENT ON COLUMN wform_zjf_wikxqi."f_id" IS '主键';
COMMENT ON COLUMN wform_zjf_wikxqi."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_candidates
-- ----------------------------
CREATE TABLE workflow_candidates (
	"f_id" varchar(50) NOT NULL,
	"f_node_code" varchar(50),
	"f_task_id" varchar(50),
	"f_handle_id" varchar(50),
	"f_account" varchar(50),
	"f_candidates" text,
	"f_operator_id" varchar(50),
	"f_type" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_candidates IS '流程候选人/异常处理人';
COMMENT ON COLUMN workflow_candidates."f_id" IS '自然主键';
COMMENT ON COLUMN workflow_candidates."f_node_code" IS '节点编码';
COMMENT ON COLUMN workflow_candidates."f_task_id" IS '任务id';
COMMENT ON COLUMN workflow_candidates."f_handle_id" IS '审批人id';
COMMENT ON COLUMN workflow_candidates."f_account" IS '审批人账号';
COMMENT ON COLUMN workflow_candidates."f_candidates" IS '候选人';
COMMENT ON COLUMN workflow_candidates."f_operator_id" IS '经办主键';
COMMENT ON COLUMN workflow_candidates."f_type" IS '审批类型(1-候选人 2-异常处理人)';
COMMENT ON COLUMN workflow_candidates."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_candidates."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_candidates."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_candidates."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_candidates."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_candidates."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_candidates."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_candidates."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_candidates."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_circulate
-- ----------------------------
CREATE TABLE workflow_circulate (
	"f_id" varchar(50) NOT NULL,
	"f_user_id" varchar(50),
	"f_task_id" varchar(50),
	"f_node_code" varchar(50),
	"f_node_name" varchar(50),
	"f_node_id" varchar(50),
	"f_operator_id" varchar(50),
	"f_read" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_circulate IS '流程抄送';
COMMENT ON COLUMN workflow_circulate."f_id" IS '自然主键';
COMMENT ON COLUMN workflow_circulate."f_user_id" IS '抄送人员';
COMMENT ON COLUMN workflow_circulate."f_task_id" IS '任务主键';
COMMENT ON COLUMN workflow_circulate."f_node_code" IS '节点编号';
COMMENT ON COLUMN workflow_circulate."f_node_name" IS '节点名称';
COMMENT ON COLUMN workflow_circulate."f_node_id" IS '节点主键';
COMMENT ON COLUMN workflow_circulate."f_operator_id" IS '经办主键';
COMMENT ON COLUMN workflow_circulate."f_read" IS '是否已读';
COMMENT ON COLUMN workflow_circulate."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_circulate."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_circulate."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_circulate."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_circulate."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_circulate."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_circulate."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_circulate."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_circulate."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_comment
-- ----------------------------
CREATE TABLE workflow_comment (
	"f_id" varchar(50) NOT NULL,
	"f_task_id" varchar(50),
	"f_reply_id" varchar(50),
	"f_text" text,
	"f_image" text,
	"f_file" text,
	"f_delete_show" int4,
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_comment IS '流程评论';
COMMENT ON COLUMN workflow_comment."f_id" IS '自然主键';
COMMENT ON COLUMN workflow_comment."f_task_id" IS '任务主键';
COMMENT ON COLUMN workflow_comment."f_reply_id" IS '回复评论id';
COMMENT ON COLUMN workflow_comment."f_text" IS '文本';
COMMENT ON COLUMN workflow_comment."f_image" IS '图片';
COMMENT ON COLUMN workflow_comment."f_file" IS '附件';
COMMENT ON COLUMN workflow_comment."f_delete_show" IS '评论删除显示';
COMMENT ON COLUMN workflow_comment."f_enabled_mark" IS '有效标志';
COMMENT ON COLUMN workflow_comment."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_comment."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_comment."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_comment."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_comment."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_comment."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_comment."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_comment."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_comment."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_common
-- ----------------------------
CREATE TABLE workflow_common (
	"f_id" varchar(50) NOT NULL,
	"f_type" varchar(50),
	"f_flow_id" varchar(50),
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_sort_code" int8,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_common IS '常用流程';
COMMENT ON COLUMN workflow_common."f_id" IS '自然主键';
COMMENT ON COLUMN workflow_common."f_type" IS '类型 web、app';
COMMENT ON COLUMN workflow_common."f_flow_id" IS '流程版本id';
COMMENT ON COLUMN workflow_common."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_common."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_common."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_common."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_common."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_common."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_common."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_common."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_common."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_delegate
-- ----------------------------
CREATE TABLE workflow_delegate (
	"f_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(4000),
	"f_flow_name" varchar(4000),
	"f_start_time" timestamp,
	"f_end_time" timestamp,
	"f_user_id" varchar(50),
	"f_user_name" varchar(50),
	"f_type" int4,
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_delegate IS '流程委托';
COMMENT ON COLUMN workflow_delegate."f_id" IS '自然主键';
COMMENT ON COLUMN workflow_delegate."f_flow_id" IS '委托流程（为空是全部流程）';
COMMENT ON COLUMN workflow_delegate."f_flow_name" IS '委托流程名称';
COMMENT ON COLUMN workflow_delegate."f_start_time" IS '开始时间';
COMMENT ON COLUMN workflow_delegate."f_end_time" IS '结束时间';
COMMENT ON COLUMN workflow_delegate."f_user_id" IS '委托人';
COMMENT ON COLUMN workflow_delegate."f_user_name" IS '委托人名称';
COMMENT ON COLUMN workflow_delegate."f_type" IS '委托类型（0-发起委托，1-审批委托）';
COMMENT ON COLUMN workflow_delegate."f_description" IS '描述或说明';
COMMENT ON COLUMN workflow_delegate."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN workflow_delegate."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_delegate."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_delegate."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_delegate."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_delegate."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_delegate."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_delegate."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_delegate."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_delegate."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_delegate_info
-- ----------------------------
CREATE TABLE workflow_delegate_info (
	"f_id" varchar(50) NOT NULL,
	"f_delegate_id" varchar(50) NOT NULL,
	"f_to_user_id" varchar(50),
	"f_to_user_name" varchar(50),
	"f_status" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_delegate_info IS '委托信息';
COMMENT ON COLUMN workflow_delegate_info."f_id" IS '主键';
COMMENT ON COLUMN workflow_delegate_info."f_delegate_id" IS '委托主键';
COMMENT ON COLUMN workflow_delegate_info."f_to_user_id" IS '被委托人id';
COMMENT ON COLUMN workflow_delegate_info."f_to_user_name" IS '被委托人';
COMMENT ON COLUMN workflow_delegate_info."f_status" IS '状态(0.待确认 1.已接受 2.已拒绝)';
COMMENT ON COLUMN workflow_delegate_info."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_delegate_info."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_delegate_info."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_delegate_info."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_delegate_info."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_delegate_info."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_delegate_info."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_delegate_info."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_delegate_info."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_form_relation
-- ----------------------------
CREATE TABLE workflow_form_relation (
	"f_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_form_id" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_form_relation IS '流程表单关联表';
COMMENT ON COLUMN workflow_form_relation."f_id" IS '主键';
COMMENT ON COLUMN workflow_form_relation."f_flow_id" IS '流程id';
COMMENT ON COLUMN workflow_form_relation."f_form_id" IS '表单id';
COMMENT ON COLUMN workflow_form_relation."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_form_relation."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_form_relation."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_form_relation."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_form_relation."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_form_relation."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_form_relation."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_form_relation."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_form_relation."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_launch_user
-- ----------------------------
CREATE TABLE workflow_launch_user (
	"f_id" varchar(50) NOT NULL,
	"f_organize_id" text,
	"f_position_id" text,
	"f_manager_id" varchar(50),
	"f_superior" varchar(50),
	"f_subordinate" text,
	"f_task_id" varchar(50),
	"f_department" text,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_launch_user IS '流程发起用户信息';
COMMENT ON COLUMN workflow_launch_user."f_id" IS '主键';
COMMENT ON COLUMN workflow_launch_user."f_organize_id" IS '组织主键';
COMMENT ON COLUMN workflow_launch_user."f_position_id" IS '岗位主键';
COMMENT ON COLUMN workflow_launch_user."f_manager_id" IS '主管主键';
COMMENT ON COLUMN workflow_launch_user."f_superior" IS '上级用户';
COMMENT ON COLUMN workflow_launch_user."f_subordinate" IS '下属用户';
COMMENT ON COLUMN workflow_launch_user."f_task_id" IS '任务主键';
COMMENT ON COLUMN workflow_launch_user."f_department" IS '公司下所有部门';
COMMENT ON COLUMN workflow_launch_user."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_launch_user."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_launch_user."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_launch_user."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_launch_user."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_launch_user."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_launch_user."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_launch_user."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_launch_user."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_node
-- ----------------------------
CREATE TABLE workflow_node (
	"f_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_form_id" varchar(50),
	"f_node_type" varchar(50),
	"f_node_code" varchar(50),
	"f_node_json" text,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_node IS '流程节点';
COMMENT ON COLUMN workflow_node."f_id" IS '主键';
COMMENT ON COLUMN workflow_node."f_flow_id" IS '流程版本主键';
COMMENT ON COLUMN workflow_node."f_form_id" IS '表单主键';
COMMENT ON COLUMN workflow_node."f_node_type" IS '节点类型';
COMMENT ON COLUMN workflow_node."f_node_code" IS '节点编码';
COMMENT ON COLUMN workflow_node."f_node_json" IS '节点属性';
COMMENT ON COLUMN workflow_node."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_node."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_node."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_node."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_node."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_node."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_node."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_node."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_node."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_node_record
-- ----------------------------
CREATE TABLE workflow_node_record (
	"f_id" varchar(50) NOT NULL,
	"f_task_id" varchar(50),
	"f_node_id" varchar(50),
	"f_node_code" varchar(50),
	"f_node_name" varchar(50),
	"f_node_status" int4,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_sort_code" int8

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_node_record IS '节点流转';
COMMENT ON COLUMN workflow_node_record."f_id" IS '主键';
COMMENT ON COLUMN workflow_node_record."f_task_id" IS '任务id';
COMMENT ON COLUMN workflow_node_record."f_node_id" IS '节点id';
COMMENT ON COLUMN workflow_node_record."f_node_code" IS '节点编码';
COMMENT ON COLUMN workflow_node_record."f_node_name" IS '节点名称';
COMMENT ON COLUMN workflow_node_record."f_node_status" IS '节点状态';
COMMENT ON COLUMN workflow_node_record."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_node_record."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_node_record."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_node_record."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_node_record."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_node_record."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_node_record."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_node_record."f_tenant_id" IS '租户id';
COMMENT ON COLUMN workflow_node_record."f_sort_code" IS '排序';
-- ----------------------------
-- 表名：workflow_operator
-- ----------------------------
CREATE TABLE workflow_operator (
	"f_id" varchar(50) NOT NULL,
	"f_node_name" varchar(50),
	"f_node_code" varchar(50),
	"f_task_id" varchar(50),
	"f_node_id" varchar(50),
	"f_parent_id" varchar(50),
	"f_handle_time" timestamp,
	"f_handle_id" varchar(50),
	"f_handle_all" text,
	"f_handle_status" int4,
	"f_handle_parameter" text,
	"f_start_handle_time" timestamp,
	"f_duedate" timestamp,
	"f_sign_time" timestamp,
	"f_status" int4,
	"f_instance_id" varchar(50),
	"f_engine_type" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_draft_data" text,
	"f_completion" int4,
	"f_is_processing" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_operator IS '流程经办';
COMMENT ON COLUMN workflow_operator."f_id" IS '自然主键';
COMMENT ON COLUMN workflow_operator."f_node_name" IS '节点名称';
COMMENT ON COLUMN workflow_operator."f_node_code" IS '节点编码';
COMMENT ON COLUMN workflow_operator."f_task_id" IS '任务id';
COMMENT ON COLUMN workflow_operator."f_node_id" IS '节点id（对应引擎的任务id）';
COMMENT ON COLUMN workflow_operator."f_parent_id" IS '加签经办父级id';
COMMENT ON COLUMN workflow_operator."f_handle_time" IS '处理时间';
COMMENT ON COLUMN workflow_operator."f_handle_id" IS '处理人id';
COMMENT ON COLUMN workflow_operator."f_handle_all" IS '全部处理人';
COMMENT ON COLUMN workflow_operator."f_handle_status" IS '处理状态';
COMMENT ON COLUMN workflow_operator."f_handle_parameter" IS '处理参数';
COMMENT ON COLUMN workflow_operator."f_start_handle_time" IS '开始处理时间';
COMMENT ON COLUMN workflow_operator."f_duedate" IS '截止时间';
COMMENT ON COLUMN workflow_operator."f_sign_time" IS '签收时间';
COMMENT ON COLUMN workflow_operator."f_status" IS '状态';
COMMENT ON COLUMN workflow_operator."f_instance_id" IS '流程引擎任务id';
COMMENT ON COLUMN workflow_operator."f_engine_type" IS '流程引擎类型;1.flowable,2,activity,3.canmda';
COMMENT ON COLUMN workflow_operator."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_operator."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_operator."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_operator."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_operator."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_operator."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_operator."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_operator."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_operator."f_tenant_id" IS '租户id';
COMMENT ON COLUMN workflow_operator."f_draft_data" IS '草稿数据';
COMMENT ON COLUMN workflow_operator."f_completion" IS '是否完成';
COMMENT ON COLUMN workflow_operator."f_is_processing" IS '是否办理节点(0否 1是)';
-- ----------------------------
-- 表名：workflow_record
-- ----------------------------
CREATE TABLE workflow_record (
	"f_id" varchar(50) NOT NULL,
	"f_task_id" varchar(50),
	"f_operator_id" varchar(50),
	"f_node_id" varchar(2000),
	"f_node_code" varchar(2000),
	"f_node_name" varchar(2000),
	"f_handle_type" int4,
	"f_handle_id" varchar(50),
	"f_handle_time" timestamp,
	"f_handle_opinion" varchar(500),
	"f_handle_user_id" varchar(4000),
	"f_sign_img" text,
	"f_file_list" text,
	"f_status" int4,
	"f_expand_field" text,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_record IS '流程记录';
COMMENT ON COLUMN workflow_record."f_id" IS '自然主键';
COMMENT ON COLUMN workflow_record."f_task_id" IS '任务主键';
COMMENT ON COLUMN workflow_record."f_operator_id" IS '经办主键';
COMMENT ON COLUMN workflow_record."f_node_id" IS '节点id';
COMMENT ON COLUMN workflow_record."f_node_code" IS '节点编号';
COMMENT ON COLUMN workflow_record."f_node_name" IS '节点名称';
COMMENT ON COLUMN workflow_record."f_handle_type" IS '经办类型';
COMMENT ON COLUMN workflow_record."f_handle_id" IS '经办人员';
COMMENT ON COLUMN workflow_record."f_handle_time" IS '经办时间';
COMMENT ON COLUMN workflow_record."f_handle_opinion" IS '经办理由';
COMMENT ON COLUMN workflow_record."f_handle_user_id" IS '流转操作人';
COMMENT ON COLUMN workflow_record."f_sign_img" IS '签名图片';
COMMENT ON COLUMN workflow_record."f_file_list" IS '经办文件';
COMMENT ON COLUMN workflow_record."f_status" IS '状态';
COMMENT ON COLUMN workflow_record."f_expand_field" IS '拓展字段';
COMMENT ON COLUMN workflow_record."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_record."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_record."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_record."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_record."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_record."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_record."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_record."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_record."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_reject_data
-- ----------------------------
CREATE TABLE workflow_reject_data (
	"f_id" varchar(50) NOT NULL,
	"f_task_json" text,
	"f_operator_json" text,
	"f_node_code" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_reject_data IS '冻结审批';
COMMENT ON COLUMN workflow_reject_data."f_id" IS '主键';
COMMENT ON COLUMN workflow_reject_data."f_task_json" IS '任务json';
COMMENT ON COLUMN workflow_reject_data."f_operator_json" IS '经办json';
COMMENT ON COLUMN workflow_reject_data."f_node_code" IS '节点编码';
COMMENT ON COLUMN workflow_reject_data."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_reject_data."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_reject_data."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_reject_data."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_reject_data."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_reject_data."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_reject_data."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_reject_data."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_reject_data."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_revoke
-- ----------------------------
CREATE TABLE workflow_revoke (
	"f_id" varchar(50) NOT NULL,
	"f_task_id" varchar(50),
	"f_revoke_task_id" varchar(50),
	"f_form_data" text,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_revoke IS '流程撤销';
COMMENT ON COLUMN workflow_revoke."f_id" IS '主键';
COMMENT ON COLUMN workflow_revoke."f_task_id" IS '任务主键';
COMMENT ON COLUMN workflow_revoke."f_revoke_task_id" IS '撤销任务主键';
COMMENT ON COLUMN workflow_revoke."f_form_data" IS '表单数据';
COMMENT ON COLUMN workflow_revoke."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_revoke."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_revoke."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_revoke."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_revoke."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_revoke."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_revoke."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_revoke."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_revoke."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_subtask_data
-- ----------------------------
CREATE TABLE workflow_subtask_data (
	"f_id" varchar(50) NOT NULL,
	"f_subtask_json" text,
	"f_parent_id" varchar(50),
	"f_node_code" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_subtask_data IS '子流程发起参数(依次发起)';
COMMENT ON COLUMN workflow_subtask_data."f_id" IS '主键';
COMMENT ON COLUMN workflow_subtask_data."f_subtask_json" IS '子流程发起参数';
COMMENT ON COLUMN workflow_subtask_data."f_parent_id" IS '父流程id';
COMMENT ON COLUMN workflow_subtask_data."f_node_code" IS '节点编码';
COMMENT ON COLUMN workflow_subtask_data."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_subtask_data."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_subtask_data."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_subtask_data."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_subtask_data."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_subtask_data."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_subtask_data."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_subtask_data."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_subtask_data."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_task
-- ----------------------------
CREATE TABLE workflow_task (
	"f_id" varchar(50) NOT NULL,
	"f_en_code" varchar(200),
	"f_full_name" varchar(200),
	"f_flow_name" varchar(200),
	"f_flow_code" varchar(200),
	"f_flow_category" varchar(50),
	"f_status" int4,
	"f_flow_type" int4,
	"f_flow_version" varchar(50),
	"f_is_async" int4,
	"f_sub_parameter" varchar(2000),
	"f_parent_id" varchar(50),
	"f_urgent" int4,
	"f_template_id" varchar(50),
	"f_flow_id" varchar(50),
	"f_instance_id" varchar(255),
	"f_engine_type" int4,
	"f_delegate_user_id" varchar(50),
	"f_start_time" timestamp,
	"f_end_time" timestamp,
	"f_current_node_name" varchar(2000),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_engine_id" varchar(50),
	"f_current_node_code" varchar(2000),
	"f_reject_data_id" varchar(50),
	"f_sub_code" varchar(50),
	"f_global_parameter" text,
	"f_his_status" int4,
	"f_restore" int4,
	"f_is_file" int4,
	"f_type" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_task IS '流程任务';
COMMENT ON COLUMN workflow_task."f_id" IS '主键';
COMMENT ON COLUMN workflow_task."f_en_code" IS '编号';
COMMENT ON COLUMN workflow_task."f_full_name" IS '标题';
COMMENT ON COLUMN workflow_task."f_flow_name" IS '流程名称';
COMMENT ON COLUMN workflow_task."f_flow_code" IS '流程编号';
COMMENT ON COLUMN workflow_task."f_flow_category" IS '流程分类';
COMMENT ON COLUMN workflow_task."f_status" IS '状态';
COMMENT ON COLUMN workflow_task."f_flow_type" IS '流程类型';
COMMENT ON COLUMN workflow_task."f_flow_version" IS '流程版本';
COMMENT ON COLUMN workflow_task."f_is_async" IS '同步异步（0：同步，1：异步）';
COMMENT ON COLUMN workflow_task."f_sub_parameter" IS '子流程参数';
COMMENT ON COLUMN workflow_task."f_parent_id" IS '父级实例id';
COMMENT ON COLUMN workflow_task."f_urgent" IS '紧急程度';
COMMENT ON COLUMN workflow_task."f_template_id" IS '流程主键';
COMMENT ON COLUMN workflow_task."f_flow_id" IS '流程版本主键';
COMMENT ON COLUMN workflow_task."f_instance_id" IS '流程引擎实例id';
COMMENT ON COLUMN workflow_task."f_engine_type" IS '流程引擎类型;1.flowable,2,activity,3.canmda';
COMMENT ON COLUMN workflow_task."f_delegate_user_id" IS '委托用户';
COMMENT ON COLUMN workflow_task."f_start_time" IS '开始时间';
COMMENT ON COLUMN workflow_task."f_end_time" IS '结束时间';
COMMENT ON COLUMN workflow_task."f_current_node_name" IS '当前节点名称';
COMMENT ON COLUMN workflow_task."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_task."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_task."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_task."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_task."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_task."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_task."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_task."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_task."f_tenant_id" IS '租户id';
COMMENT ON COLUMN workflow_task."f_engine_id" IS '流程引擎id';
COMMENT ON COLUMN workflow_task."f_current_node_code" IS '当前节点编码';
COMMENT ON COLUMN workflow_task."f_reject_data_id" IS '冻结审批';
COMMENT ON COLUMN workflow_task."f_sub_code" IS '子流程节点编码';
COMMENT ON COLUMN workflow_task."f_global_parameter" IS '全局参数';
COMMENT ON COLUMN workflow_task."f_his_status" IS '历史状态';
COMMENT ON COLUMN workflow_task."f_restore" IS '是否能恢复（0：能，1：不能）';
COMMENT ON COLUMN workflow_task."f_is_file" IS '是否归档（null：未配置，0：未归档，1：已归档）';
COMMENT ON COLUMN workflow_task."f_type" IS '类型(0-功能 1-发起)';
-- ----------------------------
-- 表名：workflow_task_line
-- ----------------------------
CREATE TABLE workflow_task_line (
	"f_id" varchar(50) NOT NULL,
	"f_task_id" varchar(50),
	"f_line_key" varchar(50),
	"f_line_value" varchar(50),
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_task_line IS '任务条件';
COMMENT ON COLUMN workflow_task_line."f_id" IS '主键';
COMMENT ON COLUMN workflow_task_line."f_task_id" IS '任务主键';
COMMENT ON COLUMN workflow_task_line."f_line_key" IS '线的键';
COMMENT ON COLUMN workflow_task_line."f_line_value" IS '线的值';
COMMENT ON COLUMN workflow_task_line."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_task_line."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_task_line."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_task_line."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_task_line."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_task_line."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_task_line."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_task_line."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_task_line."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_template
-- ----------------------------
CREATE TABLE workflow_template (
	"f_id" varchar(50) NOT NULL,
	"f_flow_id" varchar(50),
	"f_version" varchar(50),
	"f_en_code" varchar(200),
	"f_full_name" varchar(200),
	"f_type" int4,
	"f_category" varchar(50),
	"f_icon" varchar(50),
	"f_icon_background" varchar(50),
	"f_configuration" text,
	"f_activiti_id" varchar(50),
	"f_flowable_id" varchar(50),
	"f_camunda_id" varchar(50),
	"f_description" varchar(500),
	"f_enabled_mark" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0',
	"f_visible_type" int4,
	"f_flow_config" text,
	"f_show_type" int4,
	"f_status" int4

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_template IS '流程定义';
COMMENT ON COLUMN workflow_template."f_id" IS '自然主键';
COMMENT ON COLUMN workflow_template."f_flow_id" IS '流程主版本id';
COMMENT ON COLUMN workflow_template."f_version" IS '流程主版本';
COMMENT ON COLUMN workflow_template."f_en_code" IS '流程编码';
COMMENT ON COLUMN workflow_template."f_full_name" IS '流程名称';
COMMENT ON COLUMN workflow_template."f_type" IS '流程类型';
COMMENT ON COLUMN workflow_template."f_category" IS '流程分类';
COMMENT ON COLUMN workflow_template."f_icon" IS '图标';
COMMENT ON COLUMN workflow_template."f_icon_background" IS '图标背景色';
COMMENT ON COLUMN workflow_template."f_configuration" IS '流程参数设置';
COMMENT ON COLUMN workflow_template."f_activiti_id" IS 'activiti部署id';
COMMENT ON COLUMN workflow_template."f_flowable_id" IS 'flowable部署id';
COMMENT ON COLUMN workflow_template."f_camunda_id" IS 'camunda部署id';
COMMENT ON COLUMN workflow_template."f_description" IS '描述或说明';
COMMENT ON COLUMN workflow_template."f_enabled_mark" IS '有效标志(0-禁用，1-启用)';
COMMENT ON COLUMN workflow_template."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_template."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_template."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_template."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_template."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_template."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_template."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_template."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_template."f_tenant_id" IS '租户id';
COMMENT ON COLUMN workflow_template."f_visible_type" IS '流程权限（1全局  2权限）';
COMMENT ON COLUMN workflow_template."f_flow_config" IS '流程设置';
COMMENT ON COLUMN workflow_template."f_show_type" IS '流程显示类型（0-全局 1-流程 2-菜单）';
COMMENT ON COLUMN workflow_template."f_status" IS '状态(0.未上架,1.上架,2.下架-继续审批，3.下架-隐藏审批)';
-- ----------------------------
-- 表名：workflow_trigger_record
-- ----------------------------
CREATE TABLE workflow_trigger_record (
	"f_id" varchar(50) NOT NULL,
	"f_trigger_id" varchar(50),
	"f_task_id" varchar(50),
	"f_node_id" varchar(50),
	"f_node_code" varchar(50),
	"f_node_name" varchar(50),
	"f_start_time" timestamp,
	"f_end_time" timestamp,
	"f_status" int4,
	"f_error_tip" varchar(500),
	"f_error_data" text,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_trigger_record IS '触发记录';
COMMENT ON COLUMN workflow_trigger_record."f_id" IS '自然主键';
COMMENT ON COLUMN workflow_trigger_record."f_trigger_id" IS '触发主键';
COMMENT ON COLUMN workflow_trigger_record."f_task_id" IS '标准任务主键';
COMMENT ON COLUMN workflow_trigger_record."f_node_id" IS '节点id';
COMMENT ON COLUMN workflow_trigger_record."f_node_code" IS '节点编号';
COMMENT ON COLUMN workflow_trigger_record."f_node_name" IS '节点名称';
COMMENT ON COLUMN workflow_trigger_record."f_start_time" IS '开始时间';
COMMENT ON COLUMN workflow_trigger_record."f_end_time" IS '结束时间';
COMMENT ON COLUMN workflow_trigger_record."f_status" IS '状态（0-通过 1-异常）';
COMMENT ON COLUMN workflow_trigger_record."f_error_tip" IS '错误提示';
COMMENT ON COLUMN workflow_trigger_record."f_error_data" IS '错误数据';
COMMENT ON COLUMN workflow_trigger_record."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_trigger_record."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_trigger_record."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_trigger_record."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_trigger_record."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_trigger_record."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_trigger_record."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_trigger_record."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_trigger_record."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_trigger_task
-- ----------------------------
CREATE TABLE workflow_trigger_task (
	"f_id" varchar(50) NOT NULL,
	"f_full_name" varchar(50),
	"f_parent_time" timestamp,
	"f_parent_id" varchar(50),
	"f_task_id" varchar(50),
	"f_node_code" varchar(50),
	"f_node_id" varchar(50),
	"f_is_async" int4,
	"f_start_time" timestamp,
	"f_flow_id" varchar(50),
	"f_data" text,
	"f_data_id" varchar(50),
	"f_instance_id" varchar(50),
	"f_engine_type" int4,
	"f_status" int4,
	"f_sort_code" int8,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_trigger_task IS '触发任务';
COMMENT ON COLUMN workflow_trigger_task."f_id" IS '自然主键';
COMMENT ON COLUMN workflow_trigger_task."f_full_name" IS '任务名称';
COMMENT ON COLUMN workflow_trigger_task."f_parent_time" IS '重试任务开始时间';
COMMENT ON COLUMN workflow_trigger_task."f_parent_id" IS '重试任务主键id';
COMMENT ON COLUMN workflow_trigger_task."f_task_id" IS '标准任务主键';
COMMENT ON COLUMN workflow_trigger_task."f_node_code" IS '节点编码';
COMMENT ON COLUMN workflow_trigger_task."f_node_id" IS '节点id';
COMMENT ON COLUMN workflow_trigger_task."f_is_async" IS '0-同步 1-异步';
COMMENT ON COLUMN workflow_trigger_task."f_start_time" IS '开始时间';
COMMENT ON COLUMN workflow_trigger_task."f_flow_id" IS '模板id';
COMMENT ON COLUMN workflow_trigger_task."f_data" IS '数据';
COMMENT ON COLUMN workflow_trigger_task."f_data_id" IS '数据主键';
COMMENT ON COLUMN workflow_trigger_task."f_instance_id" IS '引擎主键';
COMMENT ON COLUMN workflow_trigger_task."f_engine_type" IS '流程引擎类型;1.flowable,2,activity,3.canmda';
COMMENT ON COLUMN workflow_trigger_task."f_status" IS '状态(0-进行中 1-通过 2-异常 3-终止)';
COMMENT ON COLUMN workflow_trigger_task."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_trigger_task."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_trigger_task."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_trigger_task."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_trigger_task."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_trigger_task."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_trigger_task."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_trigger_task."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_trigger_task."f_tenant_id" IS '租户id';
-- ----------------------------
-- 表名：workflow_version
-- ----------------------------
CREATE TABLE workflow_version (
	"f_id" varchar(50) NOT NULL,
	"f_template_id" varchar(50),
	"f_flowable_id" varchar(50),
	"f_activiti_id" varchar(50),
	"f_camunda_id" varchar(50),
	"f_version" varchar(50),
	"f_xml" text,
	"f_status" int4,
	"f_sort_code" int8,
	"f_send_config_ids" text,
	"f_creator_time" timestamp,
	"f_creator_user_id" varchar(50),
	"f_last_modify_time" timestamp,
	"f_last_modify_user_id" varchar(50),
	"f_delete_time" timestamp,
	"f_delete_user_id" varchar(50),
	"f_delete_mark" int4,
	"f_tenant_id" varchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
COMMENT ON TABLE workflow_version IS '流程定义版本';
COMMENT ON COLUMN workflow_version."f_id" IS '自然主键';
COMMENT ON COLUMN workflow_version."f_template_id" IS '流程定义主键';
COMMENT ON COLUMN workflow_version."f_flowable_id" IS 'flowable部署id';
COMMENT ON COLUMN workflow_version."f_activiti_id" IS 'activiti部署id';
COMMENT ON COLUMN workflow_version."f_camunda_id" IS 'camunda部署id';
COMMENT ON COLUMN workflow_version."f_version" IS '流程版本';
COMMENT ON COLUMN workflow_version."f_xml" IS '流程xml';
COMMENT ON COLUMN workflow_version."f_status" IS '状态(0.设计,1.启用,2.历史)';
COMMENT ON COLUMN workflow_version."f_sort_code" IS '排序';
COMMENT ON COLUMN workflow_version."f_send_config_ids" IS '消息配置id';
COMMENT ON COLUMN workflow_version."f_creator_time" IS '创建时间';
COMMENT ON COLUMN workflow_version."f_creator_user_id" IS '创建用户';
COMMENT ON COLUMN workflow_version."f_last_modify_time" IS '修改时间';
COMMENT ON COLUMN workflow_version."f_last_modify_user_id" IS '修改用户';
COMMENT ON COLUMN workflow_version."f_delete_time" IS '删除时间';
COMMENT ON COLUMN workflow_version."f_delete_user_id" IS '删除用户';
COMMENT ON COLUMN workflow_version."f_delete_mark" IS '删除标志';
COMMENT ON COLUMN workflow_version."f_tenant_id" IS '租户id';


INSERT INTO base_advanced_query_scheme SELECT * FROM ${dbName}.base_advanced_query_scheme where f_tenant_id = '0';
INSERT INTO base_app_data SELECT * FROM ${dbName}.base_app_data where f_tenant_id = '0';
INSERT INTO base_authorize SELECT * FROM ${dbName}.base_authorize where f_tenant_id = '0';
INSERT INTO base_bill_num SELECT * FROM ${dbName}.base_bill_num where f_tenant_id = '0';
INSERT INTO base_bill_rule SELECT * FROM ${dbName}.base_bill_rule where f_tenant_id = '0';
INSERT INTO base_columns_purview SELECT * FROM ${dbName}.base_columns_purview where f_tenant_id = '0';
INSERT INTO base_common_fields SELECT * FROM ${dbName}.base_common_fields where f_tenant_id = '0';
INSERT INTO base_common_words SELECT * FROM ${dbName}.base_common_words where f_tenant_id = '0';
INSERT INTO base_data_interface SELECT * FROM ${dbName}.base_data_interface where f_tenant_id = '0';
INSERT INTO base_data_interface_log SELECT * FROM ${dbName}.base_data_interface_log where f_tenant_id = '0';
INSERT INTO base_data_interface_oauth SELECT * FROM ${dbName}.base_data_interface_oauth where f_tenant_id = '0';
INSERT INTO base_data_interface_user SELECT * FROM ${dbName}.base_data_interface_user where f_tenant_id = '0';
INSERT INTO base_data_interface_variate SELECT * FROM ${dbName}.base_data_interface_variate where f_tenant_id = '0';
INSERT INTO base_data_set SELECT * FROM ${dbName}.base_data_set where f_tenant_id = '0';
INSERT INTO base_db_link SELECT * FROM ${dbName}.base_db_link where f_tenant_id = '0';
INSERT INTO base_dictionary_data SELECT * FROM ${dbName}.base_dictionary_data where f_tenant_id = '0';
INSERT INTO base_dictionary_type SELECT * FROM ${dbName}.base_dictionary_type where f_tenant_id = '0';
INSERT INTO base_file SELECT * FROM ${dbName}.base_file where f_tenant_id = '0';
INSERT INTO base_group SELECT * FROM ${dbName}.base_group where f_tenant_id = '0';
INSERT INTO base_im_content SELECT * FROM ${dbName}.base_im_content where f_tenant_id = '0';
INSERT INTO base_im_reply SELECT * FROM ${dbName}.base_im_reply where f_tenant_id = '0';
INSERT INTO base_integrate SELECT * FROM ${dbName}.base_integrate where f_tenant_id = '0';
INSERT INTO base_integrate_node SELECT * FROM ${dbName}.base_integrate_node where f_tenant_id = '0';
INSERT INTO base_integrate_queue SELECT * FROM ${dbName}.base_integrate_queue where f_tenant_id = '0';
INSERT INTO base_integrate_task SELECT * FROM ${dbName}.base_integrate_task where f_tenant_id = '0';
INSERT INTO base_language SELECT * FROM ${dbName}.base_language where f_tenant_id = '0';
INSERT INTO base_message SELECT * FROM ${dbName}.base_message where f_tenant_id = '0';
INSERT INTO base_module SELECT * FROM ${dbName}.base_module where f_tenant_id = '0';
INSERT INTO base_module_authorize SELECT * FROM ${dbName}.base_module_authorize where f_tenant_id = '0';
INSERT INTO base_module_button SELECT * FROM ${dbName}.base_module_button where f_tenant_id = '0';
INSERT INTO base_module_column SELECT * FROM ${dbName}.base_module_column where f_tenant_id = '0';
INSERT INTO base_module_data SELECT * FROM ${dbName}.base_module_data where f_tenant_id = '0';
INSERT INTO base_module_form SELECT * FROM ${dbName}.base_module_form where f_tenant_id = '0';
INSERT INTO base_module_link SELECT * FROM ${dbName}.base_module_link where f_tenant_id = '0';
INSERT INTO base_module_scheme SELECT * FROM ${dbName}.base_module_scheme where f_tenant_id = '0';
INSERT INTO base_msg_account SELECT * FROM ${dbName}.base_msg_account where f_tenant_id = '0';
INSERT INTO base_msg_monitor SELECT * FROM ${dbName}.base_msg_monitor where f_tenant_id = '0';
INSERT INTO base_msg_send SELECT * FROM ${dbName}.base_msg_send where f_tenant_id = '0';
INSERT INTO base_msg_send_template SELECT * FROM ${dbName}.base_msg_send_template where f_tenant_id = '0';
INSERT INTO base_msg_short_link SELECT * FROM ${dbName}.base_msg_short_link where f_tenant_id = '0';
INSERT INTO base_msg_sms_field SELECT * FROM ${dbName}.base_msg_sms_field where f_tenant_id = '0';
INSERT INTO base_msg_template SELECT * FROM ${dbName}.base_msg_template where f_tenant_id = '0';
INSERT INTO base_msg_template_param SELECT * FROM ${dbName}.base_msg_template_param where f_tenant_id = '0';
INSERT INTO base_msg_wechat_user SELECT * FROM ${dbName}.base_msg_wechat_user where f_tenant_id = '0';
INSERT INTO base_notice SELECT * FROM ${dbName}.base_notice where f_tenant_id = '0';
INSERT INTO base_organize SELECT * FROM ${dbName}.base_organize where f_tenant_id = '0';
INSERT INTO base_organize_administrator SELECT * FROM ${dbName}.base_organize_administrator where f_tenant_id = '0';
INSERT INTO base_organize_relation SELECT * FROM ${dbName}.base_organize_relation where f_tenant_id = '0';
INSERT INTO base_permission_group SELECT * FROM ${dbName}.base_permission_group where f_tenant_id = '0';
INSERT INTO base_portal SELECT * FROM ${dbName}.base_portal where f_tenant_id = '0';
INSERT INTO base_portal_data SELECT * FROM ${dbName}.base_portal_data where f_tenant_id = '0';
INSERT INTO base_portal_manage SELECT * FROM ${dbName}.base_portal_manage where f_tenant_id = '0';
INSERT INTO base_position SELECT * FROM ${dbName}.base_position where f_tenant_id = '0';
INSERT INTO base_print_log SELECT * FROM ${dbName}.base_print_log where f_tenant_id = '0';
INSERT INTO base_print_template SELECT * FROM ${dbName}.base_print_template where f_tenant_id = '0';
INSERT INTO base_print_version SELECT * FROM ${dbName}.base_print_version where f_tenant_id = '0';
INSERT INTO base_province SELECT * FROM ${dbName}.base_province where f_tenant_id = '0';
INSERT INTO base_province_atlas SELECT * FROM ${dbName}.base_province_atlas where f_tenant_id = '0';
INSERT INTO base_role SELECT * FROM ${dbName}.base_role where f_tenant_id = '0';
INSERT INTO base_schedule SELECT * FROM ${dbName}.base_schedule where f_tenant_id = '0';
INSERT INTO base_schedule_log SELECT * FROM ${dbName}.base_schedule_log where f_tenant_id = '0';
INSERT INTO base_schedule_user SELECT * FROM ${dbName}.base_schedule_user where f_tenant_id = '0';
INSERT INTO base_sign_img SELECT * FROM ${dbName}.base_sign_img where f_tenant_id = '0';
INSERT INTO base_signature SELECT * FROM ${dbName}.base_signature where f_tenant_id = '0';
INSERT INTO base_signature_user SELECT * FROM ${dbName}.base_signature_user where f_tenant_id = '0';
INSERT INTO base_socials_users SELECT * FROM ${dbName}.base_socials_users where f_tenant_id = '0';
INSERT INTO base_syn_third_info SELECT * FROM ${dbName}.base_syn_third_info where f_tenant_id = '0';
INSERT INTO base_sys_config SELECT * FROM ${dbName}.base_sys_config where f_tenant_id = '0';
INSERT INTO base_sys_log SELECT * FROM ${dbName}.base_sys_log where f_tenant_id = '0';
INSERT INTO base_system SELECT * FROM ${dbName}.base_system where f_tenant_id = '0';
INSERT INTO base_time_task SELECT * FROM ${dbName}.base_time_task where f_tenant_id = '0';
INSERT INTO base_time_task_log SELECT * FROM ${dbName}.base_time_task_log where f_tenant_id = '0';
INSERT INTO base_user SELECT * FROM ${dbName}.base_user where f_tenant_id = '0';
INSERT INTO base_user_device SELECT * FROM ${dbName}.base_user_device where f_tenant_id = '0';
INSERT INTO base_user_old_password SELECT * FROM ${dbName}.base_user_old_password where f_tenant_id = '0';
INSERT INTO base_user_relation SELECT * FROM ${dbName}.base_user_relation where f_tenant_id = '0';
INSERT INTO base_visual_alias SELECT * FROM ${dbName}.base_visual_alias where f_tenant_id = '0';
INSERT INTO base_visual_dev SELECT * FROM ${dbName}.base_visual_dev where f_tenant_id = '0';
INSERT INTO base_visual_filter SELECT * FROM ${dbName}.base_visual_filter where f_tenant_id = '0';
INSERT INTO base_visual_kit SELECT * FROM ${dbName}.base_visual_kit where f_tenant_id = '0';
INSERT INTO base_visual_link SELECT * FROM ${dbName}.base_visual_link where f_tenant_id = '0';
INSERT INTO base_visual_log SELECT * FROM ${dbName}.base_visual_log where f_tenant_id = '0';
INSERT INTO base_visual_personal SELECT * FROM ${dbName}.base_visual_personal where f_tenant_id = '0';
INSERT INTO base_visual_release SELECT * FROM ${dbName}.base_visual_release where f_tenant_id = '0';
INSERT INTO blade_visual SELECT * FROM ${dbName}.blade_visual where f_tenant_id = '0';
INSERT INTO blade_visual_assets SELECT * FROM ${dbName}.blade_visual_assets where f_tenant_id = '0';
INSERT INTO blade_visual_category SELECT * FROM ${dbName}.blade_visual_category where f_tenant_id = '0';
INSERT INTO blade_visual_component SELECT * FROM ${dbName}.blade_visual_component where f_tenant_id = '0';
INSERT INTO blade_visual_config SELECT * FROM ${dbName}.blade_visual_config where f_tenant_id = '0';
INSERT INTO blade_visual_db SELECT * FROM ${dbName}.blade_visual_db where f_tenant_id = '0';
INSERT INTO blade_visual_glob SELECT * FROM ${dbName}.blade_visual_glob where f_tenant_id = '0';
INSERT INTO blade_visual_map SELECT * FROM ${dbName}.blade_visual_map where f_tenant_id = '0';
INSERT INTO blade_visual_record SELECT * FROM ${dbName}.blade_visual_record where f_tenant_id = '0';
INSERT INTO ct293714178055641925 SELECT * FROM ${dbName}.ct293714178055641925 where f_tenant_id = '0';
INSERT INTO ct294012196562705414 SELECT * FROM ${dbName}.ct294012196562705414 where f_tenant_id = '0';
INSERT INTO ct294022926200511493 SELECT * FROM ${dbName}.ct294022926200511493 where f_tenant_id = '0';
INSERT INTO ct294031961024928774 SELECT * FROM ${dbName}.ct294031961024928774 where f_tenant_id = '0';
INSERT INTO ct294031961024928775 SELECT * FROM ${dbName}.ct294031961024928775 where f_tenant_id = '0';
INSERT INTO ct294037561750363142 SELECT * FROM ${dbName}.ct294037561750363142 where f_tenant_id = '0';
INSERT INTO ct294037561750363143 SELECT * FROM ${dbName}.ct294037561750363143 where f_tenant_id = '0';
INSERT INTO ct294099893327272966 SELECT * FROM ${dbName}.ct294099893327272966 where f_tenant_id = '0';
INSERT INTO ct294376098702073542 SELECT * FROM ${dbName}.ct294376098702073542 where f_tenant_id = '0';
INSERT INTO ct294382866144468678 SELECT * FROM ${dbName}.ct294382866144468678 where f_tenant_id = '0';
INSERT INTO ct395899726056134917 SELECT * FROM ${dbName}.ct395899726056134917 where f_tenant_id = '0';
INSERT INTO ct469496947162544645 SELECT * FROM ${dbName}.ct469496947162544645 where f_tenant_id = '0';
INSERT INTO ct469499339585157637 SELECT * FROM ${dbName}.ct469499339585157637 where f_tenant_id = '0';
INSERT INTO ct585077626071155013 SELECT * FROM ${dbName}.ct585077626071155013 where f_tenant_id = '0';
INSERT INTO ct585113061728190981 SELECT * FROM ${dbName}.ct585113061728190981 where f_tenant_id = '0';
INSERT INTO ct585113061732385285 SELECT * FROM ${dbName}.ct585113061732385285 where f_tenant_id = '0';
INSERT INTO ct585115948990595589 SELECT * FROM ${dbName}.ct585115948990595589 where f_tenant_id = '0';
INSERT INTO ct585115958725575173 SELECT * FROM ${dbName}.ct585115958725575173 where f_tenant_id = '0';
INSERT INTO ct585115958725575174 SELECT * FROM ${dbName}.ct585115958725575174 where f_tenant_id = '0';
INSERT INTO data_report SELECT * FROM ${dbName}.data_report where f_tenant_id = '0';
INSERT INTO ext_big_data SELECT * FROM ${dbName}.ext_big_data where f_tenant_id = '0';
INSERT INTO ext_customer SELECT * FROM ${dbName}.ext_customer where f_tenant_id = '0';
INSERT INTO ext_document SELECT * FROM ${dbName}.ext_document where f_tenant_id = '0';
INSERT INTO ext_document_log SELECT * FROM ${dbName}.ext_document_log where f_tenant_id = '0';
INSERT INTO ext_document_share SELECT * FROM ${dbName}.ext_document_share where f_tenant_id = '0';
INSERT INTO ext_email_config SELECT * FROM ${dbName}.ext_email_config where f_tenant_id = '0';
INSERT INTO ext_email_receive SELECT * FROM ${dbName}.ext_email_receive where f_tenant_id = '0';
INSERT INTO ext_email_send SELECT * FROM ${dbName}.ext_email_send where f_tenant_id = '0';
INSERT INTO ext_employee SELECT * FROM ${dbName}.ext_employee where f_tenant_id = '0';
INSERT INTO ext_order SELECT * FROM ${dbName}.ext_order where f_tenant_id = '0';
INSERT INTO ext_order_2 SELECT * FROM ${dbName}.ext_order_2 where f_tenant_id = '0';
INSERT INTO ext_order_entry SELECT * FROM ${dbName}.ext_order_entry where f_tenant_id = '0';
INSERT INTO ext_order_entry_2 SELECT * FROM ${dbName}.ext_order_entry_2 where f_tenant_id = '0';
INSERT INTO ext_order_receivable SELECT * FROM ${dbName}.ext_order_receivable where f_tenant_id = '0';
INSERT INTO ext_order_receivable_2 SELECT * FROM ${dbName}.ext_order_receivable_2 where f_tenant_id = '0';
INSERT INTO ext_product SELECT * FROM ${dbName}.ext_product where f_tenant_id = '0';
INSERT INTO ext_product_classify SELECT * FROM ${dbName}.ext_product_classify where f_tenant_id = '0';
INSERT INTO ext_product_entry SELECT * FROM ${dbName}.ext_product_entry where f_tenant_id = '0';
INSERT INTO ext_product_goods SELECT * FROM ${dbName}.ext_product_goods where f_tenant_id = '0';
INSERT INTO ext_project_gantt SELECT * FROM ${dbName}.ext_project_gantt where f_tenant_id = '0';
INSERT INTO ext_table_example SELECT * FROM ${dbName}.ext_table_example where f_tenant_id = '0';
INSERT INTO ext_work_log SELECT * FROM ${dbName}.ext_work_log where f_tenant_id = '0';
INSERT INTO ext_work_log_share SELECT * FROM ${dbName}.ext_work_log_share where f_tenant_id = '0';
INSERT INTO mt293714178051447621 SELECT * FROM ${dbName}.mt293714178051447621 where f_tenant_id = '0';
INSERT INTO mt293732572561709893 SELECT * FROM ${dbName}.mt293732572561709893 where f_tenant_id = '0';
INSERT INTO mt293737725377420101 SELECT * FROM ${dbName}.mt293737725377420101 where f_tenant_id = '0';
INSERT INTO mt293740367726025541 SELECT * FROM ${dbName}.mt293740367726025541 where f_tenant_id = '0';
INSERT INTO mt293756710756064069 SELECT * FROM ${dbName}.mt293756710756064069 where f_tenant_id = '0';
INSERT INTO mt294012196562705413 SELECT * FROM ${dbName}.mt294012196562705413 where f_tenant_id = '0';
INSERT INTO mt294022926196317189 SELECT * FROM ${dbName}.mt294022926196317189 where f_tenant_id = '0';
INSERT INTO mt294027801932110853 SELECT * FROM ${dbName}.mt294027801932110853 where f_tenant_id = '0';
INSERT INTO mt294031961024928773 SELECT * FROM ${dbName}.mt294031961024928773 where f_tenant_id = '0';
INSERT INTO mt294037561750363141 SELECT * FROM ${dbName}.mt294037561750363141 where f_tenant_id = '0';
INSERT INTO mt294090217118276613 SELECT * FROM ${dbName}.mt294090217118276613 where f_tenant_id = '0';
INSERT INTO mt294099237023526085 SELECT * FROM ${dbName}.mt294099237023526085 where f_tenant_id = '0';
INSERT INTO mt294099893327272965 SELECT * FROM ${dbName}.mt294099893327272965 where f_tenant_id = '0';
INSERT INTO mt294104577349819397 SELECT * FROM ${dbName}.mt294104577349819397 where f_tenant_id = '0';
INSERT INTO mt294376098702073541 SELECT * FROM ${dbName}.mt294376098702073541 where f_tenant_id = '0';
INSERT INTO mt294382866144468677 SELECT * FROM ${dbName}.mt294382866144468677 where f_tenant_id = '0';
INSERT INTO mt382811547782648325 SELECT * FROM ${dbName}.mt382811547782648325 where f_tenant_id = '0';
INSERT INTO mt385453315686752389 SELECT * FROM ${dbName}.mt385453315686752389 where f_tenant_id = '0';
INSERT INTO mt395179351563312389 SELECT * FROM ${dbName}.mt395179351563312389 where f_tenant_id = '0';
INSERT INTO mt395899725691230469 SELECT * FROM ${dbName}.mt395899725691230469 where f_tenant_id = '0';
INSERT INTO mt395964134161651973 SELECT * FROM ${dbName}.mt395964134161651973 where f_tenant_id = '0';
INSERT INTO mt400655094485373381 SELECT * FROM ${dbName}.mt400655094485373381 where f_tenant_id = '0';
INSERT INTO mt420589912199274117 SELECT * FROM ${dbName}.mt420589912199274117 where f_tenant_id = '0';
INSERT INTO mt456990191458975685 SELECT * FROM ${dbName}.mt456990191458975685 where f_tenant_id = '0';
INSERT INTO mt469496947087047173 SELECT * FROM ${dbName}.mt469496947087047173 where f_tenant_id = '0';
INSERT INTO mt469499339534825989 SELECT * FROM ${dbName}.mt469499339534825989 where f_tenant_id = '0';
INSERT INTO mt469502670336489989 SELECT * FROM ${dbName}.mt469502670336489989 where f_tenant_id = '0';
INSERT INTO mt470888132380721605 SELECT * FROM ${dbName}.mt470888132380721605 where f_tenant_id = '0';
INSERT INTO mt470913062111543749 SELECT * FROM ${dbName}.mt470913062111543749 where f_tenant_id = '0';
INSERT INTO mt470929966582727173 SELECT * FROM ${dbName}.mt470929966582727173 where f_tenant_id = '0';
INSERT INTO mt517668914876910661 SELECT * FROM ${dbName}.mt517668914876910661 where f_tenant_id = '0';
INSERT INTO mt585077626008240453 SELECT * FROM ${dbName}.mt585077626008240453 where f_tenant_id = '0';
INSERT INTO mt585113061585584645 SELECT * FROM ${dbName}.mt585113061585584645 where f_tenant_id = '0';
INSERT INTO mt585115948944458245 SELECT * FROM ${dbName}.mt585115948944458245 where f_tenant_id = '0';
INSERT INTO mt585115958712992261 SELECT * FROM ${dbName}.mt585115958712992261 where f_tenant_id = '0';
INSERT INTO mt585385026032501317 SELECT * FROM ${dbName}.mt585385026032501317 where f_tenant_id = '0';
INSERT INTO mt585398421410546245 SELECT * FROM ${dbName}.mt585398421410546245 where f_tenant_id = '0';
INSERT INTO mt585441085065528069 SELECT * FROM ${dbName}.mt585441085065528069 where f_tenant_id = '0';
INSERT INTO mt585441095630979845 SELECT * FROM ${dbName}.mt585441095630979845 where f_tenant_id = '0';
INSERT INTO mt585484941698007941 SELECT * FROM ${dbName}.mt585484941698007941 where f_tenant_id = '0';
INSERT INTO mt585806222716830853 SELECT * FROM ${dbName}.mt585806222716830853 where f_tenant_id = '0';
INSERT INTO mt585825608643118213 SELECT * FROM ${dbName}.mt585825608643118213 where f_tenant_id = '0';
INSERT INTO mt585831812765320325 SELECT * FROM ${dbName}.mt585831812765320325 where f_tenant_id = '0';
INSERT INTO mt623163332936859845 SELECT * FROM ${dbName}.mt623163332936859845 where f_tenant_id = '0';
INSERT INTO mt623163941190631621 SELECT * FROM ${dbName}.mt623163941190631621 where f_tenant_id = '0';
INSERT INTO mt623183981692584133 SELECT * FROM ${dbName}.mt623183981692584133 where f_tenant_id = '0';
INSERT INTO mt623417550885093381 SELECT * FROM ${dbName}.mt623417550885093381 where f_tenant_id = '0';
INSERT INTO mt623425084727492613 SELECT * FROM ${dbName}.mt623425084727492613 where f_tenant_id = '0';
INSERT INTO mt624164005967037317 SELECT * FROM ${dbName}.mt624164005967037317 where f_tenant_id = '0';
INSERT INTO mt624165616286172037 SELECT * FROM ${dbName}.mt624165616286172037 where f_tenant_id = '0';
INSERT INTO report_charts SELECT * FROM ${dbName}.report_charts where f_tenant_id = '0';
INSERT INTO report_department SELECT * FROM ${dbName}.report_department where f_tenant_id = '0';
INSERT INTO report_template SELECT * FROM ${dbName}.report_template where f_tenant_id = '0';
INSERT INTO report_user SELECT * FROM ${dbName}.report_user where f_tenant_id = '0';
INSERT INTO report_version SELECT * FROM ${dbName}.report_version where f_tenant_id = '0';
INSERT INTO test_carapplication SELECT * FROM ${dbName}.test_carapplication where f_tenant_id = '0';
INSERT INTO test_cost SELECT * FROM ${dbName}.test_cost where f_tenant_id = '0';
INSERT INTO test_customer SELECT * FROM ${dbName}.test_customer where f_tenant_id = '0';
INSERT INTO test_details SELECT * FROM ${dbName}.test_details where f_tenant_id = '0';
INSERT INTO test_position SELECT * FROM ${dbName}.test_position where f_tenant_id = '0';
INSERT INTO test_projects SELECT * FROM ${dbName}.test_projects where f_tenant_id = '0';
INSERT INTO test_purchase SELECT * FROM ${dbName}.test_purchase where f_tenant_id = '0';
INSERT INTO test_purchase_form SELECT * FROM ${dbName}.test_purchase_form where f_tenant_id = '0';
INSERT INTO test_purchase_form_order SELECT * FROM ${dbName}.test_purchase_form_order where f_tenant_id = '0';
INSERT INTO test_purchaseorder SELECT * FROM ${dbName}.test_purchaseorder where f_tenant_id = '0';
INSERT INTO test_receivable SELECT * FROM ${dbName}.test_receivable where f_tenant_id = '0';
INSERT INTO test_reimbursement SELECT * FROM ${dbName}.test_reimbursement where f_tenant_id = '0';
INSERT INTO test_subpackage SELECT * FROM ${dbName}.test_subpackage where f_tenant_id = '0';
INSERT INTO test_vehicleinfo SELECT * FROM ${dbName}.test_vehicleinfo where f_tenant_id = '0';
INSERT INTO test_warehousing SELECT * FROM ${dbName}.test_warehousing where f_tenant_id = '0';
INSERT INTO test_warehousingorder SELECT * FROM ${dbName}.test_warehousingorder where f_tenant_id = '0';
INSERT INTO wform_applybanquet SELECT * FROM ${dbName}.wform_applybanquet where f_tenant_id = '0';
INSERT INTO wform_applydelivergoods SELECT * FROM ${dbName}.wform_applydelivergoods where f_tenant_id = '0';
INSERT INTO wform_applydelivergoodsentry SELECT * FROM ${dbName}.wform_applydelivergoodsentry where f_tenant_id = '0';
INSERT INTO wform_applymeeting SELECT * FROM ${dbName}.wform_applymeeting where f_tenant_id = '0';
INSERT INTO wform_archivalborrow SELECT * FROM ${dbName}.wform_archivalborrow where f_tenant_id = '0';
INSERT INTO wform_articleswarehous SELECT * FROM ${dbName}.wform_articleswarehous where f_tenant_id = '0';
INSERT INTO wform_batchpack SELECT * FROM ${dbName}.wform_batchpack where f_tenant_id = '0';
INSERT INTO wform_batchtable SELECT * FROM ${dbName}.wform_batchtable where f_tenant_id = '0';
INSERT INTO wform_conbilling SELECT * FROM ${dbName}.wform_conbilling where f_tenant_id = '0';
INSERT INTO wform_contractapproval SELECT * FROM ${dbName}.wform_contractapproval where f_tenant_id = '0';
INSERT INTO wform_contractapprovalsheet SELECT * FROM ${dbName}.wform_contractapprovalsheet where f_tenant_id = '0';
INSERT INTO wform_debitbill SELECT * FROM ${dbName}.wform_debitbill where f_tenant_id = '0';
INSERT INTO wform_documentapproval SELECT * FROM ${dbName}.wform_documentapproval where f_tenant_id = '0';
INSERT INTO wform_documentsigning SELECT * FROM ${dbName}.wform_documentsigning where f_tenant_id = '0';
INSERT INTO wform_expenseexpenditure SELECT * FROM ${dbName}.wform_expenseexpenditure where f_tenant_id = '0';
INSERT INTO wform_finishedproduct SELECT * FROM ${dbName}.wform_finishedproduct where f_tenant_id = '0';
INSERT INTO wform_finishedproductentry SELECT * FROM ${dbName}.wform_finishedproductentry where f_tenant_id = '0';
INSERT INTO wform_incomerecognition SELECT * FROM ${dbName}.wform_incomerecognition where f_tenant_id = '0';
INSERT INTO wform_leaveapply SELECT * FROM ${dbName}.wform_leaveapply where f_tenant_id = '0';
INSERT INTO wform_letterservice SELECT * FROM ${dbName}.wform_letterservice where f_tenant_id = '0';
INSERT INTO wform_materialrequisition SELECT * FROM ${dbName}.wform_materialrequisition where f_tenant_id = '0';
INSERT INTO wform_materialrequisitionentry SELECT * FROM ${dbName}.wform_materialrequisitionentry where f_tenant_id = '0';
INSERT INTO wform_monthlyreport SELECT * FROM ${dbName}.wform_monthlyreport where f_tenant_id = '0';
INSERT INTO wform_officesupplies SELECT * FROM ${dbName}.wform_officesupplies where f_tenant_id = '0';
INSERT INTO wform_outboundorder SELECT * FROM ${dbName}.wform_outboundorder where f_tenant_id = '0';
INSERT INTO wform_outboundorderentry SELECT * FROM ${dbName}.wform_outboundorderentry where f_tenant_id = '0';
INSERT INTO wform_outgoingapply SELECT * FROM ${dbName}.wform_outgoingapply where f_tenant_id = '0';
INSERT INTO wform_paydistribution SELECT * FROM ${dbName}.wform_paydistribution where f_tenant_id = '0';
INSERT INTO wform_paymentapply SELECT * FROM ${dbName}.wform_paymentapply where f_tenant_id = '0';
INSERT INTO wform_postbatchtab SELECT * FROM ${dbName}.wform_postbatchtab where f_tenant_id = '0';
INSERT INTO wform_procurementmaterial SELECT * FROM ${dbName}.wform_procurementmaterial where f_tenant_id = '0';
INSERT INTO wform_procurementmaterialentry SELECT * FROM ${dbName}.wform_procurementmaterialentry where f_tenant_id = '0';
INSERT INTO wform_purchaselist SELECT * FROM ${dbName}.wform_purchaselist where f_tenant_id = '0';
INSERT INTO wform_purchaselistentry SELECT * FROM ${dbName}.wform_purchaselistentry where f_tenant_id = '0';
INSERT INTO wform_quotationapproval SELECT * FROM ${dbName}.wform_quotationapproval where f_tenant_id = '0';
INSERT INTO wform_receiptprocessing SELECT * FROM ${dbName}.wform_receiptprocessing where f_tenant_id = '0';
INSERT INTO wform_receiptsign SELECT * FROM ${dbName}.wform_receiptsign where f_tenant_id = '0';
INSERT INTO wform_rewardpunishment SELECT * FROM ${dbName}.wform_rewardpunishment where f_tenant_id = '0';
INSERT INTO wform_salesorder SELECT * FROM ${dbName}.wform_salesorder where f_tenant_id = '0';
INSERT INTO wform_salesorderentry SELECT * FROM ${dbName}.wform_salesorderentry where f_tenant_id = '0';
INSERT INTO wform_salessupport SELECT * FROM ${dbName}.wform_salessupport where f_tenant_id = '0';
INSERT INTO wform_staffovertime SELECT * FROM ${dbName}.wform_staffovertime where f_tenant_id = '0';
INSERT INTO wform_supplementcard SELECT * FROM ${dbName}.wform_supplementcard where f_tenant_id = '0';
INSERT INTO wform_travelapply SELECT * FROM ${dbName}.wform_travelapply where f_tenant_id = '0';
INSERT INTO wform_travelreimbursement SELECT * FROM ${dbName}.wform_travelreimbursement where f_tenant_id = '0';
INSERT INTO wform_vehicleapply SELECT * FROM ${dbName}.wform_vehicleapply where f_tenant_id = '0';
INSERT INTO wform_violationhandling SELECT * FROM ${dbName}.wform_violationhandling where f_tenant_id = '0';
INSERT INTO wform_warehousereceipt SELECT * FROM ${dbName}.wform_warehousereceipt where f_tenant_id = '0';
INSERT INTO wform_warehousereceiptentry SELECT * FROM ${dbName}.wform_warehousereceiptentry where f_tenant_id = '0';
INSERT INTO wform_workcontactsheet SELECT * FROM ${dbName}.wform_workcontactsheet where f_tenant_id = '0';
INSERT INTO wform_zjf_wikxqi SELECT * FROM ${dbName}.wform_zjf_wikxqi where f_tenant_id = '0';
INSERT INTO workflow_candidates SELECT * FROM ${dbName}.workflow_candidates where f_tenant_id = '0';
INSERT INTO workflow_circulate SELECT * FROM ${dbName}.workflow_circulate where f_tenant_id = '0';
INSERT INTO workflow_comment SELECT * FROM ${dbName}.workflow_comment where f_tenant_id = '0';
INSERT INTO workflow_common SELECT * FROM ${dbName}.workflow_common where f_tenant_id = '0';
INSERT INTO workflow_delegate SELECT * FROM ${dbName}.workflow_delegate where f_tenant_id = '0';
INSERT INTO workflow_delegate_info SELECT * FROM ${dbName}.workflow_delegate_info where f_tenant_id = '0';
INSERT INTO workflow_form_relation SELECT * FROM ${dbName}.workflow_form_relation where f_tenant_id = '0';
INSERT INTO workflow_launch_user SELECT * FROM ${dbName}.workflow_launch_user where f_tenant_id = '0';
INSERT INTO workflow_node SELECT * FROM ${dbName}.workflow_node where f_tenant_id = '0';
INSERT INTO workflow_node_record SELECT * FROM ${dbName}.workflow_node_record where f_tenant_id = '0';
INSERT INTO workflow_operator SELECT * FROM ${dbName}.workflow_operator where f_tenant_id = '0';
INSERT INTO workflow_record SELECT * FROM ${dbName}.workflow_record where f_tenant_id = '0';
INSERT INTO workflow_reject_data SELECT * FROM ${dbName}.workflow_reject_data where f_tenant_id = '0';
INSERT INTO workflow_revoke SELECT * FROM ${dbName}.workflow_revoke where f_tenant_id = '0';
INSERT INTO workflow_subtask_data SELECT * FROM ${dbName}.workflow_subtask_data where f_tenant_id = '0';
INSERT INTO workflow_task SELECT * FROM ${dbName}.workflow_task where f_tenant_id = '0';
INSERT INTO workflow_task_line SELECT * FROM ${dbName}.workflow_task_line where f_tenant_id = '0';
INSERT INTO workflow_template SELECT * FROM ${dbName}.workflow_template where f_tenant_id = '0';
INSERT INTO workflow_trigger_record SELECT * FROM ${dbName}.workflow_trigger_record where f_tenant_id = '0';
INSERT INTO workflow_trigger_task SELECT * FROM ${dbName}.workflow_trigger_task where f_tenant_id = '0';
INSERT INTO workflow_version SELECT * FROM ${dbName}.workflow_version where f_tenant_id = '0';

CREATE INDEX i_bu_fa ON base_user(f_account);
CREATE INDEX i_bu_fmi ON base_user(f_manager_id);
CREATE INDEX i_bur_fui ON base_user_relation(f_user_id);
CREATE INDEX i_bor_foi ON base_organize_relation(f_organize_id);
CREATE INDEX i_bor_foi2 ON base_organize_relation(f_object_id);
CREATE INDEX i_bp_foi ON base_position(f_organize_id);
CREATE INDEX i_ba_foi ON base_authorize(f_object_id);
CREATE INDEX i_bsl_fct ON base_sys_log(f_creator_time);
CREATE INDEX ux_undo_log ON undo_log(xid, branch_id);