-- ----------------------------
-- 表名：base_advanced_query_scheme
-- ----------------------------
CREATE TABLE base_advanced_query_scheme(
	f_id nvarchar(50) NOT NULL,
	f_full_name nvarchar(200),
	f_match_logic nvarchar(20),
	f_condition_json nvarchar(max),
	f_module_id nvarchar(50),
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_sort_code bigint,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'高级查询方案','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'方案名称','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_full_name';
EXEC sp_addextendedproperty 'MS_Description',N'匹配逻辑','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_match_logic';
EXEC sp_addextendedproperty 'MS_Description',N'条件规则Json','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_condition_json';
EXEC sp_addextendedproperty 'MS_Description',N'菜单主键','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_module_id';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_advanced_query_scheme','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_ai_chat
-- ----------------------------
CREATE TABLE base_ai_chat(
                             f_id nvarchar(50) NOT NULL,
                             f_full_name nvarchar(200),
                             f_enabled_mark int,
                             f_sort_code bigint,
                             f_creator_time datetime,
                             f_creator_user_id nvarchar(50),
                             f_last_modify_time datetime,
                             f_last_modify_user_id nvarchar(50),
                             f_delete_time datetime,
                             f_delete_user_id nvarchar(50),
                             f_delete_mark int,
                             f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

    , PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'ai会话列表','SCHEMA',N'dbo','TABLE',N'base_ai_chat';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'会话标题','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_full_name';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_ai_chat','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_ai_history
-- ----------------------------
CREATE TABLE base_ai_history(
                                f_id nvarchar(50) NOT NULL,
                                f_chat_id nvarchar(50),
                                f_question_text nvarchar(max),
                                f_content nvarchar(max),
                                f_type int,
                                f_enabled_mark int,
                                f_sort_code bigint,
                                f_creator_time datetime,
                                f_creator_user_id nvarchar(50),
                                f_last_modify_time datetime,
                                f_last_modify_user_id nvarchar(50),
                                f_delete_time datetime,
                                f_delete_user_id nvarchar(50),
                                f_delete_mark int,
                                f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

    , PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'ai会话记录','SCHEMA',N'dbo','TABLE',N'base_ai_history';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'会话id','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_chat_id';
EXEC sp_addextendedproperty 'MS_Description',N'问题内容','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_question_text';
EXEC sp_addextendedproperty 'MS_Description',N'会话内容','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_content';
EXEC sp_addextendedproperty 'MS_Description',N'类型（0-ai，1-用户）','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_type';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_ai_history','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_app_data
-- ----------------------------
CREATE TABLE base_app_data(
	f_id nvarchar(50) NOT NULL,
	f_object_type nvarchar(50),
	f_object_id nvarchar(50),
	f_object_data nvarchar(max),
	f_description nvarchar(500),
	f_enabled_mark int,
	f_system_id nvarchar(50),
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_sort_code bigint,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'操作权限','SCHEMA',N'dbo','TABLE',N'base_authorize';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'项目类型','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_item_type';
EXEC sp_addextendedproperty 'MS_Description',N'项目主键','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_item_id';
EXEC sp_addextendedproperty 'MS_Description',N'对象类型','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_object_type';
EXEC sp_addextendedproperty 'MS_Description',N'对象主键','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_object_id';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_authorize','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_bill_num
-- ----------------------------
CREATE TABLE base_bill_num(
	f_id nvarchar(50) NOT NULL,
	f_rule_id nvarchar(50),
	f_visual_id nvarchar(50),
	f_flow_id nvarchar(50),
	f_rule_config nvarchar(max),
	f_date_value nvarchar(50),
	f_num int,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL

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

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

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

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

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

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

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'接口认证用户','SCHEMA',N'dbo','TABLE',N'base_data_interface_user';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'用户主键','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'用户密钥','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_user_key';
EXEC sp_addextendedproperty 'MS_Description',N'接口认证主键','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_oauth_id';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_data_interface_user','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_data_interface_variate
-- ----------------------------
CREATE TABLE base_data_interface_variate(
	f_id nvarchar(50) NOT NULL,
	f_interface_id nvarchar(50) NOT NULL,
	f_full_name nvarchar(200),
	f_expression nvarchar(500),
	f_value nvarchar(max),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'数据接口变量','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate';
EXEC sp_addextendedproperty 'MS_Description',N'主键id','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'数据接口id','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_interface_id';
EXEC sp_addextendedproperty 'MS_Description',N'变量名','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_full_name';
EXEC sp_addextendedproperty 'MS_Description',N'表达式','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_expression';
EXEC sp_addextendedproperty 'MS_Description',N'变量值','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_value';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_data_interface_variate','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_data_set
-- ----------------------------
CREATE TABLE base_data_set(
	f_id nvarchar(50) NOT NULL,
	f_object_type nvarchar(50),
	f_object_id nvarchar(50),
	f_full_name nvarchar(255) NOT NULL,
	f_db_link_id nvarchar(50) NOT NULL DEFAULT '0',
	f_data_config_json nvarchar(max),
	f_parameter_json nvarchar(max),
	f_field_json nvarchar(max),
	f_sort_code bigint,
	f_description nvarchar(500),
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_type int DEFAULT '0',
	f_visual_config_json nvarchar(max),
	f_filter_config_json nvarchar(max),
	f_interface_id nvarchar(50)

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

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

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

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'分组管理','SCHEMA',N'dbo','TABLE',N'base_group';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'名称','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_full_name';
EXEC sp_addextendedproperty 'MS_Description',N'编码','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_en_code';
EXEC sp_addextendedproperty 'MS_Description',N'分类','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_category';
EXEC sp_addextendedproperty 'MS_Description',N'描述或说明','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_description';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志(0-禁用，1-启用)','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_group','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_im_content
-- ----------------------------
CREATE TABLE base_im_content(
	f_id nvarchar(50) NOT NULL,
	f_send_user_id nvarchar(50),
	f_send_time datetime,
	f_receive_user_id nvarchar(50),
	f_receive_time datetime,
	f_content nvarchar(max),
	f_content_type nvarchar(50),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'聊天会话','SCHEMA',N'dbo','TABLE',N'base_im_reply';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'用户主键','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'接收用户','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_receive_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'接收时间','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_receive_time';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_im_reply','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_integrate
-- ----------------------------
CREATE TABLE base_integrate(
	f_id nvarchar(50) NOT NULL,
	f_full_name nvarchar(200),
	f_en_code nvarchar(200),
	f_template_json nvarchar(max),
	f_trigger_type int,
	f_result_type int,
	f_type int,
	f_form_id nvarchar(50),
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'消息模板参数表','SCHEMA',N'dbo','TABLE',N'base_msg_template_param';
EXEC sp_addextendedproperty 'MS_Description',N'主键id','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'消息模板id','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_template_id';
EXEC sp_addextendedproperty 'MS_Description',N'参数名称','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_field';
EXEC sp_addextendedproperty 'MS_Description',N'参数说明','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_field_name';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志(0-禁用，1-启用)','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_msg_template_param','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_msg_wechat_user
-- ----------------------------
CREATE TABLE base_msg_wechat_user(
	f_id nvarchar(50) NOT NULL,
	f_gzh_id nvarchar(50),
	f_user_id nvarchar(50),
	f_open_id nvarchar(50),
	f_close_mark int,
	f_enabled_mark int,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_sort_code bigint

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'微信公众号用户关联表','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user';
EXEC sp_addextendedproperty 'MS_Description',N'主键id','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'微信公众号id','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_gzh_id';
EXEC sp_addextendedproperty 'MS_Description',N'用户id','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'微信公众号用户id','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_open_id';
EXEC sp_addextendedproperty 'MS_Description',N'是否关注','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_close_mark';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志(0-禁用，1-启用)','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_msg_wechat_user','COLUMN',N'f_sort_code';
-- ----------------------------
-- 表名：base_notice
-- ----------------------------
CREATE TABLE base_notice(
	f_id nvarchar(50) NOT NULL,
	f_title nvarchar(200),
	f_body_text nvarchar(max),
	f_to_user_ids nvarchar(max),
	f_cover_image nvarchar(max),
	f_files nvarchar(max),
	f_expiration_time datetime,
	f_category nvarchar(50),
	f_type int,
	f_send_config_id nvarchar(50),
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'组织关系','SCHEMA',N'dbo','TABLE',N'base_organize_relation';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'组织主键','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_organize_id';
EXEC sp_addextendedproperty 'MS_Description',N'对象类型（角色：role）','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_object_type';
EXEC sp_addextendedproperty 'MS_Description',N'对象主键','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_object_id';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_organize_relation','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_permission_group
-- ----------------------------
CREATE TABLE base_permission_group(
	F_Id nvarchar(50) NOT NULL,
	F_Full_Name nvarchar(200),
	F_En_Code nvarchar(200),
	F_Permission_Member nvarchar(4000),
	F_Sort_Code bigint,
	F_Description nvarchar(500),
	F_Enabled_Mark int,
	F_Creator_Time datetime,
	F_Creator_User_Id nvarchar(50),
	F_Last_Modify_Time datetime,
	F_Last_Modify_User_Id nvarchar(50),
	F_Delete_Mark int,
	F_Delete_Time datetime,
	F_Delete_User_Id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	F_Type int

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'权限组表','SCHEMA',N'dbo','TABLE',N'base_permission_group';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'名称','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Full_Name';
EXEC sp_addextendedproperty 'MS_Description',N'编码','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_En_Code';
EXEC sp_addextendedproperty 'MS_Description',N'成员','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Permission_Member';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Sort_Code';
EXEC sp_addextendedproperty 'MS_Description',N'说明','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Enabled_Mark';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Creator_Time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Creator_User_Id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Last_Modify_Time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Last_Modify_User_Id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Delete_Mark';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Delete_Time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Delete_User_Id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'类型','SCHEMA',N'dbo','TABLE',N'base_permission_group','COLUMN',N'F_Type';
-- ----------------------------
-- 表名：base_portal
-- ----------------------------
CREATE TABLE base_portal(
	f_id nvarchar(50) NOT NULL,
	f_full_name nvarchar(200),
	f_en_code nvarchar(200),
	f_category nvarchar(50),
	f_type int DEFAULT '0',
	f_state int,
	f_custom_url nvarchar(500),
	f_link_type int DEFAULT '0',
	f_enabled_lock int,
	f_platform nvarchar(50),
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_platform_release nvarchar(100)

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'门户管理','SCHEMA',N'dbo','TABLE',N'base_portal_manage';
EXEC sp_addextendedproperty 'MS_Description',N'主键_id','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'门户id','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_portal_id';
EXEC sp_addextendedproperty 'MS_Description',N'系统id','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_system_id';
EXEC sp_addextendedproperty 'MS_Description',N'平台','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_platform';
EXEC sp_addextendedproperty 'MS_Description',N'说明','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_description';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志(0-禁用，1-启用)','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_portal_manage','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_position
-- ----------------------------
CREATE TABLE base_position(
	f_id nvarchar(50) NOT NULL,
	f_full_name nvarchar(200),
	f_en_code nvarchar(200),
	f_type nvarchar(50),
	f_property_json nvarchar(max),
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_organize_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'打印模板日志','SCHEMA',N'dbo','TABLE',N'base_print_log';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'打印条数','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_print_num';
EXEC sp_addextendedproperty 'MS_Description',N'打印功能名称','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_print_title';
EXEC sp_addextendedproperty 'MS_Description',N'模板id','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_print_id';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_print_log','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_print_template
-- ----------------------------
CREATE TABLE base_print_template(
	f_id nvarchar(50) NOT NULL,
	f_full_name nvarchar(200) NOT NULL,
	f_en_code nvarchar(50) NOT NULL,
	f_category nvarchar(50) NOT NULL,
	f_description nvarchar(500),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_state int,
	f_common_use int DEFAULT '0',
	f_visible_type int,
	f_icon nvarchar(255),
	f_icon_background nvarchar(255)

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

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

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

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

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

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'日程用户','SCHEMA',N'dbo','TABLE',N'base_schedule_user';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'日程id','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_schedule_id';
EXEC sp_addextendedproperty 'MS_Description',N'用户id','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_to_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'类型(1-系统添加 2-用户添加)','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_type';
EXEC sp_addextendedproperty 'MS_Description',N'描述或说明','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_description';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志(0-禁用，1-启用)','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_schedule_user','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_sign_img
-- ----------------------------
CREATE TABLE base_sign_img(
	f_id nvarchar(50) NOT NULL,
	f_sign_img nvarchar(max),
	f_is_default int,
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'个性签名','SCHEMA',N'dbo','TABLE',N'base_sign_img';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'签名图片','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_sign_img';
EXEC sp_addextendedproperty 'MS_Description',N'是否默认','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_is_default';
EXEC sp_addextendedproperty 'MS_Description',N'描述或说明','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_description';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志(0-禁用，1-启用)','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_sign_img','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_signature
-- ----------------------------
CREATE TABLE base_signature(
	f_id nvarchar(50) NOT NULL,
	f_full_name nvarchar(200),
	f_en_code nvarchar(200),
	f_icon nvarchar(max),
	f_enabled_mark int,
	f_sort_code bigint,
	f_description nvarchar(500),
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'电子签章','SCHEMA',N'dbo','TABLE',N'base_signature';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'名称','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_full_name';
EXEC sp_addextendedproperty 'MS_Description',N'编号','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_en_code';
EXEC sp_addextendedproperty 'MS_Description',N'签章','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_icon';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'描述或说明','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_description';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_signature','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_signature_user
-- ----------------------------
CREATE TABLE base_signature_user(
	f_id nvarchar(50) NOT NULL,
	f_signature_id nvarchar(50),
	f_user_id nvarchar(50),
	f_enabled_mark int,
	f_sort_code bigint,
	f_description nvarchar(500),
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'电子签章授权人','SCHEMA',N'dbo','TABLE',N'base_signature_user';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'签章主键','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_signature_id';
EXEC sp_addextendedproperty 'MS_Description',N'用户主键','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'描述或说明','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_description';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_signature_user','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_socials_users
-- ----------------------------
CREATE TABLE base_socials_users(
	f_id nvarchar(50) NOT NULL,
	f_user_id nvarchar(50),
	f_social_type nvarchar(50),
	f_social_id nvarchar(100),
	f_social_name nvarchar(100),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'第三方绑定用户表','SCHEMA',N'dbo','TABLE',N'base_socials_users';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'用户id','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'第三方类型','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_social_type';
EXEC sp_addextendedproperty 'MS_Description',N'第三方账号id','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_social_id';
EXEC sp_addextendedproperty 'MS_Description',N'第三方账号','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_social_name';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_socials_users','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_syn_third_info
-- ----------------------------
CREATE TABLE base_syn_third_info(
	f_id nvarchar(50) NOT NULL,
	f_third_type int,
	f_data_type int,
	f_sys_obj_id nvarchar(50),
	f_third_obj_id nvarchar(50),
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

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

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

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

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

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'用户登录设备id表','SCHEMA',N'dbo','TABLE',N'base_user_device';
EXEC sp_addextendedproperty 'MS_Description',N'主键id','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'设备id','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_client_id';
EXEC sp_addextendedproperty 'MS_Description',N'用户id','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志(0-禁用，1-启用)','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_user_device','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_user_old_password
-- ----------------------------
CREATE TABLE base_user_old_password(
	f_id nvarchar(50) NOT NULL,
	f_user_id nvarchar(50),
	f_account nvarchar(50),
	f_old_password nvarchar(50),
	f_secretkey nvarchar(50),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'用户旧密码记录表','SCHEMA',N'dbo','TABLE',N'base_user_old_password';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'userid','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'账户','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_account';
EXEC sp_addextendedproperty 'MS_Description',N'旧密码','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_old_password';
EXEC sp_addextendedproperty 'MS_Description',N'秘钥','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_secretkey';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_user_old_password','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_user_relation
-- ----------------------------
CREATE TABLE base_user_relation(
	f_id nvarchar(50) NOT NULL,
	f_user_id nvarchar(50),
	f_object_type nvarchar(50),
	f_object_id nvarchar(50),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'用户关系','SCHEMA',N'dbo','TABLE',N'base_user_relation';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'用户主键','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'对象类型','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_object_type';
EXEC sp_addextendedproperty 'MS_Description',N'对象主键','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_object_id';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_user_relation','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_visual_alias
-- ----------------------------
CREATE TABLE base_visual_alias(
	f_id nvarchar(50) NOT NULL,
	f_visual_id nvarchar(50),
	f_alias_name nvarchar(255),
	f_table_name nvarchar(255),
	f_field_name nvarchar(255),
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'过滤配置表','SCHEMA',N'dbo','TABLE',N'base_visual_filter';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'在线和代码生成记录主键','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_module_id';
EXEC sp_addextendedproperty 'MS_Description',N'过滤配置','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_config';
EXEC sp_addextendedproperty 'MS_Description',N'过滤配置app','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_config_app';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_visual_filter','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_visual_kit
-- ----------------------------
CREATE TABLE base_visual_kit(
	f_id nvarchar(50) NOT NULL,
	f_full_name nvarchar(200),
	f_en_code nvarchar(200),
	f_category nvarchar(50),
	f_form_data nvarchar(max),
	f_icon nvarchar(255),
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'在线开发数据日志表','SCHEMA',N'dbo','TABLE',N'base_visual_log';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'模板id','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_model_id';
EXEC sp_addextendedproperty 'MS_Description',N'日志类型：0-新建，1-编辑','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_type';
EXEC sp_addextendedproperty 'MS_Description',N'数据id','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_data_id';
EXEC sp_addextendedproperty 'MS_Description',N'日志内容','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_data_log';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'base_visual_log','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：base_visual_personal
-- ----------------------------
CREATE TABLE base_visual_personal(
	f_id nvarchar(50) NOT NULL,
	f_menu_id nvarchar(50),
	f_full_name nvarchar(255),
	f_type int,
	f_status int,
	f_search_list nvarchar(max),
	f_column_list nvarchar(max),
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

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

, PRIMARY KEY (id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'大屏信息','SCHEMA',N'dbo','TABLE',N'blade_visual';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'id';
EXEC sp_addextendedproperty 'MS_Description',N'大屏标题','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'title';
EXEC sp_addextendedproperty 'MS_Description',N'大屏背景','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'background_url';
EXEC sp_addextendedproperty 'MS_Description',N'大屏类型','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'category';
EXEC sp_addextendedproperty 'MS_Description',N'发布密码','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'password';
EXEC sp_addextendedproperty 'MS_Description',N'创建人','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'create_user';
EXEC sp_addextendedproperty 'MS_Description',N'创建部门','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'create_dept';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'create_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改人','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'update_user';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'update_time';
EXEC sp_addextendedproperty 'MS_Description',N'状态','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'status';
EXEC sp_addextendedproperty 'MS_Description',N'是否已删除','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'is_deleted';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'blade_visual','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：blade_visual_assets
-- ----------------------------
CREATE TABLE blade_visual_assets(
	id nvarchar(64) NOT NULL,
	assetsName nvarchar(100),
	assetsSize nvarchar(50),
	assetsTime datetime,
	assetsType nvarchar(50),
	assetsUrl nvarchar(255),
	f_tenant_id nvarchar(50) NOT NULL

, PRIMARY KEY (id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'大屏静态资源','SCHEMA',N'dbo','TABLE',N'blade_visual_assets';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'blade_visual_assets','COLUMN',N'id';
EXEC sp_addextendedproperty 'MS_Description',N'资源名称','SCHEMA',N'dbo','TABLE',N'blade_visual_assets','COLUMN',N'assetsName';
EXEC sp_addextendedproperty 'MS_Description',N'资源大小 1M','SCHEMA',N'dbo','TABLE',N'blade_visual_assets','COLUMN',N'assetsSize';
EXEC sp_addextendedproperty 'MS_Description',N'资源上传时间','SCHEMA',N'dbo','TABLE',N'blade_visual_assets','COLUMN',N'assetsTime';
EXEC sp_addextendedproperty 'MS_Description',N'资源后缀名','SCHEMA',N'dbo','TABLE',N'blade_visual_assets','COLUMN',N'assetsType';
EXEC sp_addextendedproperty 'MS_Description',N'资源地址','SCHEMA',N'dbo','TABLE',N'blade_visual_assets','COLUMN',N'assetsUrl';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'blade_visual_assets','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：blade_visual_category
-- ----------------------------
CREATE TABLE blade_visual_category(
	id nvarchar(64) NOT NULL,
	category_key nvarchar(12),
	category_value nvarchar(64),
	is_deleted int NOT NULL DEFAULT '0',
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'大屏分类','SCHEMA',N'dbo','TABLE',N'blade_visual_category';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'blade_visual_category','COLUMN',N'id';
EXEC sp_addextendedproperty 'MS_Description',N'分类键值','SCHEMA',N'dbo','TABLE',N'blade_visual_category','COLUMN',N'category_key';
EXEC sp_addextendedproperty 'MS_Description',N'分类名称','SCHEMA',N'dbo','TABLE',N'blade_visual_category','COLUMN',N'category_value';
EXEC sp_addextendedproperty 'MS_Description',N'是否已删除','SCHEMA',N'dbo','TABLE',N'blade_visual_category','COLUMN',N'is_deleted';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'blade_visual_category','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：blade_visual_component
-- ----------------------------
CREATE TABLE blade_visual_component(
	id nvarchar(64) NOT NULL,
	name nvarchar(50),
	content nvarchar(max),
	type int,
	img nvarchar(255),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'大屏自定义组件','SCHEMA',N'dbo','TABLE',N'blade_visual_component';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'blade_visual_component','COLUMN',N'id';
EXEC sp_addextendedproperty 'MS_Description',N'组件名称','SCHEMA',N'dbo','TABLE',N'blade_visual_component','COLUMN',N'name';
EXEC sp_addextendedproperty 'MS_Description',N'组件内容','SCHEMA',N'dbo','TABLE',N'blade_visual_component','COLUMN',N'content';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'blade_visual_component','COLUMN',N'type';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'blade_visual_component','COLUMN',N'img';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'blade_visual_component','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：blade_visual_config
-- ----------------------------
CREATE TABLE blade_visual_config(
	id nvarchar(64) NOT NULL,
	visual_id nvarchar(64),
	detail nvarchar(max),
	component nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'大屏信息配置','SCHEMA',N'dbo','TABLE',N'blade_visual_config';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'blade_visual_config','COLUMN',N'id';
EXEC sp_addextendedproperty 'MS_Description',N'可视化表主键','SCHEMA',N'dbo','TABLE',N'blade_visual_config','COLUMN',N'visual_id';
EXEC sp_addextendedproperty 'MS_Description',N'配置json','SCHEMA',N'dbo','TABLE',N'blade_visual_config','COLUMN',N'detail';
EXEC sp_addextendedproperty 'MS_Description',N'组件json','SCHEMA',N'dbo','TABLE',N'blade_visual_config','COLUMN',N'component';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'blade_visual_config','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：blade_visual_db
-- ----------------------------
CREATE TABLE blade_visual_db(
	id nvarchar(64) NOT NULL,
	name nvarchar(100),
	driver_class nvarchar(100),
	url nvarchar(500),
	username nvarchar(50),
	password nvarchar(100),
	remark nvarchar(255),
	create_user nvarchar(64),
	create_dept nvarchar(64),
	create_time datetime,
	update_user nvarchar(64),
	update_time datetime,
	status int,
	is_deleted int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

, PRIMARY KEY (id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'大屏全局变量','SCHEMA',N'dbo','TABLE',N'blade_visual_glob';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'blade_visual_glob','COLUMN',N'id';
EXEC sp_addextendedproperty 'MS_Description',N'变量名称','SCHEMA',N'dbo','TABLE',N'blade_visual_glob','COLUMN',N'globalName';
EXEC sp_addextendedproperty 'MS_Description',N'变量Key','SCHEMA',N'dbo','TABLE',N'blade_visual_glob','COLUMN',N'globalKey';
EXEC sp_addextendedproperty 'MS_Description',N'变量值','SCHEMA',N'dbo','TABLE',N'blade_visual_glob','COLUMN',N'globalValue';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'blade_visual_glob','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：blade_visual_map
-- ----------------------------
CREATE TABLE blade_visual_map(
	id nvarchar(64) NOT NULL,
	name nvarchar(255),
	data nvarchar(max),
	code nvarchar(20),
	map_level int,
	parent_id nvarchar(64),
	parent_code nvarchar(20),
	ancestors nvarchar(255),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'大屏地图','SCHEMA',N'dbo','TABLE',N'blade_visual_map';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'blade_visual_map','COLUMN',N'id';
EXEC sp_addextendedproperty 'MS_Description',N'地图名称','SCHEMA',N'dbo','TABLE',N'blade_visual_map','COLUMN',N'name';
EXEC sp_addextendedproperty 'MS_Description',N'地图数据','SCHEMA',N'dbo','TABLE',N'blade_visual_map','COLUMN',N'data';
EXEC sp_addextendedproperty 'MS_Description',N'地图编码','SCHEMA',N'dbo','TABLE',N'blade_visual_map','COLUMN',N'code';
EXEC sp_addextendedproperty 'MS_Description',N'地图级别 0:国家 1:省份 2:城市 3:区县','SCHEMA',N'dbo','TABLE',N'blade_visual_map','COLUMN',N'map_level';
EXEC sp_addextendedproperty 'MS_Description',N'上级ID','SCHEMA',N'dbo','TABLE',N'blade_visual_map','COLUMN',N'parent_id';
EXEC sp_addextendedproperty 'MS_Description',N'上级编码','SCHEMA',N'dbo','TABLE',N'blade_visual_map','COLUMN',N'parent_code';
EXEC sp_addextendedproperty 'MS_Description',N'祖编码','SCHEMA',N'dbo','TABLE',N'blade_visual_map','COLUMN',N'ancestors';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'blade_visual_map','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：blade_visual_record
-- ----------------------------
CREATE TABLE blade_visual_record(
	id nvarchar(64) NOT NULL,
	name nvarchar(255),
	url nvarchar(255),
	dataType int,
	dataMethod nvarchar(255),
	dataHeader nvarchar(4000),
	data nvarchar(4000),
	dataQuery nvarchar(4000),
	dataQueryType nvarchar(255),
	dataFormatter nvarchar(max),
	proxy int,
	wsUrl nvarchar(255),
	dbsql nvarchar(255),
	fsql nvarchar(max),
	result nvarchar(255),
	mqttUrl nvarchar(255),
	mqttConfig nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'大屏数据集','SCHEMA',N'dbo','TABLE',N'blade_visual_record';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'id';
EXEC sp_addextendedproperty 'MS_Description',N'名称','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'name';
EXEC sp_addextendedproperty 'MS_Description',N'请求地址','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'url';
EXEC sp_addextendedproperty 'MS_Description',N'数据集类型','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'dataType';
EXEC sp_addextendedproperty 'MS_Description',N'请求方法','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'dataMethod';
EXEC sp_addextendedproperty 'MS_Description',N'请求头部','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'dataHeader';
EXEC sp_addextendedproperty 'MS_Description',N'请求数据','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'data';
EXEC sp_addextendedproperty 'MS_Description',N'请求参数','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'dataQuery';
EXEC sp_addextendedproperty 'MS_Description',N'请求参数类型','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'dataQueryType';
EXEC sp_addextendedproperty 'MS_Description',N'过滤器','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'dataFormatter';
EXEC sp_addextendedproperty 'MS_Description',N'开启跨域','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'proxy';
EXEC sp_addextendedproperty 'MS_Description',N'WebSocket地址','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'wsUrl';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'dbsql';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'fsql';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'result';
EXEC sp_addextendedproperty 'MS_Description',N'MQTT地址','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'mqttUrl';
EXEC sp_addextendedproperty 'MS_Description',N'MQTT配置','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'mqttConfig';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'blade_visual_record','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct293714178055641925
-- ----------------------------
CREATE TABLE ct293714178055641925(
	selectField107 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_foreignId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'子表','SCHEMA',N'dbo','TABLE',N'ct293714178055641925';
EXEC sp_addextendedproperty 'MS_Description',N'乐器','SCHEMA',N'dbo','TABLE',N'ct293714178055641925','COLUMN',N'selectField107';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct293714178055641925','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct293714178055641925','COLUMN',N'f_foreignId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct293714178055641925','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct294012196562705414
-- ----------------------------
CREATE TABLE ct294012196562705414(
	dateField117 datetime,
	dateField118 datetime,
	comInputField119 nvarchar(255),
	comInputField120 nvarchar(255),
	textareaField121 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_foreignId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'子表','SCHEMA',N'dbo','TABLE',N'ct294012196562705414';
EXEC sp_addextendedproperty 'MS_Description',N'开始日期','SCHEMA',N'dbo','TABLE',N'ct294012196562705414','COLUMN',N'dateField117';
EXEC sp_addextendedproperty 'MS_Description',N'结束日期','SCHEMA',N'dbo','TABLE',N'ct294012196562705414','COLUMN',N'dateField118';
EXEC sp_addextendedproperty 'MS_Description',N'公司名称','SCHEMA',N'dbo','TABLE',N'ct294012196562705414','COLUMN',N'comInputField119';
EXEC sp_addextendedproperty 'MS_Description',N'担任职务','SCHEMA',N'dbo','TABLE',N'ct294012196562705414','COLUMN',N'comInputField120';
EXEC sp_addextendedproperty 'MS_Description',N'主要工作内容','SCHEMA',N'dbo','TABLE',N'ct294012196562705414','COLUMN',N'textareaField121';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct294012196562705414','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct294012196562705414','COLUMN',N'f_foreignId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct294012196562705414','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct294022926200511493
-- ----------------------------
CREATE TABLE ct294022926200511493(
	comInputField145 nvarchar(255),
	comInputField146 nvarchar(255),
	comInputField147 nvarchar(255),
	comInputField148 nvarchar(255),
	comInputField149 nvarchar(255),
	comInputField150 nvarchar(255),
	comInputField151 nvarchar(255),
	comInputField152 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_foreignId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'子表','SCHEMA',N'dbo','TABLE',N'ct294022926200511493';
EXEC sp_addextendedproperty 'MS_Description',N'包保人社区工作者姓名','SCHEMA',N'dbo','TABLE',N'ct294022926200511493','COLUMN',N'comInputField145';
EXEC sp_addextendedproperty 'MS_Description',N'包保人社区工作者联系方式','SCHEMA',N'dbo','TABLE',N'ct294022926200511493','COLUMN',N'comInputField146';
EXEC sp_addextendedproperty 'MS_Description',N'包保人医务工作者姓名','SCHEMA',N'dbo','TABLE',N'ct294022926200511493','COLUMN',N'comInputField147';
EXEC sp_addextendedproperty 'MS_Description',N'包保人医务工作者联系方式','SCHEMA',N'dbo','TABLE',N'ct294022926200511493','COLUMN',N'comInputField148';
EXEC sp_addextendedproperty 'MS_Description',N'包保人公安民警姓名','SCHEMA',N'dbo','TABLE',N'ct294022926200511493','COLUMN',N'comInputField149';
EXEC sp_addextendedproperty 'MS_Description',N'包保人公安民警联系方式','SCHEMA',N'dbo','TABLE',N'ct294022926200511493','COLUMN',N'comInputField150';
EXEC sp_addextendedproperty 'MS_Description',N'包保人志愿者姓名','SCHEMA',N'dbo','TABLE',N'ct294022926200511493','COLUMN',N'comInputField151';
EXEC sp_addextendedproperty 'MS_Description',N'包保人志愿者联系方式','SCHEMA',N'dbo','TABLE',N'ct294022926200511493','COLUMN',N'comInputField152';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct294022926200511493','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct294022926200511493','COLUMN',N'f_foreignId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct294022926200511493','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct294031961024928774
-- ----------------------------
CREATE TABLE ct294031961024928774(
	selectField108 nvarchar(255),
	selectField109 nvarchar(255),
	numInputField112 decimal(10,0),
	comInputField111 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_foreignId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'子表','SCHEMA',N'dbo','TABLE',N'ct294031961024928774';
EXEC sp_addextendedproperty 'MS_Description',N'关联目标','SCHEMA',N'dbo','TABLE',N'ct294031961024928774','COLUMN',N'selectField108';
EXEC sp_addextendedproperty 'MS_Description',N'目标达成度','SCHEMA',N'dbo','TABLE',N'ct294031961024928774','COLUMN',N'selectField109';
EXEC sp_addextendedproperty 'MS_Description',N'评分','SCHEMA',N'dbo','TABLE',N'ct294031961024928774','COLUMN',N'numInputField112';
EXEC sp_addextendedproperty 'MS_Description',N'情况描述','SCHEMA',N'dbo','TABLE',N'ct294031961024928774','COLUMN',N'comInputField111';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct294031961024928774','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct294031961024928774','COLUMN',N'f_foreignId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct294031961024928774','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct294031961024928775
-- ----------------------------
CREATE TABLE ct294031961024928775(
	selectField114 nvarchar(255),
	selectField115 nvarchar(255),
	numInputField116 decimal(10,0),
	comInputField117 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_foreignId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'子表','SCHEMA',N'dbo','TABLE',N'ct294031961024928775';
EXEC sp_addextendedproperty 'MS_Description',N'关联结果','SCHEMA',N'dbo','TABLE',N'ct294031961024928775','COLUMN',N'selectField114';
EXEC sp_addextendedproperty 'MS_Description',N'关键结果达成度','SCHEMA',N'dbo','TABLE',N'ct294031961024928775','COLUMN',N'selectField115';
EXEC sp_addextendedproperty 'MS_Description',N'评分','SCHEMA',N'dbo','TABLE',N'ct294031961024928775','COLUMN',N'numInputField116';
EXEC sp_addextendedproperty 'MS_Description',N'情况描述','SCHEMA',N'dbo','TABLE',N'ct294031961024928775','COLUMN',N'comInputField117';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct294031961024928775','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct294031961024928775','COLUMN',N'f_foreignId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct294031961024928775','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct294037561750363142
-- ----------------------------
CREATE TABLE ct294037561750363142(
	comInputField108 nvarchar(255),
	dateField109 datetime,
	comInputField110 nvarchar(255),
	userSelectField111 nvarchar(255),
	comInputField124 nvarchar(255),
	selectField112 nvarchar(255),
	numInputField113 decimal(10,0),
	uploadFzField114 nvarchar(max),
	f_id nvarchar(50) NOT NULL,
	f_foreignId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'子表','SCHEMA',N'dbo','TABLE',N'ct294037561750363142';
EXEC sp_addextendedproperty 'MS_Description',N'巡检结果','SCHEMA',N'dbo','TABLE',N'ct294037561750363142','COLUMN',N'comInputField108';
EXEC sp_addextendedproperty 'MS_Description',N'巡检日期','SCHEMA',N'dbo','TABLE',N'ct294037561750363142','COLUMN',N'dateField109';
EXEC sp_addextendedproperty 'MS_Description',N'情况说明','SCHEMA',N'dbo','TABLE',N'ct294037561750363142','COLUMN',N'comInputField110';
EXEC sp_addextendedproperty 'MS_Description',N'巡检人','SCHEMA',N'dbo','TABLE',N'ct294037561750363142','COLUMN',N'userSelectField111';
EXEC sp_addextendedproperty 'MS_Description',N'巡检人手机','SCHEMA',N'dbo','TABLE',N'ct294037561750363142','COLUMN',N'comInputField124';
EXEC sp_addextendedproperty 'MS_Description',N'巡检分类','SCHEMA',N'dbo','TABLE',N'ct294037561750363142','COLUMN',N'selectField112';
EXEC sp_addextendedproperty 'MS_Description',N'设备完好率','SCHEMA',N'dbo','TABLE',N'ct294037561750363142','COLUMN',N'numInputField113';
EXEC sp_addextendedproperty 'MS_Description',N'现场照片','SCHEMA',N'dbo','TABLE',N'ct294037561750363142','COLUMN',N'uploadFzField114';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct294037561750363142','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct294037561750363142','COLUMN',N'f_foreignId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct294037561750363142','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct294037561750363143
-- ----------------------------
CREATE TABLE ct294037561750363143(
	comInputField116 nvarchar(255),
	dateField117 datetime,
	comInputField118 nvarchar(255),
	userSelectField119 nvarchar(255),
	comInputField125 nvarchar(255),
	uploadFzField122 nvarchar(max),
	f_id nvarchar(50) NOT NULL,
	f_foreignId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'子表','SCHEMA',N'dbo','TABLE',N'ct294037561750363143';
EXEC sp_addextendedproperty 'MS_Description',N'维修结果','SCHEMA',N'dbo','TABLE',N'ct294037561750363143','COLUMN',N'comInputField116';
EXEC sp_addextendedproperty 'MS_Description',N'维修日期','SCHEMA',N'dbo','TABLE',N'ct294037561750363143','COLUMN',N'dateField117';
EXEC sp_addextendedproperty 'MS_Description',N'维修内容','SCHEMA',N'dbo','TABLE',N'ct294037561750363143','COLUMN',N'comInputField118';
EXEC sp_addextendedproperty 'MS_Description',N'维修人','SCHEMA',N'dbo','TABLE',N'ct294037561750363143','COLUMN',N'userSelectField119';
EXEC sp_addextendedproperty 'MS_Description',N'维修人手机','SCHEMA',N'dbo','TABLE',N'ct294037561750363143','COLUMN',N'comInputField125';
EXEC sp_addextendedproperty 'MS_Description',N'现场照片','SCHEMA',N'dbo','TABLE',N'ct294037561750363143','COLUMN',N'uploadFzField122';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct294037561750363143','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct294037561750363143','COLUMN',N'f_foreignId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct294037561750363143','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct294099893327272966
-- ----------------------------
CREATE TABLE ct294099893327272966(
	comInputField108 nvarchar(255),
	dateField109 datetime,
	dateField110 datetime,
	comInputField111 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_foreignId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'子表','SCHEMA',N'dbo','TABLE',N'ct294099893327272966';
EXEC sp_addextendedproperty 'MS_Description',N'出差地点','SCHEMA',N'dbo','TABLE',N'ct294099893327272966','COLUMN',N'comInputField108';
EXEC sp_addextendedproperty 'MS_Description',N'开始日期','SCHEMA',N'dbo','TABLE',N'ct294099893327272966','COLUMN',N'dateField109';
EXEC sp_addextendedproperty 'MS_Description',N'结束日期','SCHEMA',N'dbo','TABLE',N'ct294099893327272966','COLUMN',N'dateField110';
EXEC sp_addextendedproperty 'MS_Description',N'出差事由','SCHEMA',N'dbo','TABLE',N'ct294099893327272966','COLUMN',N'comInputField111';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct294099893327272966','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct294099893327272966','COLUMN',N'f_foreignId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct294099893327272966','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct294376098702073542
-- ----------------------------
CREATE TABLE ct294376098702073542(
	comInputField106 nvarchar(255),
	comInputField107 nvarchar(255),
	numInputField108 decimal(10,0),
	numInputField109 decimal(10,0),
	numInputField110 decimal(10,0),
	numInputField111 decimal(10,0),
	f_id nvarchar(50) NOT NULL,
	f_foreignId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'子表','SCHEMA',N'dbo','TABLE',N'ct294376098702073542';
EXEC sp_addextendedproperty 'MS_Description',N'商品名','SCHEMA',N'dbo','TABLE',N'ct294376098702073542','COLUMN',N'comInputField106';
EXEC sp_addextendedproperty 'MS_Description',N'编号','SCHEMA',N'dbo','TABLE',N'ct294376098702073542','COLUMN',N'comInputField107';
EXEC sp_addextendedproperty 'MS_Description',N'销售价','SCHEMA',N'dbo','TABLE',N'ct294376098702073542','COLUMN',N'numInputField108';
EXEC sp_addextendedproperty 'MS_Description',N'当前库存','SCHEMA',N'dbo','TABLE',N'ct294376098702073542','COLUMN',N'numInputField109';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'ct294376098702073542','COLUMN',N'numInputField110';
EXEC sp_addextendedproperty 'MS_Description',N'单品总价','SCHEMA',N'dbo','TABLE',N'ct294376098702073542','COLUMN',N'numInputField111';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct294376098702073542','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct294376098702073542','COLUMN',N'f_foreignId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct294376098702073542','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct294382866144468678
-- ----------------------------
CREATE TABLE ct294382866144468678(
	comInputField111 nvarchar(255),
	comInputField112 nvarchar(255),
	numInputField113 decimal(10,0),
	numInputField114 decimal(10,0),
	calculateField118 nvarchar(255),
	numInputField116 decimal(10,0),
	numInputField117 decimal(10,0),
	f_id nvarchar(50) NOT NULL,
	f_foreignId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'子表','SCHEMA',N'dbo','TABLE',N'ct294382866144468678';
EXEC sp_addextendedproperty 'MS_Description',N'商品名称','SCHEMA',N'dbo','TABLE',N'ct294382866144468678','COLUMN',N'comInputField111';
EXEC sp_addextendedproperty 'MS_Description',N'编号','SCHEMA',N'dbo','TABLE',N'ct294382866144468678','COLUMN',N'comInputField112';
EXEC sp_addextendedproperty 'MS_Description',N'采购价','SCHEMA',N'dbo','TABLE',N'ct294382866144468678','COLUMN',N'numInputField113';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'ct294382866144468678','COLUMN',N'numInputField114';
EXEC sp_addextendedproperty 'MS_Description',N'单品总价','SCHEMA',N'dbo','TABLE',N'ct294382866144468678','COLUMN',N'calculateField118';
EXEC sp_addextendedproperty 'MS_Description',N'当前库存','SCHEMA',N'dbo','TABLE',N'ct294382866144468678','COLUMN',N'numInputField116';
EXEC sp_addextendedproperty 'MS_Description',N'入库后库存','SCHEMA',N'dbo','TABLE',N'ct294382866144468678','COLUMN',N'numInputField117';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct294382866144468678','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct294382866144468678','COLUMN',N'f_foreignId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct294382866144468678','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct395899726056134917
-- ----------------------------
CREATE TABLE ct395899726056134917(
	comSelectField111 nvarchar(255),
	depSelectField112 nvarchar(255),
	userSelectField113 nvarchar(255),
	dateField114 datetime,
	f_id nvarchar(50) NOT NULL,
	f_foreignId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'3.4.6新增功能汇总示例-子表','SCHEMA',N'dbo','TABLE',N'ct395899726056134917';
EXEC sp_addextendedproperty 'MS_Description',N'默认当前组织','SCHEMA',N'dbo','TABLE',N'ct395899726056134917','COLUMN',N'comSelectField111';
EXEC sp_addextendedproperty 'MS_Description',N'默认当前部门','SCHEMA',N'dbo','TABLE',N'ct395899726056134917','COLUMN',N'depSelectField112';
EXEC sp_addextendedproperty 'MS_Description',N'默认当前用户','SCHEMA',N'dbo','TABLE',N'ct395899726056134917','COLUMN',N'userSelectField113';
EXEC sp_addextendedproperty 'MS_Description',N'默认当前系统时间','SCHEMA',N'dbo','TABLE',N'ct395899726056134917','COLUMN',N'dateField114';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct395899726056134917','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct395899726056134917','COLUMN',N'f_foreignId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct395899726056134917','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct469496947162544645
-- ----------------------------
CREATE TABLE ct469496947162544645(
	inputField110 nvarchar(255),
	selectField112 nvarchar(255),
	cascaderField114 nvarchar(255),
	textareaField113 nvarchar(255),
	inputNumberField115 decimal(38,15),
	f_id nvarchar(50) NOT NULL,
	f_foreign_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'复杂表头示例-子表','SCHEMA',N'dbo','TABLE',N'ct469496947162544645';
EXEC sp_addextendedproperty 'MS_Description',N'摘要','SCHEMA',N'dbo','TABLE',N'ct469496947162544645','COLUMN',N'inputField110';
EXEC sp_addextendedproperty 'MS_Description',N'下拉选择','SCHEMA',N'dbo','TABLE',N'ct469496947162544645','COLUMN',N'selectField112';
EXEC sp_addextendedproperty 'MS_Description',N'级联选择','SCHEMA',N'dbo','TABLE',N'ct469496947162544645','COLUMN',N'cascaderField114';
EXEC sp_addextendedproperty 'MS_Description',N'说明','SCHEMA',N'dbo','TABLE',N'ct469496947162544645','COLUMN',N'textareaField113';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'ct469496947162544645','COLUMN',N'inputNumberField115';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct469496947162544645','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct469496947162544645','COLUMN',N'f_foreign_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct469496947162544645','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct469499339585157637
-- ----------------------------
CREATE TABLE ct469499339585157637(
	organizeSelectField114 nvarchar(255),
	depSelectField115 nvarchar(255),
	posSelectField116 nvarchar(255),
	userSelectField117 nvarchar(255),
	usersSelectField118 nvarchar(255),
	groupSelectField119 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_foreign_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'高级控件和默认查询-子表','SCHEMA',N'dbo','TABLE',N'ct469499339585157637';
EXEC sp_addextendedproperty 'MS_Description',N'组织选择','SCHEMA',N'dbo','TABLE',N'ct469499339585157637','COLUMN',N'organizeSelectField114';
EXEC sp_addextendedproperty 'MS_Description',N'部门选择','SCHEMA',N'dbo','TABLE',N'ct469499339585157637','COLUMN',N'depSelectField115';
EXEC sp_addextendedproperty 'MS_Description',N'岗位选择','SCHEMA',N'dbo','TABLE',N'ct469499339585157637','COLUMN',N'posSelectField116';
EXEC sp_addextendedproperty 'MS_Description',N'用户选择','SCHEMA',N'dbo','TABLE',N'ct469499339585157637','COLUMN',N'userSelectField117';
EXEC sp_addextendedproperty 'MS_Description',N'用户组件','SCHEMA',N'dbo','TABLE',N'ct469499339585157637','COLUMN',N'usersSelectField118';
EXEC sp_addextendedproperty 'MS_Description',N'分组选择','SCHEMA',N'dbo','TABLE',N'ct469499339585157637','COLUMN',N'groupSelectField119';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct469499339585157637','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct469499339585157637','COLUMN',N'f_foreign_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct469499339585157637','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct585077626071155013
-- ----------------------------
CREATE TABLE ct585077626071155013(
	inputField108 nvarchar(255),
	inputField109 nvarchar(255),
	inputField110 nvarchar(255),
	inputField112 nvarchar(255),
	inputNumberField113 decimal(38,15),
	inputNumberField114 decimal(38,15),
	calculateField115 decimal(38,2),
	f_id nvarchar(50) NOT NULL,
	f_foreign_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'采购合同-子表','SCHEMA',N'dbo','TABLE',N'ct585077626071155013';
EXEC sp_addextendedproperty 'MS_Description',N'产品编号','SCHEMA',N'dbo','TABLE',N'ct585077626071155013','COLUMN',N'inputField108';
EXEC sp_addextendedproperty 'MS_Description',N'产品名称','SCHEMA',N'dbo','TABLE',N'ct585077626071155013','COLUMN',N'inputField109';
EXEC sp_addextendedproperty 'MS_Description',N'规格型号','SCHEMA',N'dbo','TABLE',N'ct585077626071155013','COLUMN',N'inputField110';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'ct585077626071155013','COLUMN',N'inputField112';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'ct585077626071155013','COLUMN',N'inputNumberField113';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'ct585077626071155013','COLUMN',N'inputNumberField114';
EXEC sp_addextendedproperty 'MS_Description',N'小计','SCHEMA',N'dbo','TABLE',N'ct585077626071155013','COLUMN',N'calculateField115';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct585077626071155013','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct585077626071155013','COLUMN',N'f_foreign_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct585077626071155013','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct585113061728190981
-- ----------------------------
CREATE TABLE ct585113061728190981(
	datePickerField101 datetime,
	inputNumberField103 decimal(38,15),
	inputNumberField104 decimal(38,15),
	f_id nvarchar(50) NOT NULL,
	f_foreign_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL,
	inputNumberField105 decimal(38,3)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'水电费用-子表','SCHEMA',N'dbo','TABLE',N'ct585113061728190981';
EXEC sp_addextendedproperty 'MS_Description',N'费用月份','SCHEMA',N'dbo','TABLE',N'ct585113061728190981','COLUMN',N'datePickerField101';
EXEC sp_addextendedproperty 'MS_Description',N'用水量','SCHEMA',N'dbo','TABLE',N'ct585113061728190981','COLUMN',N'inputNumberField103';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'ct585113061728190981','COLUMN',N'inputNumberField104';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct585113061728190981','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct585113061728190981','COLUMN',N'f_foreign_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct585113061728190981','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'合计','SCHEMA',N'dbo','TABLE',N'ct585113061728190981','COLUMN',N'inputNumberField105';
-- ----------------------------
-- 表名：ct585113061732385285
-- ----------------------------
CREATE TABLE ct585113061732385285(
	datePickerField113 datetime,
	inputNumberField114 decimal(38,15),
	inputNumberField115 decimal(38,15),
	f_id nvarchar(50) NOT NULL,
	f_foreign_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL,
	inputNumberField116 decimal(38,3)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'水电费用-子表','SCHEMA',N'dbo','TABLE',N'ct585113061732385285';
EXEC sp_addextendedproperty 'MS_Description',N'费用月份','SCHEMA',N'dbo','TABLE',N'ct585113061732385285','COLUMN',N'datePickerField113';
EXEC sp_addextendedproperty 'MS_Description',N'用电量','SCHEMA',N'dbo','TABLE',N'ct585113061732385285','COLUMN',N'inputNumberField114';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'ct585113061732385285','COLUMN',N'inputNumberField115';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct585113061732385285','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct585113061732385285','COLUMN',N'f_foreign_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct585113061732385285','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'合计','SCHEMA',N'dbo','TABLE',N'ct585113061732385285','COLUMN',N'inputNumberField116';
-- ----------------------------
-- 表名：ct585115948990595589
-- ----------------------------
CREATE TABLE ct585115948990595589(
	inputField111 nvarchar(255),
	inputField112 nvarchar(255),
	inputField113 nvarchar(255),
	inputNumberField114 decimal(38,15),
	inputNumberField115 decimal(38,15),
	f_id nvarchar(50) NOT NULL,
	f_foreign_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL,
	inputNumberField116 decimal(18,3)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'报价信息-子表','SCHEMA',N'dbo','TABLE',N'ct585115948990595589';
EXEC sp_addextendedproperty 'MS_Description',N'品名','SCHEMA',N'dbo','TABLE',N'ct585115948990595589','COLUMN',N'inputField111';
EXEC sp_addextendedproperty 'MS_Description',N'规格','SCHEMA',N'dbo','TABLE',N'ct585115948990595589','COLUMN',N'inputField112';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'ct585115948990595589','COLUMN',N'inputField113';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'ct585115948990595589','COLUMN',N'inputNumberField114';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'ct585115948990595589','COLUMN',N'inputNumberField115';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct585115948990595589','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct585115948990595589','COLUMN',N'f_foreign_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct585115948990595589','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'小计','SCHEMA',N'dbo','TABLE',N'ct585115948990595589','COLUMN',N'inputNumberField116';
-- ----------------------------
-- 表名：ct585115958725575173
-- ----------------------------
CREATE TABLE ct585115958725575173(
	datePickerField115 datetime,
	datePickerField116 datetime,
	inputField117 nvarchar(255),
	inputField118 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_foreign_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'入职申请-子表','SCHEMA',N'dbo','TABLE',N'ct585115958725575173';
EXEC sp_addextendedproperty 'MS_Description',N'开始年月','SCHEMA',N'dbo','TABLE',N'ct585115958725575173','COLUMN',N'datePickerField115';
EXEC sp_addextendedproperty 'MS_Description',N'日期选择','SCHEMA',N'dbo','TABLE',N'ct585115958725575173','COLUMN',N'datePickerField116';
EXEC sp_addextendedproperty 'MS_Description',N'院校名称','SCHEMA',N'dbo','TABLE',N'ct585115958725575173','COLUMN',N'inputField117';
EXEC sp_addextendedproperty 'MS_Description',N'专业','SCHEMA',N'dbo','TABLE',N'ct585115958725575173','COLUMN',N'inputField118';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct585115958725575173','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct585115958725575173','COLUMN',N'f_foreign_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct585115958725575173','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ct585115958725575174
-- ----------------------------
CREATE TABLE ct585115958725575174(
	datePickerField120 datetime,
	datePickerField121 datetime,
	inputField122 nvarchar(255),
	inputField123 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_foreign_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'入职申请-子表','SCHEMA',N'dbo','TABLE',N'ct585115958725575174';
EXEC sp_addextendedproperty 'MS_Description',N'开始年月','SCHEMA',N'dbo','TABLE',N'ct585115958725575174','COLUMN',N'datePickerField120';
EXEC sp_addextendedproperty 'MS_Description',N'日期选择','SCHEMA',N'dbo','TABLE',N'ct585115958725575174','COLUMN',N'datePickerField121';
EXEC sp_addextendedproperty 'MS_Description',N'工作单位','SCHEMA',N'dbo','TABLE',N'ct585115958725575174','COLUMN',N'inputField122';
EXEC sp_addextendedproperty 'MS_Description',N'职位','SCHEMA',N'dbo','TABLE',N'ct585115958725575174','COLUMN',N'inputField123';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ct585115958725575174','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'外键','SCHEMA',N'dbo','TABLE',N'ct585115958725575174','COLUMN',N'f_foreign_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ct585115958725575174','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：data_report
-- ----------------------------
CREATE TABLE data_report(
	F_Id nvarchar(50) NOT NULL,
	F_CategoryId nvarchar(50),
	F_FullName nvarchar(50),
	F_Content nvarchar(max),
	F_EnCode nvarchar(50),
	F_SortCode nvarchar(50),
	F_EnabledMark int,
	F_Description nvarchar(500),
	F_CreatorTime datetime,
	F_CreatorUserId nvarchar(50),
	F_LastModifyTime datetime,
	F_LastModifyUserId nvarchar(50),
	F_DeleteMark int,
	F_DeleteTime datetime,
	F_DeleteUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'数据报表','SCHEMA',N'dbo','TABLE',N'data_report';
EXEC sp_addextendedproperty 'MS_Description',N'主键ID','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'分组ID','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_CategoryId';
EXEC sp_addextendedproperty 'MS_Description',N'报表名称','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_FullName';
EXEC sp_addextendedproperty 'MS_Description',N'报表内容','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_Content';
EXEC sp_addextendedproperty 'MS_Description',N'编码','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_EnCode';
EXEC sp_addextendedproperty 'MS_Description',N'排序码(默认0)','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'状态(0-默认，禁用，1-启用)','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_EnabledMark';
EXEC sp_addextendedproperty 'MS_Description',N'描述或说明','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_LastModifyTime';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_LastModifyUserId';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志(默认0)','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_DeleteMark';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_DeleteTime';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户id','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'F_DeleteUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'data_report','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ext_big_data
-- ----------------------------
CREATE TABLE ext_big_data(
	f_id nvarchar(50) NOT NULL,
	f_en_code nvarchar(200),
	f_full_name nvarchar(200),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'大数据测试','SCHEMA',N'dbo','TABLE',N'ext_big_data';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'编号','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_en_code';
EXEC sp_addextendedproperty 'MS_Description',N'名称','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_full_name';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ext_big_data','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ext_customer
-- ----------------------------
CREATE TABLE ext_customer(
	f_id nvarchar(50) NOT NULL,
	f_en_code nvarchar(50),
	f_customer_name nvarchar(50),
	f_address nvarchar(255),
	f_full_name nvarchar(50),
	f_contact_tel nvarchar(50),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_mark int,
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'文档中心记录表','SCHEMA',N'dbo','TABLE',N'ext_document_log';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'ext_document_log','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'文档主键','SCHEMA',N'dbo','TABLE',N'ext_document_log','COLUMN',N'f_document_id';
EXEC sp_addextendedproperty 'MS_Description',N'子文件id','SCHEMA',N'dbo','TABLE',N'ext_document_log','COLUMN',N'f_child_document';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'ext_document_log','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'ext_document_log','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'ext_document_log','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'ext_document_log','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'ext_document_log','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'ext_document_log','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'ext_document_log','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ext_document_log','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ext_document_share
-- ----------------------------
CREATE TABLE ext_document_share(
	f_id nvarchar(50) NOT NULL,
	f_document_id nvarchar(50),
	f_share_user_id nvarchar(50),
	f_share_time datetime,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'知识文档共享','SCHEMA',N'dbo','TABLE',N'ext_document_share';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'文档主键','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_document_id';
EXEC sp_addextendedproperty 'MS_Description',N'共享人员','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_share_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'共享时间','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_share_time';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ext_document_share','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ext_email_config
-- ----------------------------
CREATE TABLE ext_email_config(
	f_id nvarchar(50) NOT NULL,
	f_pop3_host nvarchar(50),
	f_pop3_port int,
	f_smtp_host nvarchar(50),
	f_smtp_port int,
	f_account nvarchar(50),
	f_password nvarchar(50),
	f_ssl int,
	f_sender_name nvarchar(50),
	f_folder_json nvarchar(max),
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

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

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

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

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

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

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'订单收款','SCHEMA',N'dbo','TABLE',N'ext_order_receivable';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'订单主键','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_order_id';
EXEC sp_addextendedproperty 'MS_Description',N'收款摘要','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_abstract';
EXEC sp_addextendedproperty 'MS_Description',N'收款日期','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_receivable_date';
EXEC sp_addextendedproperty 'MS_Description',N'收款比率','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_receivable_rate';
EXEC sp_addextendedproperty 'MS_Description',N'收款金额','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_receivable_money';
EXEC sp_addextendedproperty 'MS_Description',N'收款方式','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_receivable_mode';
EXEC sp_addextendedproperty 'MS_Description',N'收款状态','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_receivable_state';
EXEC sp_addextendedproperty 'MS_Description',N'描述或说明','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_description';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ext_order_receivable','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ext_order_receivable_2
-- ----------------------------
CREATE TABLE ext_order_receivable_2(
	f_id nvarchar(50) NOT NULL,
	f_order_id nvarchar(50),
	f_abstract nvarchar(500),
	f_receivable_date datetime,
	f_receivable_rate decimal(18,2),
	f_receivable_money decimal(18,2),
	f_receivable_mode nvarchar(50),
	f_receivable_state int,
	f_description nvarchar(500),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'产品分类','SCHEMA',N'dbo','TABLE',N'ext_product_classify';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'上级','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_parent_id';
EXEC sp_addextendedproperty 'MS_Description',N'名称','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_full_name';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ext_product_classify','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ext_product_entry
-- ----------------------------
CREATE TABLE ext_product_entry(
	f_id nvarchar(50) NOT NULL,
	f_product_id nvarchar(50),
	f_product_code nvarchar(50),
	f_product_name nvarchar(50),
	f_product_specification nvarchar(50),
	f_qty int,
	f_command_type nvarchar(50),
	f_type nvarchar(50),
	f_money decimal(18,2),
	f_util nvarchar(50),
	f_price decimal(18,2),
	f_amount decimal(18,2),
	f_activity nvarchar(50),
	f_description nvarchar(500),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'产品商品','SCHEMA',N'dbo','TABLE',N'ext_product_goods';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'分类主键','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_classify_id';
EXEC sp_addextendedproperty 'MS_Description',N'产品编号','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_en_code';
EXEC sp_addextendedproperty 'MS_Description',N'产品名称','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_full_name';
EXEC sp_addextendedproperty 'MS_Description',N'产品分类','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_type';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_amount';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_money';
EXEC sp_addextendedproperty 'MS_Description',N'产品规格','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_product_specification';
EXEC sp_addextendedproperty 'MS_Description',N'库存数','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_qty';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ext_product_goods','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：ext_project_gantt
-- ----------------------------
CREATE TABLE ext_project_gantt(
	f_id nvarchar(50) NOT NULL,
	f_parent_id nvarchar(50),
	f_project_id nvarchar(50),
	f_type int,
	f_en_code nvarchar(50),
	f_full_name nvarchar(50),
	f_time_limit decimal(18,0),
	f_sign nvarchar(50),
	f_sign_color nvarchar(50),
	f_start_time datetime,
	f_end_time datetime,
	f_schedule int,
	f_manager_ids nvarchar(max),
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'工作日志分享','SCHEMA',N'dbo','TABLE',N'ext_work_log_share';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'日志主键','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_work_log_id';
EXEC sp_addextendedproperty 'MS_Description',N'共享人员','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_share_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'共享时间','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_share_time';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'ext_work_log_share','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：mt293714178051447621
-- ----------------------------
CREATE TABLE mt293714178051447621(
	comInputField115 nvarchar(255),
	comInputField103 nvarchar(255),
	dateField102 datetime,
	selectField111 nvarchar(255),
	comInputField110 nvarchar(255),
	comInputField104 nvarchar(255),
	comInputField112 nvarchar(255),
	comInputField113 nvarchar(255),
	numInputField116 decimal(10,0),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt293714178051447621';
EXEC sp_addextendedproperty 'MS_Description',N'编号','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'comInputField115';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'comInputField103';
EXEC sp_addextendedproperty 'MS_Description',N'报名时间','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'dateField102';
EXEC sp_addextendedproperty 'MS_Description',N'性别','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'selectField111';
EXEC sp_addextendedproperty 'MS_Description',N'年纪','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'comInputField110';
EXEC sp_addextendedproperty 'MS_Description',N'联系电话','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'comInputField104';
EXEC sp_addextendedproperty 'MS_Description',N'籍贯','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'comInputField112';
EXEC sp_addextendedproperty 'MS_Description',N'家庭地址','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'comInputField113';
EXEC sp_addextendedproperty 'MS_Description',N'报名费用','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'numInputField116';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt293714178051447621','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt293732572561709893
-- ----------------------------
CREATE TABLE mt293732572561709893(
	billRuleField119 nvarchar(255),
	comInputField102 nvarchar(255),
	comInputField103 nvarchar(255),
	comInputField104 nvarchar(255),
	comInputField105 nvarchar(255),
	comInputField106 nvarchar(255),
	comInputField107 nvarchar(255),
	radioField108 nvarchar(255),
	radioField109 nvarchar(255),
	comInputField110 nvarchar(255),
	comInputField111 nvarchar(255),
	comInputField112 nvarchar(255),
	comInputField113 nvarchar(255),
	dateField114 datetime,
	comInputField115 nvarchar(255),
	comInputField116 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt293732572561709893';
EXEC sp_addextendedproperty 'MS_Description',N'编号','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'billRuleField119';
EXEC sp_addextendedproperty 'MS_Description',N'购药人','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField102';
EXEC sp_addextendedproperty 'MS_Description',N'药品名称','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField103';
EXEC sp_addextendedproperty 'MS_Description',N'身份证号','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField104';
EXEC sp_addextendedproperty 'MS_Description',N'现住址','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField105';
EXEC sp_addextendedproperty 'MS_Description',N'所属街道社区','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField106';
EXEC sp_addextendedproperty 'MS_Description',N'电话','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField107';
EXEC sp_addextendedproperty 'MS_Description',N'是否有重点地区旅居史','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'radioField108';
EXEC sp_addextendedproperty 'MS_Description',N'症状描述（是否发热、咳嗽）','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'radioField109';
EXEC sp_addextendedproperty 'MS_Description',N'工作单位','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField110';
EXEC sp_addextendedproperty 'MS_Description',N'症状','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField111';
EXEC sp_addextendedproperty 'MS_Description',N'营业员','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField112';
EXEC sp_addextendedproperty 'MS_Description',N'联系人电话','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField113';
EXEC sp_addextendedproperty 'MS_Description',N'销售时间','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'dateField114';
EXEC sp_addextendedproperty 'MS_Description',N'药房名称','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField115';
EXEC sp_addextendedproperty 'MS_Description',N'许可证','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'comInputField116';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt293732572561709893','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt293737725377420101
-- ----------------------------
CREATE TABLE mt293737725377420101(
	billRuleField110 nvarchar(255),
	comInputField101 nvarchar(255),
	comInputField102 nvarchar(255),
	uploadFzField109 nvarchar(max),
	dateField105 datetime,
	comInputField106 nvarchar(255),
	comInputField107 nvarchar(255),
	selectField108 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt293737725377420101';
EXEC sp_addextendedproperty 'MS_Description',N'编号','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'billRuleField110';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'comInputField101';
EXEC sp_addextendedproperty 'MS_Description',N'身份证号/护照','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'comInputField102';
EXEC sp_addextendedproperty 'MS_Description',N'身份证','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'uploadFzField109';
EXEC sp_addextendedproperty 'MS_Description',N'核酸检测时间','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'dateField105';
EXEC sp_addextendedproperty 'MS_Description',N'联系方式（手机或座机）','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'comInputField106';
EXEC sp_addextendedproperty 'MS_Description',N'家庭住址','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'comInputField107';
EXEC sp_addextendedproperty 'MS_Description',N'所在社区','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'selectField108';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt293737725377420101','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt293740367726025541
-- ----------------------------
CREATE TABLE mt293740367726025541(
	billRuleField101 nvarchar(255),
	selectField102 nvarchar(255),
	comInputField116 nvarchar(255),
	selectField115 nvarchar(255),
	numInputField105 decimal(10,0),
	numInputField106 decimal(10,0),
	uploadImgField107 nvarchar(max),
	textareaField108 nvarchar(255),
	createUserField110 nvarchar(255),
	createTimeField111 datetime,
	modifyTimeField113 datetime,
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt293740367726025541';
EXEC sp_addextendedproperty 'MS_Description',N'产品编码','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'billRuleField101';
EXEC sp_addextendedproperty 'MS_Description',N'产品分类','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'selectField102';
EXEC sp_addextendedproperty 'MS_Description',N'产品名称','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'comInputField116';
EXEC sp_addextendedproperty 'MS_Description',N'产品型号','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'selectField115';
EXEC sp_addextendedproperty 'MS_Description',N'采购单价','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'numInputField105';
EXEC sp_addextendedproperty 'MS_Description',N'销售单价','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'numInputField106';
EXEC sp_addextendedproperty 'MS_Description',N'产品图片','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'uploadImgField107';
EXEC sp_addextendedproperty 'MS_Description',N'产品描述','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'textareaField108';
EXEC sp_addextendedproperty 'MS_Description',N'提交人','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'createUserField110';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'createTimeField111';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'modifyTimeField113';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt293740367726025541','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt293756710756064069
-- ----------------------------
CREATE TABLE mt293756710756064069(
	billRuleField102 nvarchar(255),
	userSelectField103 nvarchar(255),
	dateField108 datetime,
	dateField104 datetime,
	dateField105 datetime,
	textareaField107 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt293756710756064069';
EXEC sp_addextendedproperty 'MS_Description',N'编号','SCHEMA',N'dbo','TABLE',N'mt293756710756064069','COLUMN',N'billRuleField102';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'mt293756710756064069','COLUMN',N'userSelectField103';
EXEC sp_addextendedproperty 'MS_Description',N'申请时间','SCHEMA',N'dbo','TABLE',N'mt293756710756064069','COLUMN',N'dateField108';
EXEC sp_addextendedproperty 'MS_Description',N'用车时间','SCHEMA',N'dbo','TABLE',N'mt293756710756064069','COLUMN',N'dateField104';
EXEC sp_addextendedproperty 'MS_Description',N'归还时间','SCHEMA',N'dbo','TABLE',N'mt293756710756064069','COLUMN',N'dateField105';
EXEC sp_addextendedproperty 'MS_Description',N'申请备注','SCHEMA',N'dbo','TABLE',N'mt293756710756064069','COLUMN',N'textareaField107';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt293756710756064069','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt293756710756064069','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt293756710756064069','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt293756710756064069','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt293756710756064069','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt294012196562705413
-- ----------------------------
CREATE TABLE mt294012196562705413(
	comInputField102 nvarchar(255),
	radioField103 nvarchar(255),
	numInputField113 decimal(10,0),
	comInputField104 nvarchar(255),
	comInputField105 nvarchar(255),
	uploadFzField106 nvarchar(max),
	textareaField115 nvarchar(255),
	comInputField107 nvarchar(255),
	comInputField108 nvarchar(255),
	comInputField109 nvarchar(255),
	comInputField110 nvarchar(255),
	selectField112 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_inte_assistant int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt294012196562705413';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'comInputField102';
EXEC sp_addextendedproperty 'MS_Description',N'性别','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'radioField103';
EXEC sp_addextendedproperty 'MS_Description',N'年纪','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'numInputField113';
EXEC sp_addextendedproperty 'MS_Description',N'联系电话','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'comInputField104';
EXEC sp_addextendedproperty 'MS_Description',N'邮箱','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'comInputField105';
EXEC sp_addextendedproperty 'MS_Description',N'简历附件','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'uploadFzField106';
EXEC sp_addextendedproperty 'MS_Description',N'家庭地址','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'textareaField115';
EXEC sp_addextendedproperty 'MS_Description',N'身份证号','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'comInputField107';
EXEC sp_addextendedproperty 'MS_Description',N'出生日期','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'comInputField108';
EXEC sp_addextendedproperty 'MS_Description',N'毕业院校','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'comInputField109';
EXEC sp_addextendedproperty 'MS_Description',N'专业名称','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'comInputField110';
EXEC sp_addextendedproperty 'MS_Description',N'最高学历','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'selectField112';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'f_inte_assistant';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt294012196562705413','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt294022926196317189
-- ----------------------------
CREATE TABLE mt294022926196317189(
	comInputField101 nvarchar(255),
	radioField102 nvarchar(255),
	selectField103 nvarchar(255),
	comInputField104 nvarchar(255),
	selectField105 nvarchar(255),
	selectField106 nvarchar(255),
	comInputField107 nvarchar(255),
	comInputField108 nvarchar(255),
	comInputField109 nvarchar(255),
	textareaField110 nvarchar(255),
	addressField111 nvarchar(max),
	comInputField153 nvarchar(255),
	comInputField114 nvarchar(255),
	comInputField117 nvarchar(255),
	selectField119 nvarchar(255),
	selectField120 nvarchar(255),
	selectField121 nvarchar(255),
	selectField122 nvarchar(255),
	comInputField123 nvarchar(255),
	dateField125 datetime,
	selectField126 nvarchar(255),
	textareaField127 nvarchar(255),
	comInputField128 nvarchar(255),
	comInputField129 nvarchar(255),
	comInputField130 nvarchar(255),
	dateField131 datetime,
	comInputField132 nvarchar(255),
	comInputField133 nvarchar(255),
	selectField134 nvarchar(255),
	dateField135 datetime,
	addressField138 nvarchar(max),
	comInputField139 nvarchar(255),
	comInputField140 nvarchar(255),
	comInputField141 nvarchar(255),
	selectField142 nvarchar(255),
	dateField143 datetime,
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_inte_assistant int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt294022926196317189';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField101';
EXEC sp_addextendedproperty 'MS_Description',N'性别','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'radioField102';
EXEC sp_addextendedproperty 'MS_Description',N'送诊','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'selectField103';
EXEC sp_addextendedproperty 'MS_Description',N'送诊地址','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField104';
EXEC sp_addextendedproperty 'MS_Description',N'发热','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'selectField105';
EXEC sp_addextendedproperty 'MS_Description',N'证件类型','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'selectField106';
EXEC sp_addextendedproperty 'MS_Description',N'证件号','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField107';
EXEC sp_addextendedproperty 'MS_Description',N'联系方式','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField108';
EXEC sp_addextendedproperty 'MS_Description',N'人员状态','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField109';
EXEC sp_addextendedproperty 'MS_Description',N'人员状态备注','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'textareaField110';
EXEC sp_addextendedproperty 'MS_Description',N'区县','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'addressField111';
EXEC sp_addextendedproperty 'MS_Description',N'街道','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField153';
EXEC sp_addextendedproperty 'MS_Description',N'社区','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField114';
EXEC sp_addextendedproperty 'MS_Description',N'具体地址','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField117';
EXEC sp_addextendedproperty 'MS_Description',N'管控状态','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'selectField119';
EXEC sp_addextendedproperty 'MS_Description',N'管控隔离类型','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'selectField120';
EXEC sp_addextendedproperty 'MS_Description',N'人员类型（一级）','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'selectField121';
EXEC sp_addextendedproperty 'MS_Description',N'人员类型（二级）','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'selectField122';
EXEC sp_addextendedproperty 'MS_Description',N'密接相关人','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField123';
EXEC sp_addextendedproperty 'MS_Description',N'返回时间','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'dateField125';
EXEC sp_addextendedproperty 'MS_Description',N'交通方式','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'selectField126';
EXEC sp_addextendedproperty 'MS_Description',N'返回后活动路径','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'textareaField127';
EXEC sp_addextendedproperty 'MS_Description',N'返回经过地','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField128';
EXEC sp_addextendedproperty 'MS_Description',N'同行人员','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField129';
EXEC sp_addextendedproperty 'MS_Description',N'接触人员','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField130';
EXEC sp_addextendedproperty 'MS_Description',N'填写时间','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'dateField131';
EXEC sp_addextendedproperty 'MS_Description',N'机构名称','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField132';
EXEC sp_addextendedproperty 'MS_Description',N'机构编号','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField133';
EXEC sp_addextendedproperty 'MS_Description',N'社区/农村','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'selectField134';
EXEC sp_addextendedproperty 'MS_Description',N'离开日期','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'dateField135';
EXEC sp_addextendedproperty 'MS_Description',N'返回前前出发地','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'addressField138';
EXEC sp_addextendedproperty 'MS_Description',N'核酸检测','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField139';
EXEC sp_addextendedproperty 'MS_Description',N'第一次检测结果','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField140';
EXEC sp_addextendedproperty 'MS_Description',N'第二次检测结果','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'comInputField141';
EXEC sp_addextendedproperty 'MS_Description',N'是否才去信息化管控','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'selectField142';
EXEC sp_addextendedproperty 'MS_Description',N'本次管控日期','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'dateField143';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'f_inte_assistant';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt294022926196317189','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt294027801932110853
-- ----------------------------
CREATE TABLE mt294027801932110853(
	comInputField101 nvarchar(255),
	comInputField102 nvarchar(255),
	currOrganizeField103 nvarchar(255),
	numInputField104 decimal(10,0),
	numInputField105 decimal(10,0),
	numInputField106 decimal(10,0),
	numInputField107 decimal(10,0),
	numInputField108 decimal(10,0),
	numInputField109 decimal(10,0),
	numInputField110 decimal(10,0),
	numInputField111 decimal(10,0),
	numInputField112 decimal(10,0),
	numInputField113 decimal(10,0),
	numInputField114 decimal(10,0),
	numInputField115 decimal(10,0),
	numInputField116 decimal(10,0),
	numInputField117 decimal(10,0),
	numInputField118 decimal(10,0),
	numInputField119 decimal(10,0),
	numInputField120 decimal(10,0),
	numInputField121 decimal(10,0),
	textareaField122 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_inte_assistant int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt294027801932110853';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'comInputField101';
EXEC sp_addextendedproperty 'MS_Description',N'工号','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'comInputField102';
EXEC sp_addextendedproperty 'MS_Description',N'部门','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'currOrganizeField103';
EXEC sp_addextendedproperty 'MS_Description',N'基本工资','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField104';
EXEC sp_addextendedproperty 'MS_Description',N'岗位工资','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField105';
EXEC sp_addextendedproperty 'MS_Description',N'补贴金额','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField106';
EXEC sp_addextendedproperty 'MS_Description',N'绩效/每月','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField107';
EXEC sp_addextendedproperty 'MS_Description',N'迟到早退扣款','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField108';
EXEC sp_addextendedproperty 'MS_Description',N'病假扣款','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField109';
EXEC sp_addextendedproperty 'MS_Description',N'事假扣款','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField110';
EXEC sp_addextendedproperty 'MS_Description',N'旷工扣款','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField111';
EXEC sp_addextendedproperty 'MS_Description',N'应发工资','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField112';
EXEC sp_addextendedproperty 'MS_Description',N'个人养老保险','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField113';
EXEC sp_addextendedproperty 'MS_Description',N'个人医疗保险','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField114';
EXEC sp_addextendedproperty 'MS_Description',N'个人事业险','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField115';
EXEC sp_addextendedproperty 'MS_Description',N'个人大病险','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField116';
EXEC sp_addextendedproperty 'MS_Description',N'个人公积金','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField117';
EXEC sp_addextendedproperty 'MS_Description',N'累计收入','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField118';
EXEC sp_addextendedproperty 'MS_Description',N'累计扣减个税','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField119';
EXEC sp_addextendedproperty 'MS_Description',N'累计应纳税所得额','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField120';
EXEC sp_addextendedproperty 'MS_Description',N'本期个税','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'numInputField121';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'textareaField122';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'f_inte_assistant';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt294027801932110853','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt294031961024928773
-- ----------------------------
CREATE TABLE mt294031961024928773(
	selectField101 nvarchar(255),
	userSelectField102 nvarchar(255),
	comInputField118 nvarchar(255),
	depSelectField105 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt294031961024928773';
EXEC sp_addextendedproperty 'MS_Description',N'评估周期','SCHEMA',N'dbo','TABLE',N'mt294031961024928773','COLUMN',N'selectField101';
EXEC sp_addextendedproperty 'MS_Description',N'评估人','SCHEMA',N'dbo','TABLE',N'mt294031961024928773','COLUMN',N'userSelectField102';
EXEC sp_addextendedproperty 'MS_Description',N'工号','SCHEMA',N'dbo','TABLE',N'mt294031961024928773','COLUMN',N'comInputField118';
EXEC sp_addextendedproperty 'MS_Description',N'部门','SCHEMA',N'dbo','TABLE',N'mt294031961024928773','COLUMN',N'depSelectField105';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt294031961024928773','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt294031961024928773','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294031961024928773','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt294031961024928773','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt294031961024928773','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt294037561750363141
-- ----------------------------
CREATE TABLE mt294037561750363141(
	comInputField101 nvarchar(255),
	comInputField102 nvarchar(255),
	comInputField103 nvarchar(255),
	userSelectField104 nvarchar(255),
	comInputField105 nvarchar(255),
	createUserField126 nvarchar(255),
	createTimeField123 datetime,
	modifyTimeField127 datetime,
	uploadImgField106 nvarchar(max),
	f_id nvarchar(50) NOT NULL,
	f_version int,
	f_flowtaskid nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt294037561750363141';
EXEC sp_addextendedproperty 'MS_Description',N'设备名称','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'comInputField101';
EXEC sp_addextendedproperty 'MS_Description',N'设备编号','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'comInputField102';
EXEC sp_addextendedproperty 'MS_Description',N'所在位置','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'comInputField103';
EXEC sp_addextendedproperty 'MS_Description',N'责任人','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'userSelectField104';
EXEC sp_addextendedproperty 'MS_Description',N'联系方式','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'comInputField105';
EXEC sp_addextendedproperty 'MS_Description',N'提交人','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'createUserField126';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'createTimeField123';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'modifyTimeField127';
EXEC sp_addextendedproperty 'MS_Description',N'设备图片','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'uploadImgField106';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'f_flowtaskid';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt294037561750363141','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt294090217118276613
-- ----------------------------
CREATE TABLE mt294090217118276613(
	selectField102 nvarchar(255),
	selectField103 nvarchar(255),
	dateField104 datetime,
	dateField105 datetime,
	comInputField106 nvarchar(255),
	comInputField107 nvarchar(255),
	selectField108 nvarchar(255),
	comInputField109 nvarchar(255),
	comInputField110 nvarchar(255),
	comInputField111 nvarchar(255),
	comInputField112 nvarchar(255),
	dateField129 datetime,
	comInputField113 nvarchar(255),
	userSelectField125 nvarchar(255),
	selectField124 nvarchar(255),
	textareaField114 nvarchar(255),
	textareaField115 nvarchar(255),
	textareaField126 nvarchar(255),
	comInputField130 nvarchar(255),
	dateField131 datetime,
	selectField127 nvarchar(255),
	selectField128 nvarchar(255),
	selectField121 nvarchar(255),
	selectField122 nvarchar(255),
	uploadFzField123 nvarchar(max),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flowid nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_flow_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt294090217118276613';
EXEC sp_addextendedproperty 'MS_Description',N'上报部门','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'selectField102';
EXEC sp_addextendedproperty 'MS_Description',N'药剂科分部门','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'selectField103';
EXEC sp_addextendedproperty 'MS_Description',N'上报时间','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'dateField104';
EXEC sp_addextendedproperty 'MS_Description',N'差错时间','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'dateField105';
EXEC sp_addextendedproperty 'MS_Description',N'病历/门诊号','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'comInputField106';
EXEC sp_addextendedproperty 'MS_Description',N'患者姓名','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'comInputField107';
EXEC sp_addextendedproperty 'MS_Description',N'性别','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'selectField108';
EXEC sp_addextendedproperty 'MS_Description',N'年龄','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'comInputField109';
EXEC sp_addextendedproperty 'MS_Description',N'诊断','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'comInputField110';
EXEC sp_addextendedproperty 'MS_Description',N'发现人员','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'comInputField111';
EXEC sp_addextendedproperty 'MS_Description',N'差错人员','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'comInputField112';
EXEC sp_addextendedproperty 'MS_Description',N'发生日期','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'dateField129';
EXEC sp_addextendedproperty 'MS_Description',N'药品名称','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'comInputField113';
EXEC sp_addextendedproperty 'MS_Description',N'当前处理人','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'userSelectField125';
EXEC sp_addextendedproperty 'MS_Description',N'流程状态','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'selectField124';
EXEC sp_addextendedproperty 'MS_Description',N'差错详情','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'textareaField114';
EXEC sp_addextendedproperty 'MS_Description',N'建议改进措施','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'textareaField115';
EXEC sp_addextendedproperty 'MS_Description',N'处理结果','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'textareaField126';
EXEC sp_addextendedproperty 'MS_Description',N'来文号','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'comInputField130';
EXEC sp_addextendedproperty 'MS_Description',N'来文日期','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'dateField131';
EXEC sp_addextendedproperty 'MS_Description',N'环节','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'selectField127';
EXEC sp_addextendedproperty 'MS_Description',N'原因','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'selectField128';
EXEC sp_addextendedproperty 'MS_Description',N'事件等级','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'selectField121';
EXEC sp_addextendedproperty 'MS_Description',N'事件级别','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'selectField122';
EXEC sp_addextendedproperty 'MS_Description',N'附件','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'uploadFzField123';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'f_flowid';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt294090217118276613','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt294099237023526085
-- ----------------------------
CREATE TABLE mt294099237023526085(
	userSelectField101 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt294099237023526085';
EXEC sp_addextendedproperty 'MS_Description',N'用户选择','SCHEMA',N'dbo','TABLE',N'mt294099237023526085','COLUMN',N'userSelectField101';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt294099237023526085','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt294099237023526085','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：mt294099893327272965
-- ----------------------------
CREATE TABLE mt294099893327272965(
	userSelectField102 nvarchar(255),
	currOrganizeField103 nvarchar(255),
	dateField104 datetime,
	dateField105 datetime,
	dateField106 datetime,
	createUserField112 nvarchar(255),
	createTimeField113 datetime,
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flowid nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_flow_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt294099893327272965';
EXEC sp_addextendedproperty 'MS_Description',N'出差申请人','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'userSelectField102';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'currOrganizeField103';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'dateField104';
EXEC sp_addextendedproperty 'MS_Description',N'出差日期','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'dateField105';
EXEC sp_addextendedproperty 'MS_Description',N'归来日期','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'dateField106';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'createUserField112';
EXEC sp_addextendedproperty 'MS_Description',N'申请时间','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'createTimeField113';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'f_flowid';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt294099893327272965','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt294104577349819397
-- ----------------------------
CREATE TABLE mt294104577349819397(
	depSelectField102 nvarchar(255),
	dateField103 datetime,
	dateField104 datetime,
	dateField105 datetime,
	numInputField107 decimal(10,0),
	comInputField108 nvarchar(255),
	textareaField109 nvarchar(255),
	createUserField110 nvarchar(255),
	createTimeField111 datetime,
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt294104577349819397';
EXEC sp_addextendedproperty 'MS_Description',N'部门','SCHEMA',N'dbo','TABLE',N'mt294104577349819397','COLUMN',N'depSelectField102';
EXEC sp_addextendedproperty 'MS_Description',N'当前时间','SCHEMA',N'dbo','TABLE',N'mt294104577349819397','COLUMN',N'dateField103';
EXEC sp_addextendedproperty 'MS_Description',N'预算年份','SCHEMA',N'dbo','TABLE',N'mt294104577349819397','COLUMN',N'dateField104';
EXEC sp_addextendedproperty 'MS_Description',N'预算月份','SCHEMA',N'dbo','TABLE',N'mt294104577349819397','COLUMN',N'dateField105';
EXEC sp_addextendedproperty 'MS_Description',N'预算金额','SCHEMA',N'dbo','TABLE',N'mt294104577349819397','COLUMN',N'numInputField107';
EXEC sp_addextendedproperty 'MS_Description',N'金额大写','SCHEMA',N'dbo','TABLE',N'mt294104577349819397','COLUMN',N'comInputField108';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'mt294104577349819397','COLUMN',N'textareaField109';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'mt294104577349819397','COLUMN',N'createUserField110';
EXEC sp_addextendedproperty 'MS_Description',N'申请时间','SCHEMA',N'dbo','TABLE',N'mt294104577349819397','COLUMN',N'createTimeField111';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt294104577349819397','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt294104577349819397','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：mt294376098702073541
-- ----------------------------
CREATE TABLE mt294376098702073541(
	billRuleField101 nvarchar(255),
	comInputField102 nvarchar(255),
	comInputField103 nvarchar(255),
	textareaField104 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt294376098702073541';
EXEC sp_addextendedproperty 'MS_Description',N'内部订单号','SCHEMA',N'dbo','TABLE',N'mt294376098702073541','COLUMN',N'billRuleField101';
EXEC sp_addextendedproperty 'MS_Description',N'客户名称','SCHEMA',N'dbo','TABLE',N'mt294376098702073541','COLUMN',N'comInputField102';
EXEC sp_addextendedproperty 'MS_Description',N'联系电话','SCHEMA',N'dbo','TABLE',N'mt294376098702073541','COLUMN',N'comInputField103';
EXEC sp_addextendedproperty 'MS_Description',N'详细地址','SCHEMA',N'dbo','TABLE',N'mt294376098702073541','COLUMN',N'textareaField104';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt294376098702073541','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt294376098702073541','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294376098702073541','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt294376098702073541','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt294376098702073541','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt294382866144468677
-- ----------------------------
CREATE TABLE mt294382866144468677(
	billRuleField102 nvarchar(255),
	comInputField104 nvarchar(255),
	selectField105 nvarchar(255),
	depSelectField106 nvarchar(255),
	comInputField108 nvarchar(255),
	userSelectField109 nvarchar(255),
	uploadFzField119 nvarchar(max),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flowid nvarchar(50),
	f_flow_id nvarchar(50),
	f_inte_assistant int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'mt294382866144468677';
EXEC sp_addextendedproperty 'MS_Description',N'订单号','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'billRuleField102';
EXEC sp_addextendedproperty 'MS_Description',N'供应商','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'comInputField104';
EXEC sp_addextendedproperty 'MS_Description',N'仓库','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'selectField105';
EXEC sp_addextendedproperty 'MS_Description',N'采购部门','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'depSelectField106';
EXEC sp_addextendedproperty 'MS_Description',N'部门代号','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'comInputField108';
EXEC sp_addextendedproperty 'MS_Description',N'业务负责人','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'userSelectField109';
EXEC sp_addextendedproperty 'MS_Description',N'发票上传','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'uploadFzField119';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'f_flowid';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'f_inte_assistant';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt294382866144468677','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt382811547782648325
-- ----------------------------
CREATE TABLE mt382811547782648325(
	comInputField101 nvarchar(255),
	textareaField102 nvarchar(255),
	numInputField103 decimal(38,0),
	f_flowid nvarchar(255),
	f_version int,
	f_flowtaskid nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_inte_assistant int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'0111流程表单-主表','SCHEMA',N'dbo','TABLE',N'mt382811547782648325';
EXEC sp_addextendedproperty 'MS_Description',N'单行输入','SCHEMA',N'dbo','TABLE',N'mt382811547782648325','COLUMN',N'comInputField101';
EXEC sp_addextendedproperty 'MS_Description',N'多行输入','SCHEMA',N'dbo','TABLE',N'mt382811547782648325','COLUMN',N'textareaField102';
EXEC sp_addextendedproperty 'MS_Description',N'数字输入','SCHEMA',N'dbo','TABLE',N'mt382811547782648325','COLUMN',N'numInputField103';
EXEC sp_addextendedproperty 'MS_Description',N'流程引擎id','SCHEMA',N'dbo','TABLE',N'mt382811547782648325','COLUMN',N'f_flowid';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt382811547782648325','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt382811547782648325','COLUMN',N'f_flowtaskid';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt382811547782648325','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt382811547782648325','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt382811547782648325','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt382811547782648325','COLUMN',N'f_inte_assistant';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt382811547782648325','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt385453315686752389
-- ----------------------------
CREATE TABLE mt385453315686752389(
	depSelectField102 nvarchar(255),
	dateField103 datetime,
	dateField104 datetime,
	dateField105 datetime,
	numInputField107 decimal(38,0),
	comInputField108 nvarchar(255),
	textareaField109 nvarchar(255),
	createUserField110 nvarchar(255),
	createTimeField111 datetime,
	f_flowid nvarchar(50),
	f_version bigint,
	f_flowtaskid nvarchar(50),
	f_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'预算管理-主表','SCHEMA',N'dbo','TABLE',N'mt385453315686752389';
EXEC sp_addextendedproperty 'MS_Description',N'部门','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'depSelectField102';
EXEC sp_addextendedproperty 'MS_Description',N'当前时间','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'dateField103';
EXEC sp_addextendedproperty 'MS_Description',N'预算年份','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'dateField104';
EXEC sp_addextendedproperty 'MS_Description',N'预算月份','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'dateField105';
EXEC sp_addextendedproperty 'MS_Description',N'预算金额','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'numInputField107';
EXEC sp_addextendedproperty 'MS_Description',N'金额大写','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'comInputField108';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'textareaField109';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'createUserField110';
EXEC sp_addextendedproperty 'MS_Description',N'申请时间','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'createTimeField111';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'f_flowid';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'f_flowtaskid';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务Id','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt385453315686752389','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt395179351563312389
-- ----------------------------
CREATE TABLE mt395179351563312389(
	pid nvarchar(255),
	name nvarchar(255),
	encode nvarchar(255),
	f_flowid nvarchar(50),
	f_version int,
	f_flowtaskid nvarchar(50),
	f_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'列表树形表格-主表','SCHEMA',N'dbo','TABLE',N'mt395179351563312389';
EXEC sp_addextendedproperty 'MS_Description',N'上级','SCHEMA',N'dbo','TABLE',N'mt395179351563312389','COLUMN',N'pid';
EXEC sp_addextendedproperty 'MS_Description',N'名称','SCHEMA',N'dbo','TABLE',N'mt395179351563312389','COLUMN',N'name';
EXEC sp_addextendedproperty 'MS_Description',N'编号','SCHEMA',N'dbo','TABLE',N'mt395179351563312389','COLUMN',N'encode';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt395179351563312389','COLUMN',N'f_flowid';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt395179351563312389','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt395179351563312389','COLUMN',N'f_flowtaskid';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt395179351563312389','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt395179351563312389','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt395179351563312389','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt395179351563312389','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt395179351563312389','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt395899725691230469
-- ----------------------------
CREATE TABLE mt395899725691230469(
	comInputField102 nvarchar(255),
	comInputField103 nvarchar(255),
	comInputField106 nvarchar(255),
	selectField121 nvarchar(255),
	uploadFzField107 nvarchar(max),
	uploadFzField108 nvarchar(max),
	comInputField118 nvarchar(255),
	comInputField117 nvarchar(255),
	comInputField119 nvarchar(255),
	comInputField120 nvarchar(255),
	comInputField122 nvarchar(255),
	comInputField123 nvarchar(255),
	treeSelectField126 nvarchar(255),
	f_flowid nvarchar(50),
	f_version int,
	f_flowtaskid nvarchar(50),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'3.4.6新增功能汇总示例-主表','SCHEMA',N'dbo','TABLE',N'mt395899725691230469';
EXEC sp_addextendedproperty 'MS_Description',N'设计表单名称显示','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'comInputField102';
EXEC sp_addextendedproperty 'MS_Description',N'控件类型中文名','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'comInputField103';
EXEC sp_addextendedproperty 'MS_Description',N'css示例添加','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'comInputField106';
EXEC sp_addextendedproperty 'MS_Description',N'添加多个快捷入口','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'selectField121';
EXEC sp_addextendedproperty 'MS_Description',N'支持自定义路径和分用户存储','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'uploadFzField107';
EXEC sp_addextendedproperty 'MS_Description',N'支持文件类型多选','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'uploadFzField108';
EXEC sp_addextendedproperty 'MS_Description',N'打印模板多选','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'comInputField118';
EXEC sp_addextendedproperty 'MS_Description',N'数据条件过滤','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'comInputField117';
EXEC sp_addextendedproperty 'MS_Description',N'批量打印/下载','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'comInputField119';
EXEC sp_addextendedproperty 'MS_Description',N'自定义按钮调整','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'comInputField120';
EXEC sp_addextendedproperty 'MS_Description',N'保存并新增','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'comInputField122';
EXEC sp_addextendedproperty 'MS_Description',N'支持控件多选查询','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'comInputField123';
EXEC sp_addextendedproperty 'MS_Description',N'列表树形表格','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'treeSelectField126';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'f_flowid';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'f_flowtaskid';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt395899725691230469','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：mt395964134161651973
-- ----------------------------
CREATE TABLE mt395964134161651973(
	relationFormField101 nvarchar(255),
	popupSelectField104 nvarchar(255),
	f_flowid nvarchar(50),
	f_version int,
	f_flowtaskid nvarchar(50),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'列表数据链接查看详情页-主表','SCHEMA',N'dbo','TABLE',N'mt395964134161651973';
EXEC sp_addextendedproperty 'MS_Description',N'产品名称','SCHEMA',N'dbo','TABLE',N'mt395964134161651973','COLUMN',N'relationFormField101';
EXEC sp_addextendedproperty 'MS_Description',N'人员名称','SCHEMA',N'dbo','TABLE',N'mt395964134161651973','COLUMN',N'popupSelectField104';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt395964134161651973','COLUMN',N'f_flowid';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt395964134161651973','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt395964134161651973','COLUMN',N'f_flowtaskid';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt395964134161651973','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt395964134161651973','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：mt400655094485373381
-- ----------------------------
CREATE TABLE mt400655094485373381(
	comInputField101 nvarchar(255),
	f_flowid nvarchar(50),
	f_version int,
	f_flowtaskid nvarchar(50),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'cccccc-主表','SCHEMA',N'dbo','TABLE',N'mt400655094485373381';
EXEC sp_addextendedproperty 'MS_Description',N'单行输入','SCHEMA',N'dbo','TABLE',N'mt400655094485373381','COLUMN',N'comInputField101';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt400655094485373381','COLUMN',N'f_flowid';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt400655094485373381','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt400655094485373381','COLUMN',N'f_flowtaskid';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt400655094485373381','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt400655094485373381','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：mt420589912199274117
-- ----------------------------
CREATE TABLE mt420589912199274117(
	selectField101 nvarchar(255),
	selectField102 nvarchar(255),
	selectField103 nvarchar(255),
	f_flowid nvarchar(50),
	f_version int,
	f_flowtaskid nvarchar(50),
	f_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'行政区划联动-主表','SCHEMA',N'dbo','TABLE',N'mt420589912199274117';
EXEC sp_addextendedproperty 'MS_Description',N'省','SCHEMA',N'dbo','TABLE',N'mt420589912199274117','COLUMN',N'selectField101';
EXEC sp_addextendedproperty 'MS_Description',N'市','SCHEMA',N'dbo','TABLE',N'mt420589912199274117','COLUMN',N'selectField102';
EXEC sp_addextendedproperty 'MS_Description',N'区','SCHEMA',N'dbo','TABLE',N'mt420589912199274117','COLUMN',N'selectField103';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt420589912199274117','COLUMN',N'f_flowid';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt420589912199274117','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt420589912199274117','COLUMN',N'f_flowtaskid';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt420589912199274117','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt420589912199274117','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt420589912199274117','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt420589912199274117','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt420589912199274117','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt456990191458975685
-- ----------------------------
CREATE TABLE mt456990191458975685(
	F_Id nvarchar(50) NOT NULL,
	inputField101 nvarchar(500),
	textareaField102 nvarchar(500),
	inputNumberField103 nvarchar(500),
	switchField104 nvarchar(500),
	radioField105 nvarchar(500),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'Test08041','SCHEMA',N'dbo','TABLE',N'mt456990191458975685';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt456990191458975685','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'单行输入','SCHEMA',N'dbo','TABLE',N'mt456990191458975685','COLUMN',N'inputField101';
EXEC sp_addextendedproperty 'MS_Description',N'多行输入','SCHEMA',N'dbo','TABLE',N'mt456990191458975685','COLUMN',N'textareaField102';
EXEC sp_addextendedproperty 'MS_Description',N'数字输入','SCHEMA',N'dbo','TABLE',N'mt456990191458975685','COLUMN',N'inputNumberField103';
EXEC sp_addextendedproperty 'MS_Description',N'开关','SCHEMA',N'dbo','TABLE',N'mt456990191458975685','COLUMN',N'switchField104';
EXEC sp_addextendedproperty 'MS_Description',N'单选框组','SCHEMA',N'dbo','TABLE',N'mt456990191458975685','COLUMN',N'radioField105';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt456990191458975685','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：mt469496947087047173
-- ----------------------------
CREATE TABLE mt469496947087047173(
	inputField101 nvarchar(255),
	inputNumberField102 decimal(38,15),
	datePickerField111 datetime,
	selectField106 nvarchar(255),
	textareaField107 nvarchar(255),
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_id nvarchar(50) NOT NULL,
	f_inte_assistant int

, PRIMARY KEY (f_tenant_id,f_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'复杂表头示例-主表','SCHEMA',N'dbo','TABLE',N'mt469496947087047173';
EXEC sp_addextendedproperty 'MS_Description',N'客户名称','SCHEMA',N'dbo','TABLE',N'mt469496947087047173','COLUMN',N'inputField101';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'mt469496947087047173','COLUMN',N'inputNumberField102';
EXEC sp_addextendedproperty 'MS_Description',N'日期','SCHEMA',N'dbo','TABLE',N'mt469496947087047173','COLUMN',N'datePickerField111';
EXEC sp_addextendedproperty 'MS_Description',N'方式字典','SCHEMA',N'dbo','TABLE',N'mt469496947087047173','COLUMN',N'selectField106';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'mt469496947087047173','COLUMN',N'textareaField107';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt469496947087047173','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt469496947087047173','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt469496947087047173','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt469496947087047173','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt469496947087047173','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt469496947087047173','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt469499339534825989
-- ----------------------------
CREATE TABLE mt469499339534825989(
	inputField112 nvarchar(255),
	organizeSelectField105 nvarchar(255),
	depSelectField107 nvarchar(255),
	posSelectField108 nvarchar(255),
	groupSelectField111 nvarchar(255),
	userSelectField109 nvarchar(255),
	usersSelectField110 nvarchar(255),
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_id nvarchar(50) NOT NULL,
	f_inte_assistant int

, PRIMARY KEY (f_tenant_id,f_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'高级控件和默认查询-主表','SCHEMA',N'dbo','TABLE',N'mt469499339534825989';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'inputField112';
EXEC sp_addextendedproperty 'MS_Description',N'组织选择','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'organizeSelectField105';
EXEC sp_addextendedproperty 'MS_Description',N'部门选择','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'depSelectField107';
EXEC sp_addextendedproperty 'MS_Description',N'岗位选择','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'posSelectField108';
EXEC sp_addextendedproperty 'MS_Description',N'分组选择','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'groupSelectField111';
EXEC sp_addextendedproperty 'MS_Description',N'用户选择','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'userSelectField109';
EXEC sp_addextendedproperty 'MS_Description',N'用户组件','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'usersSelectField110';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt469499339534825989','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt469502670336489989
-- ----------------------------
CREATE TABLE mt469502670336489989(
	inputField104 nvarchar(255),
	radioField106 nvarchar(255),
	radioField101 nvarchar(255),
	checkboxField102 nvarchar(255),
	selectField103 nvarchar(255),
	cascaderField107 nvarchar(255),
	treeSelectField108 nvarchar(255),
	popupTableSelectField109 nvarchar(255),
	autoCompleteField111 nvarchar(255),
	popupSelectField110 nvarchar(255),
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_id nvarchar(50) NOT NULL,
	f_inte_assistant int

, PRIMARY KEY (f_tenant_id,f_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'数据接口字段示例-主表','SCHEMA',N'dbo','TABLE',N'mt469502670336489989';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'inputField104';
EXEC sp_addextendedproperty 'MS_Description',N'性别','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'radioField106';
EXEC sp_addextendedproperty 'MS_Description',N'单选框组','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'radioField101';
EXEC sp_addextendedproperty 'MS_Description',N'多选框组','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'checkboxField102';
EXEC sp_addextendedproperty 'MS_Description',N'下拉选择','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'selectField103';
EXEC sp_addextendedproperty 'MS_Description',N'级联选择','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'cascaderField107';
EXEC sp_addextendedproperty 'MS_Description',N'树形','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'treeSelectField108';
EXEC sp_addextendedproperty 'MS_Description',N'下拉表格真分页','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'popupTableSelectField109';
EXEC sp_addextendedproperty 'MS_Description',N'下拉补全','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'autoCompleteField111';
EXEC sp_addextendedproperty 'MS_Description',N'弹窗选择','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'popupSelectField110';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt469502670336489989','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt470888132380721605
-- ----------------------------
CREATE TABLE mt470888132380721605(
	uploadImgField142 nvarchar(max),
	uploadImgField143 nvarchar(max),
	uploadImgField144 nvarchar(max),
	uploadImgField145 nvarchar(max),
	uploadImgField147 nvarchar(max),
	uploadImgField146 nvarchar(max),
	uploadImgField148 nvarchar(max),
	uploadImgField178 nvarchar(max),
	uploadImgField181 nvarchar(max),
	uploadImgField149 nvarchar(max),
	uploadImgField150 nvarchar(max),
	uploadImgField151 nvarchar(max),
	uploadImgField152 nvarchar(max),
	uploadImgField153 nvarchar(max),
	uploadImgField154 nvarchar(max),
	uploadImgField155 nvarchar(max),
	uploadImgField156 nvarchar(max),
	uploadImgField158 nvarchar(max),
	uploadImgField161 nvarchar(max),
	uploadImgField162 nvarchar(max),
	uploadImgField164 nvarchar(max),
	uploadImgField165 nvarchar(max),
	uploadImgField166 nvarchar(max),
	uploadImgField167 nvarchar(max),
	uploadImgField168 nvarchar(max),
	uploadImgField169 nvarchar(max),
	uploadImgField170 nvarchar(max),
	uploadImgField171 nvarchar(max),
	uploadImgField172 nvarchar(max),
	uploadImgField173 nvarchar(max),
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_id nvarchar(50) NOT NULL,
	uploadImgField157 nvarchar(max),
	uploadImgField11 nvarchar(50),
	uploadImgField12 nvarchar(max)

, PRIMARY KEY (f_tenant_id,f_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'3.5.0更新功能-主表','SCHEMA',N'dbo','TABLE',N'mt470888132380721605';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField142';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField143';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField144';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField145';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField147';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField146';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField148';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField178';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField181';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField149';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField150';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField151';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField152';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField153';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField154';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField155';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField156';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField158';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField161';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField162';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField164';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField165';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField166';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField167';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField168';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField169';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField170';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField171';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField172';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField173';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'图片上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField157';
EXEC sp_addextendedproperty 'MS_Description',N'文件上传','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField11';
EXEC sp_addextendedproperty 'MS_Description',N'文件上传1','SCHEMA',N'dbo','TABLE',N'mt470888132380721605','COLUMN',N'uploadImgField12';
-- ----------------------------
-- 表名：mt470913062111543749
-- ----------------------------
CREATE TABLE mt470913062111543749(
	inputField101 nvarchar(255),
	inputField102 nvarchar(255),
	inputField103 nvarchar(255),
	inputField104 nvarchar(255),
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_id nvarchar(50) NOT NULL,
	f_inte_assistant int

, PRIMARY KEY (f_tenant_id,f_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'集成助手暂存数据表-主表','SCHEMA',N'dbo','TABLE',N'mt470913062111543749';
EXEC sp_addextendedproperty 'MS_Description',N'单行输入1','SCHEMA',N'dbo','TABLE',N'mt470913062111543749','COLUMN',N'inputField101';
EXEC sp_addextendedproperty 'MS_Description',N'单行输入2','SCHEMA',N'dbo','TABLE',N'mt470913062111543749','COLUMN',N'inputField102';
EXEC sp_addextendedproperty 'MS_Description',N'单行输入3','SCHEMA',N'dbo','TABLE',N'mt470913062111543749','COLUMN',N'inputField103';
EXEC sp_addextendedproperty 'MS_Description',N'单行输入4','SCHEMA',N'dbo','TABLE',N'mt470913062111543749','COLUMN',N'inputField104';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt470913062111543749','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt470913062111543749','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt470913062111543749','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt470913062111543749','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt470913062111543749','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt470913062111543749','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt470929966582727173
-- ----------------------------
CREATE TABLE mt470929966582727173(
	inputField101 nvarchar(255),
	inputField102 nvarchar(255),
	inputField103 nvarchar(255),
	inputField104 nvarchar(255),
	inputField105 nvarchar(255),
	inputField106 nvarchar(255),
	inputField107 nvarchar(255),
	inputField108 nvarchar(255),
	inputField109 nvarchar(255),
	inputField110 nvarchar(255),
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_id nvarchar(50) NOT NULL,
	f_inte_assistant int

, PRIMARY KEY (f_tenant_id,f_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'客户管理记录表-主表','SCHEMA',N'dbo','TABLE',N'mt470929966582727173';
EXEC sp_addextendedproperty 'MS_Description',N'内部订单号','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'inputField101';
EXEC sp_addextendedproperty 'MS_Description',N'客户名称','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'inputField102';
EXEC sp_addextendedproperty 'MS_Description',N'联系电话','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'inputField103';
EXEC sp_addextendedproperty 'MS_Description',N'详细地址','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'inputField104';
EXEC sp_addextendedproperty 'MS_Description',N'商品名','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'inputField105';
EXEC sp_addextendedproperty 'MS_Description',N'编号','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'inputField106';
EXEC sp_addextendedproperty 'MS_Description',N'销售价','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'inputField107';
EXEC sp_addextendedproperty 'MS_Description',N'当前库存','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'inputField108';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'inputField109';
EXEC sp_addextendedproperty 'MS_Description',N'单品总价','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'inputField110';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt470929966582727173','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt517668914876910661
-- ----------------------------
CREATE TABLE mt517668914876910661(
	createTimeField101 datetime,
	datePickerField102 datetime,
	datePickerField104 datetime,
	datePickerField105 datetime,
	timePickerField103 nvarchar(255),
	selectField106 nvarchar(255),
	cascaderField107 nvarchar(255),
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_id nvarchar(50) NOT NULL

, PRIMARY KEY (f_tenant_id,f_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'打印回显示例-主表','SCHEMA',N'dbo','TABLE',N'mt517668914876910661';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'createTimeField101';
EXEC sp_addextendedproperty 'MS_Description',N'年','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'datePickerField102';
EXEC sp_addextendedproperty 'MS_Description',N'年月','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'datePickerField104';
EXEC sp_addextendedproperty 'MS_Description',N'年月','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'datePickerField105';
EXEC sp_addextendedproperty 'MS_Description',N'时间选择','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'timePickerField103';
EXEC sp_addextendedproperty 'MS_Description',N'下拉选择','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'selectField106';
EXEC sp_addextendedproperty 'MS_Description',N'级联选择','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'cascaderField107';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt517668914876910661','COLUMN',N'f_id';
-- ----------------------------
-- 表名：mt585077626008240453
-- ----------------------------
CREATE TABLE mt585077626008240453(
	billRuleField106 nvarchar(255),
	inputField101 nvarchar(255),
	datePickerField102 datetime,
	selectField103 nvarchar(255),
	userSelectField104 nvarchar(255),
	userSelectField105 nvarchar(255),
	calculateField116 decimal(38,2),
	calculateField117 decimal(38,2),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'采购合同-主表','SCHEMA',N'dbo','TABLE',N'mt585077626008240453';
EXEC sp_addextendedproperty 'MS_Description',N'合同编号','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'billRuleField106';
EXEC sp_addextendedproperty 'MS_Description',N'供应商','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'inputField101';
EXEC sp_addextendedproperty 'MS_Description',N'签订日期','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'datePickerField102';
EXEC sp_addextendedproperty 'MS_Description',N'付款方式','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'selectField103';
EXEC sp_addextendedproperty 'MS_Description',N'经手人','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'userSelectField104';
EXEC sp_addextendedproperty 'MS_Description',N'审核人','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'userSelectField105';
EXEC sp_addextendedproperty 'MS_Description',N'总数量','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'calculateField116';
EXEC sp_addextendedproperty 'MS_Description',N'合同金额','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'calculateField117';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt585077626008240453','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt585113061585584645
-- ----------------------------
CREATE TABLE mt585113061585584645(
	inputField106 nvarchar(255),
	inputField107 nvarchar(255),
	inputField111 nvarchar(255),
	calculateField119 decimal(38,2),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'水电费用-主表','SCHEMA',N'dbo','TABLE',N'mt585113061585584645';
EXEC sp_addextendedproperty 'MS_Description',N'楼层号','SCHEMA',N'dbo','TABLE',N'mt585113061585584645','COLUMN',N'inputField106';
EXEC sp_addextendedproperty 'MS_Description',N'业主姓名','SCHEMA',N'dbo','TABLE',N'mt585113061585584645','COLUMN',N'inputField107';
EXEC sp_addextendedproperty 'MS_Description',N'联系方式','SCHEMA',N'dbo','TABLE',N'mt585113061585584645','COLUMN',N'inputField111';
EXEC sp_addextendedproperty 'MS_Description',N'水电费用','SCHEMA',N'dbo','TABLE',N'mt585113061585584645','COLUMN',N'calculateField119';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585113061585584645','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585113061585584645','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585113061585584645','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585113061585584645','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585113061585584645','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt585113061585584645','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt585115948944458245
-- ----------------------------
CREATE TABLE mt585115948944458245(
	inputField101 nvarchar(255),
	inputField102 nvarchar(255),
	inputField106 nvarchar(255),
	areaSelectField105 nvarchar(255),
	inputField107 nvarchar(255),
	inputField104 nvarchar(255),
	areaSelectField108 nvarchar(255),
	inputField119 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'报价信息-主表','SCHEMA',N'dbo','TABLE',N'mt585115948944458245';
EXEC sp_addextendedproperty 'MS_Description',N'需方联系员','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'inputField101';
EXEC sp_addextendedproperty 'MS_Description',N'需方联系电话','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'inputField102';
EXEC sp_addextendedproperty 'MS_Description',N'需方邮编','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'inputField106';
EXEC sp_addextendedproperty 'MS_Description',N'需方地址','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'areaSelectField105';
EXEC sp_addextendedproperty 'MS_Description',N'供方联系人','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'inputField107';
EXEC sp_addextendedproperty 'MS_Description',N'供方联系电话','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'inputField104';
EXEC sp_addextendedproperty 'MS_Description',N'供方邮编','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'areaSelectField108';
EXEC sp_addextendedproperty 'MS_Description',N'供方地址','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'inputField119';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt585115948944458245','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt585115958712992261
-- ----------------------------
CREATE TABLE mt585115958712992261(
	datePickerField126 datetime,
	inputField101 nvarchar(255),
	radioField102 nvarchar(255),
	datePickerField125 datetime,
	inputField113 nvarchar(255),
	selectField124 nvarchar(255),
	selectField104 nvarchar(255),
	inputField106 nvarchar(255),
	areaSelectField107 nvarchar(255),
	radioField110 nvarchar(255),
	radioField111 nvarchar(255),
	radioField112 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'入职申请-主表','SCHEMA',N'dbo','TABLE',N'mt585115958712992261';
EXEC sp_addextendedproperty 'MS_Description',N'填表日期','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'datePickerField126';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'inputField101';
EXEC sp_addextendedproperty 'MS_Description',N'性别','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'radioField102';
EXEC sp_addextendedproperty 'MS_Description',N'出生年月','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'datePickerField125';
EXEC sp_addextendedproperty 'MS_Description',N'年龄','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'inputField113';
EXEC sp_addextendedproperty 'MS_Description',N'民族','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'selectField124';
EXEC sp_addextendedproperty 'MS_Description',N'学历','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'selectField104';
EXEC sp_addextendedproperty 'MS_Description',N'联系电话','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'inputField106';
EXEC sp_addextendedproperty 'MS_Description',N'家庭住址','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'areaSelectField107';
EXEC sp_addextendedproperty 'MS_Description',N'能否加班','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'radioField110';
EXEC sp_addextendedproperty 'MS_Description',N'能否出差','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'radioField111';
EXEC sp_addextendedproperty 'MS_Description',N'能否接受调动','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'radioField112';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt585115958712992261','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt585385026032501317
-- ----------------------------
CREATE TABLE mt585385026032501317(
	billRuleField101 nvarchar(255),
	inputField102 nvarchar(255),
	inputField103 nvarchar(255),
	inputField104 nvarchar(255),
	inputField105 nvarchar(255),
	inputField106 nvarchar(255),
	inputField130 nvarchar(255),
	inputField110 nvarchar(255),
	inputField111 nvarchar(255),
	inputField112 nvarchar(255),
	inputField113 nvarchar(255),
	inputField114 nvarchar(255),
	inputField131 nvarchar(255),
	selectField132 nvarchar(255),
	inputNumberField118 decimal(38,0),
	inputNumberField126 decimal(38,15),
	inputNumberField127 decimal(38,15),
	inputNumberField119 decimal(38,15),
	signField120 nvarchar(max),
	datePickerField122 datetime,
	inputField123 nvarchar(255),
	signField124 nvarchar(max),
	datePickerField128 datetime,
	signField129 nvarchar(max),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'套打示例-主表','SCHEMA',N'dbo','TABLE',N'mt585385026032501317';
EXEC sp_addextendedproperty 'MS_Description',N'订单号','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'billRuleField101';
EXEC sp_addextendedproperty 'MS_Description',N'收件邮编','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField102';
EXEC sp_addextendedproperty 'MS_Description',N'寄达局','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField103';
EXEC sp_addextendedproperty 'MS_Description',N'收件人姓名','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField104';
EXEC sp_addextendedproperty 'MS_Description',N'收件人电话','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField105';
EXEC sp_addextendedproperty 'MS_Description',N'单位名称','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField106';
EXEC sp_addextendedproperty 'MS_Description',N'详细地址','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField130';
EXEC sp_addextendedproperty 'MS_Description',N'寄件人姓名','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField110';
EXEC sp_addextendedproperty 'MS_Description',N'寄件人电话','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField111';
EXEC sp_addextendedproperty 'MS_Description',N'单位名称','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField112';
EXEC sp_addextendedproperty 'MS_Description',N'详细地址','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField113';
EXEC sp_addextendedproperty 'MS_Description',N'大客户代码','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField114';
EXEC sp_addextendedproperty 'MS_Description',N'邮政编码','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField131';
EXEC sp_addextendedproperty 'MS_Description',N'品名','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'selectField132';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputNumberField118';
EXEC sp_addextendedproperty 'MS_Description',N'重量','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputNumberField126';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputNumberField127';
EXEC sp_addextendedproperty 'MS_Description',N'收款金额','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputNumberField119';
EXEC sp_addextendedproperty 'MS_Description',N'寄件人签名','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'signField120';
EXEC sp_addextendedproperty 'MS_Description',N'收寄日期','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'datePickerField122';
EXEC sp_addextendedproperty 'MS_Description',N'收寄局名','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'inputField123';
EXEC sp_addextendedproperty 'MS_Description',N'收寄人签名','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'signField124';
EXEC sp_addextendedproperty 'MS_Description',N'收件日期','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'datePickerField128';
EXEC sp_addextendedproperty 'MS_Description',N'收件人签名','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'signField129';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt585385026032501317','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt585398421410546245
-- ----------------------------
CREATE TABLE mt585398421410546245(
	datePickerField102 datetime,
	depSelectField101 nvarchar(255),
	userSelectField108 nvarchar(255),
	textareaField109 nvarchar(255),
	inputField105 nvarchar(255),
	inputField106 nvarchar(255),
	inputNumberField107 decimal(38,15),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'付款申请-主表','SCHEMA',N'dbo','TABLE',N'mt585398421410546245';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'datePickerField102';
EXEC sp_addextendedproperty 'MS_Description',N'申请部门','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'depSelectField101';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'userSelectField108';
EXEC sp_addextendedproperty 'MS_Description',N'申请事由','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'textareaField109';
EXEC sp_addextendedproperty 'MS_Description',N'开户银行','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'inputField105';
EXEC sp_addextendedproperty 'MS_Description',N'账户','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'inputField106';
EXEC sp_addextendedproperty 'MS_Description',N'款项金额','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'inputNumberField107';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt585398421410546245','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt585441085065528069
-- ----------------------------
CREATE TABLE mt585441085065528069(
	datePickerField107 datetime,
	depSelectField102 nvarchar(255),
	userSelectField101 nvarchar(255),
	inputField104 nvarchar(255),
	inputField105 nvarchar(255),
	inputNumberField106 decimal(38,15),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'采购申请-主表','SCHEMA',N'dbo','TABLE',N'mt585441085065528069';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'mt585441085065528069','COLUMN',N'datePickerField107';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'mt585441085065528069','COLUMN',N'depSelectField102';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'mt585441085065528069','COLUMN',N'userSelectField101';
EXEC sp_addextendedproperty 'MS_Description',N'请购物资','SCHEMA',N'dbo','TABLE',N'mt585441085065528069','COLUMN',N'inputField104';
EXEC sp_addextendedproperty 'MS_Description',N'规格型号','SCHEMA',N'dbo','TABLE',N'mt585441085065528069','COLUMN',N'inputField105';
EXEC sp_addextendedproperty 'MS_Description',N'请购数量','SCHEMA',N'dbo','TABLE',N'mt585441085065528069','COLUMN',N'inputNumberField106';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585441085065528069','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585441085065528069','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585441085065528069','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585441085065528069','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585441085065528069','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt585441095630979845
-- ----------------------------
CREATE TABLE mt585441095630979845(
	datePickerField107 datetime,
	depSelectField101 nvarchar(255),
	userSelectField102 nvarchar(255),
	inputField103 nvarchar(255),
	inputField104 nvarchar(255),
	inputNumberField105 decimal(38,15),
	textareaField106 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	inputField107 nvarchar(255),
	f_inte_assistant int

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'物资申请-主表','SCHEMA',N'dbo','TABLE',N'mt585441095630979845';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'datePickerField107';
EXEC sp_addextendedproperty 'MS_Description',N'申请部门','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'depSelectField101';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'userSelectField102';
EXEC sp_addextendedproperty 'MS_Description',N'申请物资','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'inputField103';
EXEC sp_addextendedproperty 'MS_Description',N'规格型号','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'inputField104';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'inputNumberField105';
EXEC sp_addextendedproperty 'MS_Description',N'用途','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'textareaField106';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'库存','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'inputField107';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'mt585441095630979845','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：mt585484941698007941
-- ----------------------------
CREATE TABLE mt585484941698007941(
	inputField101 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'JS控制列表上按钮的颜色-主表','SCHEMA',N'dbo','TABLE',N'mt585484941698007941';
EXEC sp_addextendedproperty 'MS_Description',N'单行输入','SCHEMA',N'dbo','TABLE',N'mt585484941698007941','COLUMN',N'inputField101';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585484941698007941','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585484941698007941','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585484941698007941','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585484941698007941','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585484941698007941','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt585806222716830853
-- ----------------------------
CREATE TABLE mt585806222716830853(
	depSelectField101 nvarchar(255),
	inputField102 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'列表左侧树-主表','SCHEMA',N'dbo','TABLE',N'mt585806222716830853';
EXEC sp_addextendedproperty 'MS_Description',N'部门选择','SCHEMA',N'dbo','TABLE',N'mt585806222716830853','COLUMN',N'depSelectField101';
EXEC sp_addextendedproperty 'MS_Description',N'单行输入','SCHEMA',N'dbo','TABLE',N'mt585806222716830853','COLUMN',N'inputField102';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585806222716830853','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585806222716830853','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585806222716830853','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585806222716830853','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585806222716830853','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt585825608643118213
-- ----------------------------
CREATE TABLE mt585825608643118213(
	selectField101 nvarchar(255),
	inputField102 nvarchar(255),
	textareaField103 nvarchar(255),
	inputNumberField104 decimal(38,15),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'列表标签面板-主表','SCHEMA',N'dbo','TABLE',N'mt585825608643118213';
EXEC sp_addextendedproperty 'MS_Description',N'客户分类','SCHEMA',N'dbo','TABLE',N'mt585825608643118213','COLUMN',N'selectField101';
EXEC sp_addextendedproperty 'MS_Description',N'客户名称','SCHEMA',N'dbo','TABLE',N'mt585825608643118213','COLUMN',N'inputField102';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'mt585825608643118213','COLUMN',N'textareaField103';
EXEC sp_addextendedproperty 'MS_Description',N'需求数量','SCHEMA',N'dbo','TABLE',N'mt585825608643118213','COLUMN',N'inputNumberField104';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585825608643118213','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585825608643118213','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585825608643118213','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585825608643118213','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585825608643118213','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt585831812765320325
-- ----------------------------
CREATE TABLE mt585831812765320325(
	inputField102 nvarchar(255),
	selectField103 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'js列表按钮显隐-主表','SCHEMA',N'dbo','TABLE',N'mt585831812765320325';
EXEC sp_addextendedproperty 'MS_Description',N'单行输入','SCHEMA',N'dbo','TABLE',N'mt585831812765320325','COLUMN',N'inputField102';
EXEC sp_addextendedproperty 'MS_Description',N'下拉选择','SCHEMA',N'dbo','TABLE',N'mt585831812765320325','COLUMN',N'selectField103';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt585831812765320325','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt585831812765320325','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt585831812765320325','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt585831812765320325','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt585831812765320325','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt623163332936859845
-- ----------------------------
CREATE TABLE mt623163332936859845(
	inputFielde343ea nvarchar(255),
	depSelectField3e4be5 nvarchar(255),
	userSelectFieldde46f0 nvarchar(255),
	datePickerField8796e7 datetime,
	radioFieldc7dbea nvarchar(255),
	textareaField5bece7 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'离职申请-主表','SCHEMA',N'dbo','TABLE',N'mt623163332936859845';
EXEC sp_addextendedproperty 'MS_Description',N'工号','SCHEMA',N'dbo','TABLE',N'mt623163332936859845','COLUMN',N'inputFielde343ea';
EXEC sp_addextendedproperty 'MS_Description',N'所在部门','SCHEMA',N'dbo','TABLE',N'mt623163332936859845','COLUMN',N'depSelectField3e4be5';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt623163332936859845','COLUMN',N'userSelectFieldde46f0';
EXEC sp_addextendedproperty 'MS_Description',N'预计离职日期','SCHEMA',N'dbo','TABLE',N'mt623163332936859845','COLUMN',N'datePickerField8796e7';
EXEC sp_addextendedproperty 'MS_Description',N'离职类型','SCHEMA',N'dbo','TABLE',N'mt623163332936859845','COLUMN',N'radioFieldc7dbea';
EXEC sp_addextendedproperty 'MS_Description',N'离职原因','SCHEMA',N'dbo','TABLE',N'mt623163332936859845','COLUMN',N'textareaField5bece7';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt623163332936859845','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt623163332936859845','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt623163332936859845','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt623163332936859845','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt623163332936859845','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt623163941190631621
-- ----------------------------
CREATE TABLE mt623163941190631621(
	inputFieldb9b2fb nvarchar(255),
	userSelectField168af6 nvarchar(255),
	depSelectField5a4271 nvarchar(255),
	datePickerField21a50a datetime,
	inputField08827c nvarchar(255),
	inputField7cdfad nvarchar(255),
	inputFielda4e0a4 nvarchar(255),
	textareaFielde9424d nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50),
	f_dateht datetime

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'员工信息-主表','SCHEMA',N'dbo','TABLE',N'mt623163941190631621';
EXEC sp_addextendedproperty 'MS_Description',N'工号','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'inputFieldb9b2fb';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'userSelectField168af6';
EXEC sp_addextendedproperty 'MS_Description',N'部门','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'depSelectField5a4271';
EXEC sp_addextendedproperty 'MS_Description',N'入职日期','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'datePickerField21a50a';
EXEC sp_addextendedproperty 'MS_Description',N'在职状态','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'inputField08827c';
EXEC sp_addextendedproperty 'MS_Description',N'联系方式','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'inputField7cdfad';
EXEC sp_addextendedproperty 'MS_Description',N'身份证号','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'inputFielda4e0a4';
EXEC sp_addextendedproperty 'MS_Description',N'家庭住址','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'textareaFielde9424d';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'合同到期时间','SCHEMA',N'dbo','TABLE',N'mt623163941190631621','COLUMN',N'f_dateht';
-- ----------------------------
-- 表名：mt623183981692584133
-- ----------------------------
CREATE TABLE mt623183981692584133(
	inputField9ee228 nvarchar(255),
	depSelectFieldf77c52 nvarchar(255),
	userSelectField39fc3a nvarchar(255),
	datePickerField21e750 datetime,
	inputField73d616 nvarchar(255),
	textareaField406675 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'离职员工表-主表','SCHEMA',N'dbo','TABLE',N'mt623183981692584133';
EXEC sp_addextendedproperty 'MS_Description',N'工号','SCHEMA',N'dbo','TABLE',N'mt623183981692584133','COLUMN',N'inputField9ee228';
EXEC sp_addextendedproperty 'MS_Description',N'部门','SCHEMA',N'dbo','TABLE',N'mt623183981692584133','COLUMN',N'depSelectFieldf77c52';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt623183981692584133','COLUMN',N'userSelectField39fc3a';
EXEC sp_addextendedproperty 'MS_Description',N'离职日期','SCHEMA',N'dbo','TABLE',N'mt623183981692584133','COLUMN',N'datePickerField21e750';
EXEC sp_addextendedproperty 'MS_Description',N'离职类型','SCHEMA',N'dbo','TABLE',N'mt623183981692584133','COLUMN',N'inputField73d616';
EXEC sp_addextendedproperty 'MS_Description',N'离职原因','SCHEMA',N'dbo','TABLE',N'mt623183981692584133','COLUMN',N'textareaField406675';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt623183981692584133','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt623183981692584133','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt623183981692584133','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt623183981692584133','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt623183981692584133','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt623417550885093381
-- ----------------------------
CREATE TABLE mt623417550885093381(
	userSelectFieldc1737e nvarchar(255),
	depSelectFieldca3bda nvarchar(255),
	datePickerField6e1b8e datetime,
	inputField0120f5 nvarchar(255),
	textareaField5131eb nvarchar(255),
	textareaField240d59 nvarchar(255),
	uploadFileField567e4d nvarchar(max),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'离职交接表-主表','SCHEMA',N'dbo','TABLE',N'mt623417550885093381';
EXEC sp_addextendedproperty 'MS_Description',N'离职员工','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'userSelectFieldc1737e';
EXEC sp_addextendedproperty 'MS_Description',N'所在部门','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'depSelectFieldca3bda';
EXEC sp_addextendedproperty 'MS_Description',N'离职日期','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'datePickerField6e1b8e';
EXEC sp_addextendedproperty 'MS_Description',N'离职原因','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'inputField0120f5';
EXEC sp_addextendedproperty 'MS_Description',N'工作事项','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'textareaField5131eb';
EXEC sp_addextendedproperty 'MS_Description',N'未完成事项','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'textareaField240d59';
EXEC sp_addextendedproperty 'MS_Description',N'文件交接','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'uploadFileField567e4d';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt623417550885093381','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt623425084727492613
-- ----------------------------
CREATE TABLE mt623425084727492613(
	inputField16dc57 nvarchar(255),
	userSelectFieldd17ae6 nvarchar(255),
	depSelectFielde34b42 nvarchar(255),
	inputFieldcd3bc7 nvarchar(255),
	datePickerField2032c2 datetime,
	uploadFileFieldb4e26c nvarchar(max),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'劳动合同续签-主表','SCHEMA',N'dbo','TABLE',N'mt623425084727492613';
EXEC sp_addextendedproperty 'MS_Description',N'工号','SCHEMA',N'dbo','TABLE',N'mt623425084727492613','COLUMN',N'inputField16dc57';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt623425084727492613','COLUMN',N'userSelectFieldd17ae6';
EXEC sp_addextendedproperty 'MS_Description',N'所在部门','SCHEMA',N'dbo','TABLE',N'mt623425084727492613','COLUMN',N'depSelectFielde34b42';
EXEC sp_addextendedproperty 'MS_Description',N'合同类型','SCHEMA',N'dbo','TABLE',N'mt623425084727492613','COLUMN',N'inputFieldcd3bc7';
EXEC sp_addextendedproperty 'MS_Description',N'合同到期日','SCHEMA',N'dbo','TABLE',N'mt623425084727492613','COLUMN',N'datePickerField2032c2';
EXEC sp_addextendedproperty 'MS_Description',N'合同附件','SCHEMA',N'dbo','TABLE',N'mt623425084727492613','COLUMN',N'uploadFileFieldb4e26c';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt623425084727492613','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt623425084727492613','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt623425084727492613','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt623425084727492613','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt623425084727492613','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt624164005967037317
-- ----------------------------
CREATE TABLE mt624164005967037317(
	inputField44a3a9 nvarchar(255),
	userSelectField570fc8 nvarchar(255),
	depSelectField0c00ce nvarchar(255),
	datePickerFieldf1981d datetime,
	inputField5fe3ce nvarchar(255),
	inputField8f47fd nvarchar(255),
	inputField51c3c2 nvarchar(255),
	textareaField700cef nvarchar(255),
	datePickerFieldcced1f datetime,
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'入职申请-主表','SCHEMA',N'dbo','TABLE',N'mt624164005967037317';
EXEC sp_addextendedproperty 'MS_Description',N'工号','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'inputField44a3a9';
EXEC sp_addextendedproperty 'MS_Description',N'姓名','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'userSelectField570fc8';
EXEC sp_addextendedproperty 'MS_Description',N'部门','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'depSelectField0c00ce';
EXEC sp_addextendedproperty 'MS_Description',N'入职时间','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'datePickerFieldf1981d';
EXEC sp_addextendedproperty 'MS_Description',N'在职状态','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'inputField5fe3ce';
EXEC sp_addextendedproperty 'MS_Description',N'联系方式','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'inputField8f47fd';
EXEC sp_addextendedproperty 'MS_Description',N'身份证','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'inputField51c3c2';
EXEC sp_addextendedproperty 'MS_Description',N'家庭住址','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'textareaField700cef';
EXEC sp_addextendedproperty 'MS_Description',N'合同到期时间','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'datePickerFieldcced1f';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt624164005967037317','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：mt624165616286172037
-- ----------------------------
CREATE TABLE mt624165616286172037(
	inputField5facef nvarchar(255),
	userSelectFieldd6fa6c nvarchar(255),
	depSelectField0312fd nvarchar(255),
	inputFielda924aa nvarchar(255),
	datePickerField2f5617 datetime,
	selectField1ce6ab nvarchar(255),
	textareaField0ef029 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_version int,
	f_flow_task_id nvarchar(50)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'员工培训-主表','SCHEMA',N'dbo','TABLE',N'mt624165616286172037';
EXEC sp_addextendedproperty 'MS_Description',N'工号','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'inputField5facef';
EXEC sp_addextendedproperty 'MS_Description',N'培训申请人','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'userSelectFieldd6fa6c';
EXEC sp_addextendedproperty 'MS_Description',N'所在部门','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'depSelectField0312fd';
EXEC sp_addextendedproperty 'MS_Description',N'培训项目','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'inputFielda924aa';
EXEC sp_addextendedproperty 'MS_Description',N'申请时间','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'datePickerField2f5617';
EXEC sp_addextendedproperty 'MS_Description',N'培训方式','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'selectField1ce6ab';
EXEC sp_addextendedproperty 'MS_Description',N'培训目的','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'textareaField0ef029';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'mt624165616286172037','COLUMN',N'f_flow_task_id';
-- ----------------------------
-- 表名：report_charts
-- ----------------------------
CREATE TABLE report_charts(
	ID nvarchar(50) NOT NULL,
	QYBM nvarchar(255),
	FXDMC nvarchar(255),
	FXDJ nvarchar(255),
	PGRY nvarchar(255),
	PGRQ nvarchar(255),
	FXFXFF nvarchar(255),
	LECE nvarchar(255),
	LECC nvarchar(255),
	LSL nvarchar(255),
	LSS nvarchar(255),
	PGFXZ nvarchar(255),
	FPRQ nvarchar(255),
	STATUS nvarchar(255),
	createDate nvarchar(255),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (ID,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'报表图表','SCHEMA',N'dbo','TABLE',N'report_charts';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'ID';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'QYBM';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'FXDMC';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'FXDJ';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'PGRY';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'PGRQ';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'FXFXFF';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'LECE';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'LECC';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'LSL';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'LSS';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'PGFXZ';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'FPRQ';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'STATUS';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'createDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'report_charts','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：report_department
-- ----------------------------
CREATE TABLE report_department(
	id nvarchar(50) NOT NULL,
	departmentName nvarchar(255),
	departmentNum nvarchar(11),
	organizationName nvarchar(255),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'报表部门示例','SCHEMA',N'dbo','TABLE',N'report_department';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_department','COLUMN',N'id';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_department','COLUMN',N'departmentName';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_department','COLUMN',N'departmentNum';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_department','COLUMN',N'organizationName';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'report_department','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：report_template
-- ----------------------------
CREATE TABLE report_template(
	f_id nvarchar(50) NOT NULL,
	f_version_id nvarchar(50),
	f_full_name nvarchar(200) NOT NULL,
	f_en_code nvarchar(50) NOT NULL,
	f_category nvarchar(50) NOT NULL,
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL,
	f_allow_export int,
	f_allow_print int,
	f_platform_release nvarchar(100)

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

, PRIMARY KEY (id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'报表用户示例','SCHEMA',N'dbo','TABLE',N'report_user';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_user','COLUMN',N'id';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_user','COLUMN',N'username';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_user','COLUMN',N'education';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_user','COLUMN',N'sex';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_user','COLUMN',N'salary';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_user','COLUMN',N'departmentnum';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_user','COLUMN',N'peoplenum';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_user','COLUMN',N'month';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'report_user','COLUMN',N'year';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'report_user','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：report_version
-- ----------------------------
CREATE TABLE report_version(
	f_id nvarchar(50) NOT NULL,
	f_template_id nvarchar(50),
	f_state int,
	f_version int,
	f_cells nvarchar(max),
	f_snapshot nvarchar(max),
	f_query_list nvarchar(max),
	f_convert_config nvarchar(max),
	f_sort_code bigint,
	f_description nvarchar(500),
	f_enabled_mark int,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL,
	f_sort_list nvarchar(max)

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'报表版本记录','SCHEMA',N'dbo','TABLE',N'report_version';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'报表模板id','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_template_id';
EXEC sp_addextendedproperty 'MS_Description',N'状态：0-设计中，1-启用中，2-已归档','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_state';
EXEC sp_addextendedproperty 'MS_Description',N'版本','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'模板json','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_cells';
EXEC sp_addextendedproperty 'MS_Description',N'模板json','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_snapshot';
EXEC sp_addextendedproperty 'MS_Description',N'模板json','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_query_list';
EXEC sp_addextendedproperty 'MS_Description',N'模板json','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_convert_config';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'描述或说明','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_description';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_enabled_mark';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'模板json','SCHEMA',N'dbo','TABLE',N'report_version','COLUMN',N'f_sort_list';
-- ----------------------------
-- 表名：test_carapplication
-- ----------------------------
CREATE TABLE test_carapplication(
	F_Id nvarchar(50) NOT NULL,
	F_Applicationno nvarchar(50),
	F_Applicant nvarchar(100),
	F_Applicantdate datetime,
	f_Destination nvarchar(100),
	F_Startdate datetime,
	F_Enddate datetime,
	F_Vehiclenumber nvarchar(100),
	F_Driver nvarchar(100),
	F_Estimated nvarchar(200),
	F_Entourage nvarchar(500),
	F_Reasons nvarchar(300),
	F_Remarks nvarchar(300),
	F_CreatorUserId nvarchar(50),
	F_CreatorTime datetime,
	F_LastModifyTime datetime,
	F_LastModifyUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'用车申请表','SCHEMA',N'dbo','TABLE',N'test_carapplication';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'申请单号','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Applicationno';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Applicant';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Applicantdate';
EXEC sp_addextendedproperty 'MS_Description',N'目的地','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'f_Destination';
EXEC sp_addextendedproperty 'MS_Description',N'起始时间','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Startdate';
EXEC sp_addextendedproperty 'MS_Description',N'结束时间','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Enddate';
EXEC sp_addextendedproperty 'MS_Description',N'车辆号码','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Vehiclenumber';
EXEC sp_addextendedproperty 'MS_Description',N'驾驶员','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Driver';
EXEC sp_addextendedproperty 'MS_Description',N'预计里程/KM','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Estimated';
EXEC sp_addextendedproperty 'MS_Description',N'随行人员','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Entourage';
EXEC sp_addextendedproperty 'MS_Description',N'用车事由','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Reasons';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_Remarks';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_LastModifyTime';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'F_LastModifyUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_carapplication','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：test_cost
-- ----------------------------
CREATE TABLE test_cost(
	F_Id nvarchar(50) NOT NULL,
	F_Reimbursementid nvarchar(50),
	F_Cost_classes nvarchar(200),
	F_Amount decimal(18,2),
	F_Remarks nvarchar(200),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'费用明细表','SCHEMA',N'dbo','TABLE',N'test_cost';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_cost','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'主表主键','SCHEMA',N'dbo','TABLE',N'test_cost','COLUMN',N'F_Reimbursementid';
EXEC sp_addextendedproperty 'MS_Description',N'费用类别','SCHEMA',N'dbo','TABLE',N'test_cost','COLUMN',N'F_Cost_classes';
EXEC sp_addextendedproperty 'MS_Description',N'报销金额','SCHEMA',N'dbo','TABLE',N'test_cost','COLUMN',N'F_Amount';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'test_cost','COLUMN',N'F_Remarks';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_cost','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：test_customer
-- ----------------------------
CREATE TABLE test_customer(
	F_Id nvarchar(50) NOT NULL,
	F_SortCode nvarchar(50),
	F_Depname nvarchar(255),
	F_Username nvarchar(50),
	F_Type nvarchar(50),
	F_Grade nvarchar(50),
	F_Customername nvarchar(200),
	F_Leveladdress nvarchar(500),
	F_Channel nvarchar(200),
	F_Trade nvarchar(200),
	F_Nature nvarchar(500),
	F_Model nvarchar(500),
	F_Address nvarchar(500),
	F_CreatorTime datetime,
	F_CreatorUserId nvarchar(50),
	F_LastModifyTime datetime,
	F_LastModifyUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'大客户信息表','SCHEMA',N'dbo','TABLE',N'test_customer';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'序号','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Depname';
EXEC sp_addextendedproperty 'MS_Description',N'业务员姓名','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Username';
EXEC sp_addextendedproperty 'MS_Description',N'客户类型','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Type';
EXEC sp_addextendedproperty 'MS_Description',N'客户等级','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Grade';
EXEC sp_addextendedproperty 'MS_Description',N'客户全称','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Customername';
EXEC sp_addextendedproperty 'MS_Description',N'省份','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Leveladdress';
EXEC sp_addextendedproperty 'MS_Description',N'渠道全称','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Channel';
EXEC sp_addextendedproperty 'MS_Description',N'行业','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Trade';
EXEC sp_addextendedproperty 'MS_Description',N'企业性质','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Nature';
EXEC sp_addextendedproperty 'MS_Description',N'企业规模','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Model';
EXEC sp_addextendedproperty 'MS_Description',N'企业地址（详细地址）','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_Address';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_LastModifyTime';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'F_LastModifyUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'test_customer','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：test_details
-- ----------------------------
CREATE TABLE test_details(
	F_Id nvarchar(50) NOT NULL,
	F_Receivableid nvarchar(50),
	F_Month nvarchar(200),
	F_Rent decimal(18,2),
	F_Water_rent decimal(18,2),
	F_Powerrate decimal(18,2),
	F_Property decimal(18,2),
	F_Cleaning decimal(18,2),
	F_Pollutant decimal(18,2),
	F_Totalbilling decimal(18,2),
	F_CreatorTime datetime,
	F_CreatorUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'应收费用明细表','SCHEMA',N'dbo','TABLE',N'test_details';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'主表主键','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_Receivableid';
EXEC sp_addextendedproperty 'MS_Description',N'缴费月份','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_Month';
EXEC sp_addextendedproperty 'MS_Description',N'房租','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_Rent';
EXEC sp_addextendedproperty 'MS_Description',N'水费','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_Water_rent';
EXEC sp_addextendedproperty 'MS_Description',N'电费','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_Powerrate';
EXEC sp_addextendedproperty 'MS_Description',N'物业费','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_Property';
EXEC sp_addextendedproperty 'MS_Description',N'垃圾费','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_Cleaning';
EXEC sp_addextendedproperty 'MS_Description',N'排污费','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_Pollutant';
EXEC sp_addextendedproperty 'MS_Description',N'累计应收费用','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_Totalbilling';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_details','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：test_position
-- ----------------------------
CREATE TABLE test_position(
	F_Id nvarchar(50) NOT NULL,
	F_Applys nvarchar(50),
	F_Dep_name nvarchar(255),
	F_Station_name nvarchar(100),
	F_Arrival_Date datetime,
	F_Drade nvarchar(50),
	F_Worknature nvarchar(100),
	F_Stationpay nvarchar(100),
	F_Add_number nvarchar(50),
	F_Education nvarchar(50),
	F_Gender nvarchar(50),
	F_Working_seniority nvarchar(100),
	F_Marriage nvarchar(50),
	F_Age nvarchar(50),
	F_Stationpays nvarchar(100),
	F_Duty nvarchar(50),
	F_Stationask nvarchar(50),
	F_Stationkey nvarchar(50),
	F_Creator_Time datetime,
	F_Creator_UserId nvarchar(50),
	F_LastModify_Time datetime,
	F_LastModify_UserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'招聘表','SCHEMA',N'dbo','TABLE',N'test_position';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Applys';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Dep_name';
EXEC sp_addextendedproperty 'MS_Description',N'岗位名称','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Station_name';
EXEC sp_addextendedproperty 'MS_Description',N'期望到岗日期','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Arrival_Date';
EXEC sp_addextendedproperty 'MS_Description',N'优先级','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Drade';
EXEC sp_addextendedproperty 'MS_Description',N'工作性质','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Worknature';
EXEC sp_addextendedproperty 'MS_Description',N'岗位平均薪资','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Stationpay';
EXEC sp_addextendedproperty 'MS_Description',N'增补原因','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Add_number';
EXEC sp_addextendedproperty 'MS_Description',N'最低学历','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Education';
EXEC sp_addextendedproperty 'MS_Description',N'性别','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Gender';
EXEC sp_addextendedproperty 'MS_Description',N'工作经验年限','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Working_seniority';
EXEC sp_addextendedproperty 'MS_Description',N'婚姻状况','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Marriage';
EXEC sp_addextendedproperty 'MS_Description',N'年龄范围','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Age';
EXEC sp_addextendedproperty 'MS_Description',N'薪资范围','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Stationpays';
EXEC sp_addextendedproperty 'MS_Description',N'职责描述','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Duty';
EXEC sp_addextendedproperty 'MS_Description',N'岗位要求','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Stationask';
EXEC sp_addextendedproperty 'MS_Description',N'岗位关键字','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Stationkey';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Creator_Time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_Creator_UserId';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_LastModify_Time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'F_LastModify_UserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'test_position','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：test_projects
-- ----------------------------
CREATE TABLE test_projects(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_Projectname nvarchar(200),
	F_Projecttype nvarchar(10),
	F_Projectcode nvarchar(50),
	F_Projectfunding decimal(18,2),
	F_Depname nvarchar(255),
	F_Person nvarchar(100),
	F_Degree nvarchar(10),
	F_CreatorTime datetime,
	F_CreatorUserId nvarchar(50),
	F_LastModifyTime datetime,
	F_LastModifyUserId nvarchar(50),
	billno nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_task_id nvarchar(50),
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'项目立项申请表','SCHEMA',N'dbo','TABLE',N'test_projects';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'项目名称','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_Projectname';
EXEC sp_addextendedproperty 'MS_Description',N'项目类型','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_Projecttype';
EXEC sp_addextendedproperty 'MS_Description',N'项目编号','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_Projectcode';
EXEC sp_addextendedproperty 'MS_Description',N'项目经费','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_Projectfunding';
EXEC sp_addextendedproperty 'MS_Description',N'负责部门','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_Depname';
EXEC sp_addextendedproperty 'MS_Description',N'负责人','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_Person';
EXEC sp_addextendedproperty 'MS_Description',N'项目密级','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_Degree';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_LastModifyTime';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'F_LastModifyUserId';
EXEC sp_addextendedproperty 'MS_Description',N'单据规则','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'billno';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'test_projects','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：test_purchase
-- ----------------------------
CREATE TABLE test_purchase(
	F_Id nvarchar(50) NOT NULL,
	F_Purchase_number nvarchar(50),
	F_Sort_Code nvarchar(50),
	F_Applys nvarchar(50),
	F_Dep_Name nvarchar(255),
	F_Purchase datetime,
	F_Reasons nvarchar(100),
	F_Remarks nvarchar(500),
	F_CreatorTime datetime,
	F_CreatorUserId nvarchar(50),
	F_LastModifyTime datetime,
	F_LastModifyUserId nvarchar(50),
	F_Descz bigint,
	F_sasa time,
	F_asad int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'采购申请表','SCHEMA',N'dbo','TABLE',N'test_purchase';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'采购单号','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_Purchase_number';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_Sort_Code';
EXEC sp_addextendedproperty 'MS_Description',N'采购申请人','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_Applys';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_Dep_Name';
EXEC sp_addextendedproperty 'MS_Description',N'采购申请日期','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_Purchase';
EXEC sp_addextendedproperty 'MS_Description',N'采购原因','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_Reasons';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_Remarks';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_LastModifyTime';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_LastModifyUserId';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_Descz';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_sasa';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'F_asad';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'test_purchase','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：test_purchase_form
-- ----------------------------
CREATE TABLE test_purchase_form(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_Supplier_code nvarchar(50),
	F_SortCode nvarchar(50),
	F_Buyer nvarchar(50),
	F_Depname nvarchar(255),
	F_Purchase_Date datetime,
	F_Statuss nvarchar(100),
	F_Totals decimal(38,0),
	F_Supplier nvarchar(100),
	F_Phone nvarchar(50),
	F_Add_ress nvarchar(200),
	F_Creator_Time datetime,
	F_CreatorUserId nvarchar(50),
	F_LastModifyTime datetime,
	F_LastModifyUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_task_id nvarchar(50),
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'采购订单表','SCHEMA',N'dbo','TABLE',N'test_purchase_form';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'供应商识别码','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_Supplier_code';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'采购员','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_Buyer';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_Depname';
EXEC sp_addextendedproperty 'MS_Description',N'采购日期','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_Purchase_Date';
EXEC sp_addextendedproperty 'MS_Description',N'入库状态','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_Statuss';
EXEC sp_addextendedproperty 'MS_Description',N'订单合计金额','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_Totals';
EXEC sp_addextendedproperty 'MS_Description',N'供应商对接人','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_Supplier';
EXEC sp_addextendedproperty 'MS_Description',N'联系电话','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_Phone';
EXEC sp_addextendedproperty 'MS_Description',N'收货地址','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_Add_ress';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_Creator_Time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_LastModifyTime';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'F_LastModifyUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'test_purchase_form','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：test_purchase_form_order
-- ----------------------------
CREATE TABLE test_purchase_form_order(
	F_Id nvarchar(50) NOT NULL,
	F_Purchase_id nvarchar(50),
	F_Product nvarchar(50),
	F_Product_name_2 nvarchar(50),
	F_Product_code nvarchar(50),
	F_Product_Category nvarchar(50),
	F_Specifications nvarchar(50),
	F_Unit decimal(18,2),
	F_Unitprice decimal(18,2),
	F_Discount decimal(18,2),
	F_Actualunit_price_name decimal(18,2),
	F_Numbers decimal(18,2),
	F_CreatorTime datetime,
	F_CreatorUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'采购订单明细表','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'主表主键','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Purchase_id';
EXEC sp_addextendedproperty 'MS_Description',N'产品','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Product';
EXEC sp_addextendedproperty 'MS_Description',N'产品名称','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Product_name_2';
EXEC sp_addextendedproperty 'MS_Description',N'产品编码','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Product_code';
EXEC sp_addextendedproperty 'MS_Description',N'产品分类','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Product_Category';
EXEC sp_addextendedproperty 'MS_Description',N'规格','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Specifications';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Unit';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Unitprice';
EXEC sp_addextendedproperty 'MS_Description',N'折扣（%）','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Discount';
EXEC sp_addextendedproperty 'MS_Description',N'实际单价（元）','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Actualunit_price_name';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_Numbers';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_purchase_form_order','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：test_purchaseorder
-- ----------------------------
CREATE TABLE test_purchaseorder(
	F_Id nvarchar(50) NOT NULL,
	F_Purchaseid nvarchar(50),
	F_Product nvarchar(50),
	F_Product_name nvarchar(50),
	F_Product_Code nvarchar(50),
	F_Product_category nvarchar(50),
	F_Specifications nvarchar(100),
	F_Unit nvarchar(50),
	F_Numbers decimal(18,2),
	F_CreatorTime datetime,
	F_CreatorUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'采购单明细表','SCHEMA',N'dbo','TABLE',N'test_purchaseorder';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'主表主键','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'F_Purchaseid';
EXEC sp_addextendedproperty 'MS_Description',N'产品','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'F_Product';
EXEC sp_addextendedproperty 'MS_Description',N'产品名称','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'F_Product_name';
EXEC sp_addextendedproperty 'MS_Description',N'产品编码','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'F_Product_Code';
EXEC sp_addextendedproperty 'MS_Description',N'产品分类','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'F_Product_category';
EXEC sp_addextendedproperty 'MS_Description',N'规格','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'F_Specifications';
EXEC sp_addextendedproperty 'MS_Description',N'F_Unit','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'F_Unit';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'F_Numbers';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_purchaseorder','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：test_receivable
-- ----------------------------
CREATE TABLE test_receivable(
	F_Id nvarchar(50) NOT NULL,
	F_Building nvarchar(100),
	F_Room nvarchar(100),
	F_Company_name nvarchar(50),
	F_Userid nvarchar(50),
	F_Phone nvarchar(50),
	F_Ost nvarchar(50),
	F_Sort_Code bigint,
	F_EnabledMark int,
	F_CreatorTime datetime,
	F_CreatorUserId nvarchar(50),
	F_LastModifyTime datetime,
	F_LastModifyUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_version int,
	f_flowtaskid nvarchar(50),
	f_flow_id nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_inte_assistant int

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'应收费用主表','SCHEMA',N'dbo','TABLE',N'test_receivable';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'楼宇号','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_Building';
EXEC sp_addextendedproperty 'MS_Description',N'房间号','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_Room';
EXEC sp_addextendedproperty 'MS_Description',N'公司名称','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_Company_name';
EXEC sp_addextendedproperty 'MS_Description',N'对接人','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_Userid';
EXEC sp_addextendedproperty 'MS_Description',N'联系方式','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_Phone';
EXEC sp_addextendedproperty 'MS_Description',N'职务','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_Ost';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_Sort_Code';
EXEC sp_addextendedproperty 'MS_Description',N'有效标志','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_EnabledMark';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_LastModifyTime';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'F_LastModifyUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'f_version';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'f_flowtaskid';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'集成助手数据标识','SCHEMA',N'dbo','TABLE',N'test_receivable','COLUMN',N'f_inte_assistant';
-- ----------------------------
-- 表名：test_reimbursement
-- ----------------------------
CREATE TABLE test_reimbursement(
	F_Id nvarchar(50) NOT NULL,
	F_Reimburse_ment nvarchar(50),
	F_Reimbursement_date_AP nvarchar(50),
	F_Userid nvarchar(200),
	F_Dep_Name nvarchar(255),
	F_Totala_Mount decimal(18,2),
	F_Reasons nvarchar(300),
	F_Remarks nvarchar(500),
	F_CreatorTime datetime,
	F_CreatorUserId nvarchar(50),
	F_LastModify_Time datetime,
	F_LastModify_UserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'财务报销信息表','SCHEMA',N'dbo','TABLE',N'test_reimbursement';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'报销单号','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_Reimburse_ment';
EXEC sp_addextendedproperty 'MS_Description',N'项目名称','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_Reimbursement_date_AP';
EXEC sp_addextendedproperty 'MS_Description',N'报销人','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_Userid';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_Dep_Name';
EXEC sp_addextendedproperty 'MS_Description',N'总金额','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_Totala_Mount';
EXEC sp_addextendedproperty 'MS_Description',N'报销事由','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_Reasons';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_Remarks';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_LastModify_Time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'F_LastModify_UserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_reimbursement','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：test_subpackage
-- ----------------------------
CREATE TABLE test_subpackage(
	F_Id nvarchar(50) NOT NULL,
	F_Sort_Code bigint,
	F_Applys nvarchar(500),
	F_Arrival_Date datetime,
	F_Project_s nvarchar(200),
	F_Dep_name_A nvarchar(255),
	F_Contractor nvarchar(100),
	F_Signer nvarchar(100),
	F_Firstparty nvarchar(300),
	F_Contract nvarchar(100),
	F_Contract_number nvarchar(100),
	F_Contract_date datetime,
	F_Start_date_AA datetime,
	F_Enddate_QP datetime,
	F_Contract_money decimal(18,2),
	F_Remarks nvarchar(1000),
	F_fujian nvarchar(max),
	F_Invoiced decimal(18,2),
	F_CreatorUserId nvarchar(50),
	F_CreatorTime datetime,
	F_LastModifyTime datetime,
	F_LastModifyUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flowid nvarchar(50),
	f_flow_task_id nvarchar(50),
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'分包合同表','SCHEMA',N'dbo','TABLE',N'test_subpackage';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'序号','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Sort_Code';
EXEC sp_addextendedproperty 'MS_Description',N'填单人','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Applys';
EXEC sp_addextendedproperty 'MS_Description',N'填单日期','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Arrival_Date';
EXEC sp_addextendedproperty 'MS_Description',N'所属项目','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Project_s';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Dep_name_A';
EXEC sp_addextendedproperty 'MS_Description',N'承包方','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Contractor';
EXEC sp_addextendedproperty 'MS_Description',N'合同签订人','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Signer';
EXEC sp_addextendedproperty 'MS_Description',N'客户名称','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Firstparty';
EXEC sp_addextendedproperty 'MS_Description',N'合同','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Contract';
EXEC sp_addextendedproperty 'MS_Description',N'合同编号','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Contract_number';
EXEC sp_addextendedproperty 'MS_Description',N'合同签订日期','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Contract_date';
EXEC sp_addextendedproperty 'MS_Description',N'开始日期','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Start_date_AA';
EXEC sp_addextendedproperty 'MS_Description',N'结束日期','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Enddate_QP';
EXEC sp_addextendedproperty 'MS_Description',N'合同金额','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Contract_money';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Remarks';
EXEC sp_addextendedproperty 'MS_Description',N'附件','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_fujian';
EXEC sp_addextendedproperty 'MS_Description',N'已付款金额','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_Invoiced';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_LastModifyTime';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'F_LastModifyUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'f_flowid';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'f_flow_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'test_subpackage','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：test_vehicleinfo
-- ----------------------------
CREATE TABLE test_vehicleinfo(
	F_Id nvarchar(50) NOT NULL,
	F_SortCode nvarchar(50),
	F_Numberplate nvarchar(50),
	F_Brand nvarchar(50),
	F_Model nvarchar(50),
	F_Type nvarchar(50),
	F_Colour nvarchar(50),
	F_Number nvarchar(50),
	F_Purchaseprice nvarchar(50),
	F_Purchasedate datetime,
	F_Subordinate nvarchar(50),
	F_Depname nvarchar(255),
	F_EnableMark nvarchar(50),
	F_Mileagetraveled nvarchar(50),
	F_Credentials nvarchar(50),
	F_Remarks nvarchar(500),
	F_CreatorTime datetime,
	F_CreatorUserId nvarchar(50),
	F_LastModifyTime datetime,
	F_LastModifyUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'车辆信息表','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'序号','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'车辆号牌','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Numberplate';
EXEC sp_addextendedproperty 'MS_Description',N'车辆品牌','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Brand';
EXEC sp_addextendedproperty 'MS_Description',N'车辆型号','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Model';
EXEC sp_addextendedproperty 'MS_Description',N'车辆类型','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Type';
EXEC sp_addextendedproperty 'MS_Description',N'车身颜色','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Colour';
EXEC sp_addextendedproperty 'MS_Description',N'乘坐人数','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Number';
EXEC sp_addextendedproperty 'MS_Description',N'购置价格','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Purchaseprice';
EXEC sp_addextendedproperty 'MS_Description',N'购置日期','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Purchasedate';
EXEC sp_addextendedproperty 'MS_Description',N'所属领导','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Subordinate';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Depname';
EXEC sp_addextendedproperty 'MS_Description',N'车辆状态','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_EnableMark';
EXEC sp_addextendedproperty 'MS_Description',N'已行驶里程/KM','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Mileagetraveled';
EXEC sp_addextendedproperty 'MS_Description',N'随车证件','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Credentials';
EXEC sp_addextendedproperty 'MS_Description',N'其他信息','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_Remarks';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_CreatorTime';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_LastModifyTime';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'F_LastModifyUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_vehicleinfo','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：test_warehousing
-- ----------------------------
CREATE TABLE test_warehousing(
	F_Id nvarchar(50) NOT NULL,
	F_Purchase_number nvarchar(50),
	F_Sort_Code nvarchar(50),
	F_Applys nvarchar(50),
	F_Dep_name nvarchar(255),
	F_Purchase datetime,
	F_Creator_Time datetime,
	F_Creator_UserId nvarchar(50),
	F_LastModify_time datetime,
	F_LastModifyUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'采购入库表','SCHEMA',N'dbo','TABLE',N'test_warehousing';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_warehousing','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'入库单号','SCHEMA',N'dbo','TABLE',N'test_warehousing','COLUMN',N'F_Purchase_number';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'test_warehousing','COLUMN',N'F_Sort_Code';
EXEC sp_addextendedproperty 'MS_Description',N'入库员','SCHEMA',N'dbo','TABLE',N'test_warehousing','COLUMN',N'F_Applys';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'test_warehousing','COLUMN',N'F_Dep_name';
EXEC sp_addextendedproperty 'MS_Description',N'入库日期','SCHEMA',N'dbo','TABLE',N'test_warehousing','COLUMN',N'F_Purchase';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_warehousing','COLUMN',N'F_Creator_Time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_warehousing','COLUMN',N'F_Creator_UserId';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'test_warehousing','COLUMN',N'F_LastModify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'test_warehousing','COLUMN',N'F_LastModifyUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_warehousing','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：test_warehousingorder
-- ----------------------------
CREATE TABLE test_warehousingorder(
	F_Id nvarchar(50) NOT NULL,
	F_Purchaseid nvarchar(50),
	F_Product nvarchar(50),
	F_Product_name nvarchar(50),
	F_Product_Code nvarchar(50),
	F_Product_category_bb nvarchar(50),
	F_Specifications nvarchar(100),
	F_Unit nvarchar(50),
	F_Actualunitprice decimal(18,2),
	F_Numbers decimal(18,2),
	F_Creator_Time datetime,
	F_CreatorUserId nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'入库单明细表','SCHEMA',N'dbo','TABLE',N'test_warehousingorder';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'主表主键','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_Purchaseid';
EXEC sp_addextendedproperty 'MS_Description',N'产品','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_Product';
EXEC sp_addextendedproperty 'MS_Description',N'产品名称','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_Product_name';
EXEC sp_addextendedproperty 'MS_Description',N'产品编码','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_Product_Code';
EXEC sp_addextendedproperty 'MS_Description',N'产品分类','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_Product_category_bb';
EXEC sp_addextendedproperty 'MS_Description',N'规格','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_Specifications';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_Unit';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_Actualunitprice';
EXEC sp_addextendedproperty 'MS_Description',N'采购数量','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_Numbers';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_Creator_Time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'F_CreatorUserId';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'test_warehousingorder','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：undo_log
-- ----------------------------
CREATE TABLE undo_log(
	id bigint IDENTITY(1, 1),
	branch_id bigint NOT NULL,
	xid nvarchar(100) NOT NULL,
	context nvarchar(128) NOT NULL,
	rollback_info varbinary(max) NOT NULL,
	log_status int NOT NULL,
	log_created datetime,
	log_modified datetime,
	ext nvarchar(100),
	f_tenant_id nvarchar(50)

, PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description',N'事务表','SCHEMA',N'dbo','TABLE',N'undo_log';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'undo_log','COLUMN',N'id';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'undo_log','COLUMN',N'branch_id';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'undo_log','COLUMN',N'xid';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'undo_log','COLUMN',N'context';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'undo_log','COLUMN',N'rollback_info';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'undo_log','COLUMN',N'log_status';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'undo_log','COLUMN',N'log_created';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'undo_log','COLUMN',N'log_modified';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'undo_log','COLUMN',N'ext';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'undo_log','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：wform_applybanquet
-- ----------------------------
CREATE TABLE wform_applybanquet(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_Position nvarchar(50),
	F_ApplyDate datetime,
	F_BanquetNum nvarchar(50),
	F_BanquetPeople nvarchar(max),
	F_Total nvarchar(50),
	F_Place nvarchar(50),
	F_ExpectedCost decimal(18,2),
	F_Description nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'宴请申请','SCHEMA',N'dbo','TABLE',N'wform_applybanquet';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人员','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'所属职务','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_Position';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'宴请人数','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_BanquetNum';
EXEC sp_addextendedproperty 'MS_Description',N'宴请人员','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_BanquetPeople';
EXEC sp_addextendedproperty 'MS_Description',N'人员总数','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_Total';
EXEC sp_addextendedproperty 'MS_Description',N'宴请地点','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_Place';
EXEC sp_addextendedproperty 'MS_Description',N'预计费用','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_ExpectedCost';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_applybanquet','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_applydelivergoods
-- ----------------------------
CREATE TABLE wform_applydelivergoods(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_CustomerName nvarchar(50),
	F_Contacts nvarchar(50),
	F_ContactPhone nvarchar(50),
	F_CustomerAddres nvarchar(50),
	F_GoodsBelonged nvarchar(50),
	F_InvoiceDate datetime,
	F_FreightCompany nvarchar(50),
	F_DeliveryType nvarchar(50),
	F_RransportNum nvarchar(50),
	F_FreightCharges decimal(18,2),
	F_CargoInsurance decimal(18,2),
	F_Description nvarchar(max),
	F_InvoiceValue decimal(18,2),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'发货申请单','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'客户名称','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_CustomerName';
EXEC sp_addextendedproperty 'MS_Description',N'联系人','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_Contacts';
EXEC sp_addextendedproperty 'MS_Description',N'联系电话','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_ContactPhone';
EXEC sp_addextendedproperty 'MS_Description',N'客户地址','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_CustomerAddres';
EXEC sp_addextendedproperty 'MS_Description',N'货品所属','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_GoodsBelonged';
EXEC sp_addextendedproperty 'MS_Description',N'发货日期','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_InvoiceDate';
EXEC sp_addextendedproperty 'MS_Description',N'货运公司','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_FreightCompany';
EXEC sp_addextendedproperty 'MS_Description',N'发货类型','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_DeliveryType';
EXEC sp_addextendedproperty 'MS_Description',N'货运单号','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_RransportNum';
EXEC sp_addextendedproperty 'MS_Description',N'货运费','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_FreightCharges';
EXEC sp_addextendedproperty 'MS_Description',N'保险金额','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_CargoInsurance';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'发货金额','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'F_InvoiceValue';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoods','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_applydelivergoodsentry
-- ----------------------------
CREATE TABLE wform_applydelivergoodsentry(
	F_Id nvarchar(50) NOT NULL,
	F_InvoiceId nvarchar(50),
	F_GoodsName nvarchar(50),
	F_Specifications nvarchar(50),
	F_Unit nvarchar(max),
	F_Qty nvarchar(50),
	F_Price decimal(18,2),
	F_Amount decimal(18,2),
	F_Description nvarchar(max),
	F_SortCode bigint,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'发货明细','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'发货主键','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry','COLUMN',N'F_InvoiceId';
EXEC sp_addextendedproperty 'MS_Description',N'商品名称','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry','COLUMN',N'F_GoodsName';
EXEC sp_addextendedproperty 'MS_Description',N'规格型号','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry','COLUMN',N'F_Specifications';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry','COLUMN',N'F_Unit';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry','COLUMN',N'F_Qty';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry','COLUMN',N'F_Price';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry','COLUMN',N'F_Amount';
EXEC sp_addextendedproperty 'MS_Description',N'描述','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'排序码','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_applydelivergoodsentry','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：wform_applymeeting
-- ----------------------------
CREATE TABLE wform_applymeeting(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_Position nvarchar(50),
	F_ConferenceName nvarchar(50),
	F_ConferenceTheme nvarchar(50),
	F_ConferenceType nvarchar(50),
	F_EstimatePeople nvarchar(50),
	F_ConferenceRoom nvarchar(50),
	F_Administrator nvarchar(50),
	F_LookPeople nvarchar(50),
	F_Memo nvarchar(50),
	F_Attendees nvarchar(50),
	F_ApplyMaterial nvarchar(50),
	F_EstimatedAmount decimal(18,2),
	F_OtherAttendee nvarchar(50),
	F_StartDate datetime,
	F_EndDate datetime,
	F_FileJson nvarchar(max),
	F_Describe nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'会议申请','SCHEMA',N'dbo','TABLE',N'wform_applymeeting';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'所属职务','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_Position';
EXEC sp_addextendedproperty 'MS_Description',N'会议名称','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_ConferenceName';
EXEC sp_addextendedproperty 'MS_Description',N'会议主题','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_ConferenceTheme';
EXEC sp_addextendedproperty 'MS_Description',N'会议类型','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_ConferenceType';
EXEC sp_addextendedproperty 'MS_Description',N'预计人数','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_EstimatePeople';
EXEC sp_addextendedproperty 'MS_Description',N'会议室','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_ConferenceRoom';
EXEC sp_addextendedproperty 'MS_Description',N'管理人','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_Administrator';
EXEC sp_addextendedproperty 'MS_Description',N'查看人','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_LookPeople';
EXEC sp_addextendedproperty 'MS_Description',N'纪要员','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_Memo';
EXEC sp_addextendedproperty 'MS_Description',N'出席人','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_Attendees';
EXEC sp_addextendedproperty 'MS_Description',N'申请材料','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_ApplyMaterial';
EXEC sp_addextendedproperty 'MS_Description',N'预计金额','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_EstimatedAmount';
EXEC sp_addextendedproperty 'MS_Description',N'其他出席人','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_OtherAttendee';
EXEC sp_addextendedproperty 'MS_Description',N'开始时间','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_StartDate';
EXEC sp_addextendedproperty 'MS_Description',N'结束时间','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_EndDate';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'会议描述','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'F_Describe';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_applymeeting','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_archivalborrow
-- ----------------------------
CREATE TABLE wform_archivalborrow(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_BorrowingDepartment nvarchar(255),
	F_ArchivesName nvarchar(50),
	F_ArchivalAttributes nvarchar(50),
	F_BorrowMode nvarchar(50),
	F_ApplyReason nvarchar(max),
	F_ArchivesId nvarchar(50),
	F_BorrowingDate datetime,
	F_ReturnDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'档案借阅申请','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'借阅部门','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_BorrowingDepartment';
EXEC sp_addextendedproperty 'MS_Description',N'档案名称','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_ArchivesName';
EXEC sp_addextendedproperty 'MS_Description',N'档案属性','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_ArchivalAttributes';
EXEC sp_addextendedproperty 'MS_Description',N'借阅方式','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_BorrowMode';
EXEC sp_addextendedproperty 'MS_Description',N'申请原因','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_ApplyReason';
EXEC sp_addextendedproperty 'MS_Description',N'档案编号','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_ArchivesId';
EXEC sp_addextendedproperty 'MS_Description',N'借阅时间','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_BorrowingDate';
EXEC sp_addextendedproperty 'MS_Description',N'归还时间','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'F_ReturnDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_archivalborrow','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_articleswarehous
-- ----------------------------
CREATE TABLE wform_articleswarehous(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_Department nvarchar(255),
	F_Articles nvarchar(50),
	F_Classification nvarchar(50),
	F_ArticlesId nvarchar(50),
	F_Company nvarchar(50),
	F_EstimatePeople nvarchar(50),
	F_ApplyReasons nvarchar(max),
	F_ApplyDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'用品入库申请表','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_Department';
EXEC sp_addextendedproperty 'MS_Description',N'用品库存','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_Articles';
EXEC sp_addextendedproperty 'MS_Description',N'用品分类','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_Classification';
EXEC sp_addextendedproperty 'MS_Description',N'用品编号','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_ArticlesId';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_Company';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_EstimatePeople';
EXEC sp_addextendedproperty 'MS_Description',N'申请原因','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_ApplyReasons';
EXEC sp_addextendedproperty 'MS_Description',N'申请时间','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_articleswarehous','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_batchpack
-- ----------------------------
CREATE TABLE wform_batchpack(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ProductName nvarchar(50),
	F_Production nvarchar(50),
	F_Compactor nvarchar(50),
	F_CompactorDate datetime,
	F_Standard nvarchar(50),
	F_WarehousNo nvarchar(50),
	F_ProductionQuty nvarchar(50),
	F_OperationDate datetime,
	F_Regulations nvarchar(50),
	F_Packing nvarchar(50),
	F_Description nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'批包装指令','SCHEMA',N'dbo','TABLE',N'wform_batchpack';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'产品名称','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_ProductName';
EXEC sp_addextendedproperty 'MS_Description',N'生产车间','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_Production';
EXEC sp_addextendedproperty 'MS_Description',N'编制人员','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_Compactor';
EXEC sp_addextendedproperty 'MS_Description',N'编制日期','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_CompactorDate';
EXEC sp_addextendedproperty 'MS_Description',N'产品规格','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_Standard';
EXEC sp_addextendedproperty 'MS_Description',N'入库序号','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_WarehousNo';
EXEC sp_addextendedproperty 'MS_Description',N'批产数量','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_ProductionQuty';
EXEC sp_addextendedproperty 'MS_Description',N'操作日期','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_OperationDate';
EXEC sp_addextendedproperty 'MS_Description',N'工艺规程','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_Regulations';
EXEC sp_addextendedproperty 'MS_Description',N'包装规格','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_Packing';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_batchpack','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_batchtable
-- ----------------------------
CREATE TABLE wform_batchtable(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_FileTitle nvarchar(50),
	F_DraftedPerson nvarchar(50),
	F_FillNum nvarchar(50),
	F_SendUnit nvarchar(50),
	F_Typing nvarchar(50),
	F_WritingDate datetime,
	F_ShareNum nvarchar(50),
	F_FileJson nvarchar(max),
	F_Description nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'行文呈批表','SCHEMA',N'dbo','TABLE',N'wform_batchtable';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'文件标题','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_FileTitle';
EXEC sp_addextendedproperty 'MS_Description',N'主办单位','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_DraftedPerson';
EXEC sp_addextendedproperty 'MS_Description',N'文件编号','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_FillNum';
EXEC sp_addextendedproperty 'MS_Description',N'发往单位','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_SendUnit';
EXEC sp_addextendedproperty 'MS_Description',N'打字','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_Typing';
EXEC sp_addextendedproperty 'MS_Description',N'发文日期','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_WritingDate';
EXEC sp_addextendedproperty 'MS_Description',N'份数','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_ShareNum';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_batchtable','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_conbilling
-- ----------------------------
CREATE TABLE wform_conbilling(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_Drawer nvarchar(50),
	F_BillDate datetime,
	F_CompanyName nvarchar(50),
	F_ConName nvarchar(50),
	F_Bank nvarchar(50),
	F_Amount nvarchar(50),
	F_BillAmount decimal(18,2),
	F_TaxId nvarchar(50),
	F_InvoiceId nvarchar(50),
	F_InvoAddress nvarchar(50),
	F_PayAmount decimal(18,2),
	F_FileJson nvarchar(max),
	F_Description nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'合同开票流程','SCHEMA',N'dbo','TABLE',N'wform_conbilling';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'开票人','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_Drawer';
EXEC sp_addextendedproperty 'MS_Description',N'开票日期','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_BillDate';
EXEC sp_addextendedproperty 'MS_Description',N'公司名称','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_CompanyName';
EXEC sp_addextendedproperty 'MS_Description',N'关联名称','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_ConName';
EXEC sp_addextendedproperty 'MS_Description',N'开户银行','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_Bank';
EXEC sp_addextendedproperty 'MS_Description',N'开户账号','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_Amount';
EXEC sp_addextendedproperty 'MS_Description',N'开票金额','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_BillAmount';
EXEC sp_addextendedproperty 'MS_Description',N'税号','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_TaxId';
EXEC sp_addextendedproperty 'MS_Description',N'发票号','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_InvoiceId';
EXEC sp_addextendedproperty 'MS_Description',N'发票地址','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_InvoAddress';
EXEC sp_addextendedproperty 'MS_Description',N'付款金额','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_PayAmount';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_conbilling','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_contractapproval
-- ----------------------------
CREATE TABLE wform_contractapproval(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_FirstPartyUnit nvarchar(50),
	F_SecondPartyUnit nvarchar(50),
	F_FirstPartyPerson nvarchar(50),
	F_SecondPartyPerson nvarchar(50),
	F_FirstPartyContact nvarchar(50),
	F_SecondPartyContact nvarchar(50),
	F_ContractName nvarchar(50),
	F_ContractClass nvarchar(50),
	F_ContractType nvarchar(50),
	F_ContractId nvarchar(50),
	F_BusinessPerson nvarchar(50),
	F_IncomeAmount decimal(18,2),
	F_InputPerson nvarchar(50),
	F_FileJson nvarchar(max),
	F_PrimaryCoverage nvarchar(max),
	F_Description nvarchar(max),
	F_SigningDate datetime,
	F_StartDate datetime,
	F_EndDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'合同审批','SCHEMA',N'dbo','TABLE',N'wform_contractapproval';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'甲方单位','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_FirstPartyUnit';
EXEC sp_addextendedproperty 'MS_Description',N'乙方单位','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_SecondPartyUnit';
EXEC sp_addextendedproperty 'MS_Description',N'甲方负责人','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_FirstPartyPerson';
EXEC sp_addextendedproperty 'MS_Description',N'乙方负责人','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_SecondPartyPerson';
EXEC sp_addextendedproperty 'MS_Description',N'甲方联系方式','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_FirstPartyContact';
EXEC sp_addextendedproperty 'MS_Description',N'乙方联系方式','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_SecondPartyContact';
EXEC sp_addextendedproperty 'MS_Description',N'合同名称','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_ContractName';
EXEC sp_addextendedproperty 'MS_Description',N'合同分类','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_ContractClass';
EXEC sp_addextendedproperty 'MS_Description',N'合同类型','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_ContractType';
EXEC sp_addextendedproperty 'MS_Description',N'合同编号','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_ContractId';
EXEC sp_addextendedproperty 'MS_Description',N'业务人员','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_BusinessPerson';
EXEC sp_addextendedproperty 'MS_Description',N'收入金额','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_IncomeAmount';
EXEC sp_addextendedproperty 'MS_Description',N'填写人员','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_InputPerson';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'主要内容','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_PrimaryCoverage';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'签约时间','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_SigningDate';
EXEC sp_addextendedproperty 'MS_Description',N'开始时间','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_StartDate';
EXEC sp_addextendedproperty 'MS_Description',N'结束时间','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'F_EndDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_contractapproval','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_contractapprovalsheet
-- ----------------------------
CREATE TABLE wform_contractapprovalsheet(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_ApplyDate datetime,
	F_ContractId nvarchar(50),
	F_ContractNum nvarchar(50),
	F_FirstParty nvarchar(50),
	F_SecondParty nvarchar(50),
	F_ContractName nvarchar(50),
	F_ContractType nvarchar(50),
	F_PersonCharge nvarchar(50),
	F_LeadDepartment nvarchar(255),
	F_SignArea nvarchar(50),
	F_IncomeAmount decimal(18,2),
	F_TotalExpenditure decimal(18,2),
	F_ContractPeriod nvarchar(50),
	F_PaymentMethod nvarchar(50),
	F_BudgetaryApproval nvarchar(50),
	F_StartContractDate datetime,
	F_EndContractDate datetime,
	F_FileJson nvarchar(max),
	F_ContractContent nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'合同申请单表','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'编号支出','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_ContractId';
EXEC sp_addextendedproperty 'MS_Description',N'合同号','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_ContractNum';
EXEC sp_addextendedproperty 'MS_Description',N'签署方(甲方)','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_FirstParty';
EXEC sp_addextendedproperty 'MS_Description',N'乙方','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_SecondParty';
EXEC sp_addextendedproperty 'MS_Description',N'合同名称','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_ContractName';
EXEC sp_addextendedproperty 'MS_Description',N'合同类型','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_ContractType';
EXEC sp_addextendedproperty 'MS_Description',N'合作负责人','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_PersonCharge';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_LeadDepartment';
EXEC sp_addextendedproperty 'MS_Description',N'签订地区','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_SignArea';
EXEC sp_addextendedproperty 'MS_Description',N'收入金额','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_IncomeAmount';
EXEC sp_addextendedproperty 'MS_Description',N'支出总额','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_TotalExpenditure';
EXEC sp_addextendedproperty 'MS_Description',N'合同期限','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_ContractPeriod';
EXEC sp_addextendedproperty 'MS_Description',N'付款方式','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_PaymentMethod';
EXEC sp_addextendedproperty 'MS_Description',N'预算批付','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_BudgetaryApproval';
EXEC sp_addextendedproperty 'MS_Description',N'开始时间','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_StartContractDate';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_EndContractDate';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'内容简要','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'F_ContractContent';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_contractapprovalsheet','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_debitbill
-- ----------------------------
CREATE TABLE wform_debitbill(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_Departmental nvarchar(255),
	F_ApplyDate datetime,
	F_StaffName nvarchar(50),
	F_StaffPost nvarchar(50),
	F_StaffId nvarchar(50),
	F_LoanMode nvarchar(50),
	F_AmountDebit decimal(18,2),
	F_TransferAccount nvarchar(50),
	F_RepaymentBill nvarchar(50),
	F_TeachingDate datetime,
	F_PaymentMethod nvarchar(50),
	F_Reason nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'借支单','SCHEMA',N'dbo','TABLE',N'wform_debitbill';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'工作部门','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_Departmental';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'员工姓名','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_StaffName';
EXEC sp_addextendedproperty 'MS_Description',N'员工职务','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_StaffPost';
EXEC sp_addextendedproperty 'MS_Description',N'员工编号','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_StaffId';
EXEC sp_addextendedproperty 'MS_Description',N'借款方式','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_LoanMode';
EXEC sp_addextendedproperty 'MS_Description',N'借支金额','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_AmountDebit';
EXEC sp_addextendedproperty 'MS_Description',N'转账账户','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_TransferAccount';
EXEC sp_addextendedproperty 'MS_Description',N'还款票据','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_RepaymentBill';
EXEC sp_addextendedproperty 'MS_Description',N'还款日期','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_TeachingDate';
EXEC sp_addextendedproperty 'MS_Description',N'支付方式','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_PaymentMethod';
EXEC sp_addextendedproperty 'MS_Description',N'借款原因','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'F_Reason';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_debitbill','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_documentapproval
-- ----------------------------
CREATE TABLE wform_documentapproval(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_FileName nvarchar(50),
	F_DraftedPerson nvarchar(50),
	F_ServiceUnit nvarchar(50),
	F_FillPreparation nvarchar(50),
	F_FillNum nvarchar(50),
	F_ReceiptDate datetime,
	F_FileJson nvarchar(max),
	F_ModifyOpinion nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'文件签批意见表','SCHEMA',N'dbo','TABLE',N'wform_documentapproval';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'文件名称','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_FileName';
EXEC sp_addextendedproperty 'MS_Description',N'拟稿人','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_DraftedPerson';
EXEC sp_addextendedproperty 'MS_Description',N'发文单位','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_ServiceUnit';
EXEC sp_addextendedproperty 'MS_Description',N'文件拟办','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_FillPreparation';
EXEC sp_addextendedproperty 'MS_Description',N'文件编号','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_FillNum';
EXEC sp_addextendedproperty 'MS_Description',N'收文日期','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_ReceiptDate';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'修改意见','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'F_ModifyOpinion';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_documentapproval','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_documentsigning
-- ----------------------------
CREATE TABLE wform_documentsigning(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_FileName nvarchar(50),
	F_FillNum nvarchar(50),
	F_DraftedPerson nvarchar(50),
	F_Reader nvarchar(50),
	F_FillPreparation nvarchar(50),
	F_CheckDate datetime,
	F_PublicationDate datetime,
	F_FileJson nvarchar(max),
	F_DocumentContent nvarchar(max),
	F_AdviceColumn nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'文件签阅表','SCHEMA',N'dbo','TABLE',N'wform_documentsigning';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'文件名称','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_FileName';
EXEC sp_addextendedproperty 'MS_Description',N'文件编号','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_FillNum';
EXEC sp_addextendedproperty 'MS_Description',N'拟稿人','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_DraftedPerson';
EXEC sp_addextendedproperty 'MS_Description',N'签阅人','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_Reader';
EXEC sp_addextendedproperty 'MS_Description',N'文件拟办','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_FillPreparation';
EXEC sp_addextendedproperty 'MS_Description',N'签阅时间','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_CheckDate';
EXEC sp_addextendedproperty 'MS_Description',N'发稿日期','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_PublicationDate';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'文件内容','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_DocumentContent';
EXEC sp_addextendedproperty 'MS_Description',N'建议栏','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'F_AdviceColumn';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_documentsigning','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_expenseexpenditure
-- ----------------------------
CREATE TABLE wform_expenseexpenditure(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_Department nvarchar(255),
	F_ApplyDate datetime,
	F_ContractNum nvarchar(50),
	F_NonContract nvarchar(50),
	F_AccountOpeningBank nvarchar(50),
	F_BankAccount nvarchar(50),
	F_OpenAccount nvarchar(50),
	F_Total decimal(18,2),
	F_PaymentMethod nvarchar(50),
	F_AmountPayment decimal(18,2),
	F_Description nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'费用支出单','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'流程等级','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人员','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'所在部门','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_Department';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'合同编号','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_ContractNum';
EXEC sp_addextendedproperty 'MS_Description',N'非合同支出','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_NonContract';
EXEC sp_addextendedproperty 'MS_Description',N'开户银行','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_AccountOpeningBank';
EXEC sp_addextendedproperty 'MS_Description',N'银行账号','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_BankAccount';
EXEC sp_addextendedproperty 'MS_Description',N'开户姓名','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_OpenAccount';
EXEC sp_addextendedproperty 'MS_Description',N'合计费用','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_Total';
EXEC sp_addextendedproperty 'MS_Description',N'支付方式','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_PaymentMethod';
EXEC sp_addextendedproperty 'MS_Description',N'支付金额','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_AmountPayment';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_expenseexpenditure','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_finishedproduct
-- ----------------------------
CREATE TABLE wform_finishedproduct(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_WarehouseName nvarchar(50),
	F_Warehouse nvarchar(50),
	F_Description nvarchar(max),
	F_ReservoirDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'成品入库单','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'入库人','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct','COLUMN',N'F_WarehouseName';
EXEC sp_addextendedproperty 'MS_Description',N'仓库','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct','COLUMN',N'F_Warehouse';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'入库时间','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct','COLUMN',N'F_ReservoirDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_finishedproduct','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_finishedproductentry
-- ----------------------------
CREATE TABLE wform_finishedproductentry(
	F_Id nvarchar(50) NOT NULL,
	F_WarehouseId nvarchar(50),
	F_GoodsName nvarchar(50),
	F_Specifications nvarchar(50),
	F_Unit nvarchar(50),
	F_Qty nvarchar(50),
	F_Price decimal(18,2),
	F_Amount decimal(18,2),
	F_Description nvarchar(max),
	F_SortCode bigint,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'成品入库单明细','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'入库单号','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry','COLUMN',N'F_WarehouseId';
EXEC sp_addextendedproperty 'MS_Description',N'商品名称','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry','COLUMN',N'F_GoodsName';
EXEC sp_addextendedproperty 'MS_Description',N'规格型号','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry','COLUMN',N'F_Specifications';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry','COLUMN',N'F_Unit';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry','COLUMN',N'F_Qty';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry','COLUMN',N'F_Price';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry','COLUMN',N'F_Amount';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'排序号','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_finishedproductentry','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：wform_incomerecognition
-- ----------------------------
CREATE TABLE wform_incomerecognition(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_SettlementMonth nvarchar(50),
	F_CustomerName nvarchar(50),
	F_ContractNum nvarchar(50),
	F_TotalAmount decimal(18,2),
	F_MoneyBank nvarchar(50),
	F_ActualAmount decimal(18,2),
	F_ContactName nvarchar(50),
	F_ContacPhone nvarchar(50),
	F_ContactQQ nvarchar(50),
	F_UnpaidAmount decimal(18,2),
	F_AmountPaid decimal(18,2),
	F_Description nvarchar(max),
	F_PaymentDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'收入确认分析表','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主题','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'结算月份','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_SettlementMonth';
EXEC sp_addextendedproperty 'MS_Description',N'客户名称','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_CustomerName';
EXEC sp_addextendedproperty 'MS_Description',N'合同编号','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_ContractNum';
EXEC sp_addextendedproperty 'MS_Description',N'合同金额','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_TotalAmount';
EXEC sp_addextendedproperty 'MS_Description',N'到款银行','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_MoneyBank';
EXEC sp_addextendedproperty 'MS_Description',N'到款金额','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_ActualAmount';
EXEC sp_addextendedproperty 'MS_Description',N'联系人姓名','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_ContactName';
EXEC sp_addextendedproperty 'MS_Description',N'联系电话','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_ContacPhone';
EXEC sp_addextendedproperty 'MS_Description',N'联系QQ','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_ContactQQ';
EXEC sp_addextendedproperty 'MS_Description',N'未付金额','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_UnpaidAmount';
EXEC sp_addextendedproperty 'MS_Description',N'已付金额','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_AmountPaid';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'到款日期','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'F_PaymentDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_incomerecognition','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_leaveapply
-- ----------------------------
CREATE TABLE wform_leaveapply(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(200),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_ApplyDept nvarchar(255),
	F_ApplyPost nvarchar(50),
	F_LeaveType nvarchar(50),
	F_LeaveReason nvarchar(max),
	F_LeaveDayCount nvarchar(50),
	F_LeaveHour nvarchar(50),
	F_FileJson nvarchar(max),
	F_Description nvarchar(max),
	F_ApplyDate datetime,
	F_LeaveStartTime datetime,
	F_LeaveEndTime datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'流程表单【请假申请】','SCHEMA',N'dbo','TABLE',N'wform_leaveapply';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'单据编号','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人员','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'申请部门','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_ApplyDept';
EXEC sp_addextendedproperty 'MS_Description',N'申请职位','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_ApplyPost';
EXEC sp_addextendedproperty 'MS_Description',N'请假类别','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_LeaveType';
EXEC sp_addextendedproperty 'MS_Description',N'请假原因','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_LeaveReason';
EXEC sp_addextendedproperty 'MS_Description',N'请假天数','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_LeaveDayCount';
EXEC sp_addextendedproperty 'MS_Description',N'请假小时','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_LeaveHour';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'请假时间','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_LeaveStartTime';
EXEC sp_addextendedproperty 'MS_Description',N'结束时间','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'F_LeaveEndTime';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_leaveapply','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：wform_letterservice
-- ----------------------------
CREATE TABLE wform_letterservice(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_HostUnit nvarchar(50),
	F_Title nvarchar(50),
	F_IssuedNum nvarchar(50),
	F_WritingDate datetime,
	F_ShareNum nvarchar(50),
	F_MainDelivery nvarchar(50),
	F_Copy nvarchar(50),
	F_FileJson nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'发文单','SCHEMA',N'dbo','TABLE',N'wform_letterservice';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'主办单位','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_HostUnit';
EXEC sp_addextendedproperty 'MS_Description',N'发文标题','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_Title';
EXEC sp_addextendedproperty 'MS_Description',N'发文字号','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_IssuedNum';
EXEC sp_addextendedproperty 'MS_Description',N'发文日期','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_WritingDate';
EXEC sp_addextendedproperty 'MS_Description',N'份数','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_ShareNum';
EXEC sp_addextendedproperty 'MS_Description',N'主送','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_MainDelivery';
EXEC sp_addextendedproperty 'MS_Description',N'抄送','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_Copy';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_letterservice','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_materialrequisition
-- ----------------------------
CREATE TABLE wform_materialrequisition(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_LeadPeople nvarchar(50),
	F_LeadDepartment nvarchar(255),
	F_LeadDate datetime,
	F_Warehouse nvarchar(50),
	F_Description nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'领料单','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'领料人','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'F_LeadPeople';
EXEC sp_addextendedproperty 'MS_Description',N'领料部门','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'F_LeadDepartment';
EXEC sp_addextendedproperty 'MS_Description',N'领料日期','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'F_LeadDate';
EXEC sp_addextendedproperty 'MS_Description',N'仓库','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'F_Warehouse';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_materialrequisition','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_materialrequisitionentry
-- ----------------------------
CREATE TABLE wform_materialrequisitionentry(
	F_Id nvarchar(50) NOT NULL,
	F_LeadeId nvarchar(50),
	F_GoodsName nvarchar(50),
	F_Specifications nvarchar(50),
	F_Unit nvarchar(50),
	F_MaterialDemand nvarchar(50),
	F_Proportioning nvarchar(50),
	F_Price decimal(18,2),
	F_Amount decimal(18,2),
	F_Description nvarchar(max),
	F_SortCode bigint,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'领料明细','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'领料主键','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'F_LeadeId';
EXEC sp_addextendedproperty 'MS_Description',N'商品名称','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'F_GoodsName';
EXEC sp_addextendedproperty 'MS_Description',N'规格型号','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'F_Specifications';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'F_Unit';
EXEC sp_addextendedproperty 'MS_Description',N'需数量','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'F_MaterialDemand';
EXEC sp_addextendedproperty 'MS_Description',N'配数量','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'F_Proportioning';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'F_Price';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'F_Amount';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'排序码','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_materialrequisitionentry','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：wform_monthlyreport
-- ----------------------------
CREATE TABLE wform_monthlyreport(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_ApplyDate datetime,
	F_ApplyDept nvarchar(255),
	F_ApplyPost nvarchar(50),
	F_PlanEndTime datetime,
	F_OveralEvaluat nvarchar(max),
	F_NPWorkMatter nvarchar(50),
	F_NPFinishTime datetime,
	F_NFinishMethod nvarchar(max),
	F_FileJson nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'月工作总结','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'创建人','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'创建日期','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_ApplyDept';
EXEC sp_addextendedproperty 'MS_Description',N'所属职务','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_ApplyPost';
EXEC sp_addextendedproperty 'MS_Description',N'完成时间','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_PlanEndTime';
EXEC sp_addextendedproperty 'MS_Description',N'总体评价','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_OveralEvaluat';
EXEC sp_addextendedproperty 'MS_Description',N'工作事项','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_NPWorkMatter';
EXEC sp_addextendedproperty 'MS_Description',N'次月日期','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_NPFinishTime';
EXEC sp_addextendedproperty 'MS_Description',N'次月目标','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_NFinishMethod';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_monthlyreport','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_officesupplies
-- ----------------------------
CREATE TABLE wform_officesupplies(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(255),
	F_Department nvarchar(255),
	F_UseStock nvarchar(50),
	F_Classification nvarchar(50),
	F_ArticlesName nvarchar(50),
	F_ArticlesNum nvarchar(50),
	F_ArticlesId nvarchar(50),
	F_ApplyReasons nvarchar(max),
	F_ApplyDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'领用办公用品申请表','SCHEMA',N'dbo','TABLE',N'wform_officesupplies';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请部门','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_Department';
EXEC sp_addextendedproperty 'MS_Description',N'领用仓库','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_UseStock';
EXEC sp_addextendedproperty 'MS_Description',N'用品分类','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_Classification';
EXEC sp_addextendedproperty 'MS_Description',N'用品名称','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_ArticlesName';
EXEC sp_addextendedproperty 'MS_Description',N'用品数量','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_ArticlesNum';
EXEC sp_addextendedproperty 'MS_Description',N'用品编号','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_ArticlesId';
EXEC sp_addextendedproperty 'MS_Description',N'申请原因','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_ApplyReasons';
EXEC sp_addextendedproperty 'MS_Description',N'申请时间','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_officesupplies','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_outboundorder
-- ----------------------------
CREATE TABLE wform_outboundorder(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_CustomerName nvarchar(50),
	F_Warehouse nvarchar(50),
	F_OutStorage nvarchar(50),
	F_BusinessPeople nvarchar(50),
	F_BusinessType nvarchar(50),
	F_OutboundDate datetime,
	F_Description nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'出库单','SCHEMA',N'dbo','TABLE',N'wform_outboundorder';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'客户名称','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_CustomerName';
EXEC sp_addextendedproperty 'MS_Description',N'仓库','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_Warehouse';
EXEC sp_addextendedproperty 'MS_Description',N'仓库人','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_OutStorage';
EXEC sp_addextendedproperty 'MS_Description',N'业务人员','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_BusinessPeople';
EXEC sp_addextendedproperty 'MS_Description',N'业务类型','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_BusinessType';
EXEC sp_addextendedproperty 'MS_Description',N'出库日期','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_OutboundDate';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_outboundorder','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_outboundorderentry
-- ----------------------------
CREATE TABLE wform_outboundorderentry(
	F_Id nvarchar(50) NOT NULL,
	F_OutboundId nvarchar(50),
	F_GoodsName nvarchar(50),
	F_Specifications nvarchar(50),
	F_Unit nvarchar(50),
	F_Qty nvarchar(50),
	F_Price decimal(18,2),
	F_Amount decimal(18,2),
	F_Description nvarchar(max),
	F_SortCode bigint,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'出库单明细','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'出库单号','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry','COLUMN',N'F_OutboundId';
EXEC sp_addextendedproperty 'MS_Description',N'商品名称','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry','COLUMN',N'F_GoodsName';
EXEC sp_addextendedproperty 'MS_Description',N'规格型号','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry','COLUMN',N'F_Specifications';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry','COLUMN',N'F_Unit';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry','COLUMN',N'F_Qty';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry','COLUMN',N'F_Price';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry','COLUMN',N'F_Amount';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'排序码','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_outboundorderentry','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：wform_outgoingapply
-- ----------------------------
CREATE TABLE wform_outgoingapply(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_Department nvarchar(255),
	F_ApplyDate datetime,
	F_OutgoingTotle nvarchar(50),
	F_StartTime datetime,
	F_EndTime datetime,
	F_Destination nvarchar(50),
	F_FileJson nvarchar(max),
	F_OutgoingCause nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'外出申请单','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'所在部门','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_Department';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'外出总计','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_OutgoingTotle';
EXEC sp_addextendedproperty 'MS_Description',N'开始时间','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_StartTime';
EXEC sp_addextendedproperty 'MS_Description',N'结束时间','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_EndTime';
EXEC sp_addextendedproperty 'MS_Description',N'目的地','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_Destination';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'外出事由','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'F_OutgoingCause';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_outgoingapply','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_paydistribution
-- ----------------------------
CREATE TABLE wform_paydistribution(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_Month nvarchar(50),
	F_IssuingUnit nvarchar(50),
	F_Department nvarchar(255),
	F_Position nvarchar(50),
	F_BaseSalary decimal(18,2),
	F_ActualAttendance nvarchar(50),
	F_Allowance decimal(18,2),
	F_IncomeTax decimal(18,2),
	F_Insurance decimal(18,2),
	F_Performance decimal(18,2),
	F_OvertimePay decimal(18,2),
	F_GrossPay decimal(18,2),
	F_Payroll decimal(18,2),
	F_Description nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'薪酬发放','SCHEMA',N'dbo','TABLE',N'wform_paydistribution';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'所属月份','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_Month';
EXEC sp_addextendedproperty 'MS_Description',N'发放单位','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_IssuingUnit';
EXEC sp_addextendedproperty 'MS_Description',N'员工部门','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_Department';
EXEC sp_addextendedproperty 'MS_Description',N'员工职位','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_Position';
EXEC sp_addextendedproperty 'MS_Description',N'基本薪资','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_BaseSalary';
EXEC sp_addextendedproperty 'MS_Description',N'出勤天数','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_ActualAttendance';
EXEC sp_addextendedproperty 'MS_Description',N'员工津贴','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_Allowance';
EXEC sp_addextendedproperty 'MS_Description',N'所得税','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_IncomeTax';
EXEC sp_addextendedproperty 'MS_Description',N'员工保险','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_Insurance';
EXEC sp_addextendedproperty 'MS_Description',N'员工绩效','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_Performance';
EXEC sp_addextendedproperty 'MS_Description',N'加班费用','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_OvertimePay';
EXEC sp_addextendedproperty 'MS_Description',N'应发工资','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_GrossPay';
EXEC sp_addextendedproperty 'MS_Description',N'实发工资','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_Payroll';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_paydistribution','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_paymentapply
-- ----------------------------
CREATE TABLE wform_paymentapply(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_Departmental nvarchar(255),
	F_PurposeName nvarchar(50),
	F_ProjectCategory nvarchar(50),
	F_ProjectLeader nvarchar(50),
	F_OpeningBank nvarchar(50),
	F_BeneficiaryAccount nvarchar(50),
	F_ReceivableContact nvarchar(50),
	F_PaymentUnit nvarchar(50),
	F_ApplyAmount decimal(18,2),
	F_SettlementMethod nvarchar(50),
	F_PaymentType nvarchar(50),
	F_AmountPaid decimal(18,2),
	F_Description nvarchar(max),
	F_ApplyDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'付款申请单','SCHEMA',N'dbo','TABLE',N'wform_paymentapply';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'申请部门','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_Departmental';
EXEC sp_addextendedproperty 'MS_Description',N'用途名称','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_PurposeName';
EXEC sp_addextendedproperty 'MS_Description',N'项目类别','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_ProjectCategory';
EXEC sp_addextendedproperty 'MS_Description',N'项目负责人','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_ProjectLeader';
EXEC sp_addextendedproperty 'MS_Description',N'开户银行','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_OpeningBank';
EXEC sp_addextendedproperty 'MS_Description',N'收款账号','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_BeneficiaryAccount';
EXEC sp_addextendedproperty 'MS_Description',N'联系方式','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_ReceivableContact';
EXEC sp_addextendedproperty 'MS_Description',N'付款单位','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_PaymentUnit';
EXEC sp_addextendedproperty 'MS_Description',N'申请金额','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_ApplyAmount';
EXEC sp_addextendedproperty 'MS_Description',N'结算方式','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_SettlementMethod';
EXEC sp_addextendedproperty 'MS_Description',N'付款类型','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_PaymentType';
EXEC sp_addextendedproperty 'MS_Description',N'付款金额','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_AmountPaid';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_paymentapply','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_postbatchtab
-- ----------------------------
CREATE TABLE wform_postbatchtab(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_FileTitle nvarchar(50),
	F_DraftedPerson nvarchar(50),
	F_SendUnit nvarchar(50),
	F_WritingNum nvarchar(50),
	F_WritingDate datetime,
	F_ShareNum nvarchar(50),
	F_FileJson nvarchar(max),
	F_Description nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'发文呈批表','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'文件标题','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_FileTitle';
EXEC sp_addextendedproperty 'MS_Description',N'主办单位','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_DraftedPerson';
EXEC sp_addextendedproperty 'MS_Description',N'发往单位','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_SendUnit';
EXEC sp_addextendedproperty 'MS_Description',N'发文编号','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_WritingNum';
EXEC sp_addextendedproperty 'MS_Description',N'发文日期','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_WritingDate';
EXEC sp_addextendedproperty 'MS_Description',N'份数','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_ShareNum';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_postbatchtab','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_procurementmaterial
-- ----------------------------
CREATE TABLE wform_procurementmaterial(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_Departmental nvarchar(255),
	F_ApplyDate datetime,
	F_PurchaseUnit nvarchar(50),
	F_DeliveryMode nvarchar(50),
	F_DeliveryAddress nvarchar(50),
	F_PaymentMethod nvarchar(50),
	F_PaymentMoney decimal(18,2),
	F_FileJson nvarchar(max),
	F_Reason nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'采购原材料','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'申请部门','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_Departmental';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'采购单位','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_PurchaseUnit';
EXEC sp_addextendedproperty 'MS_Description',N'送货方式','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_DeliveryMode';
EXEC sp_addextendedproperty 'MS_Description',N'送货地址','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_DeliveryAddress';
EXEC sp_addextendedproperty 'MS_Description',N'付款方式','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_PaymentMethod';
EXEC sp_addextendedproperty 'MS_Description',N'付款金额','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_PaymentMoney';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'用途原因','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'F_Reason';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterial','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_procurementmaterialentry
-- ----------------------------
CREATE TABLE wform_procurementmaterialentry(
	F_Id nvarchar(50) NOT NULL,
	F_ProcurementId nvarchar(50),
	F_GoodsName nvarchar(50),
	F_Specifications nvarchar(50),
	F_Unit nvarchar(max),
	F_Qty nvarchar(50),
	F_Price decimal(18,2),
	F_Amount decimal(18,2),
	F_Description nvarchar(max),
	F_SortCode bigint,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'采购明细','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'采购主键','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry','COLUMN',N'F_ProcurementId';
EXEC sp_addextendedproperty 'MS_Description',N'商品名称','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry','COLUMN',N'F_GoodsName';
EXEC sp_addextendedproperty 'MS_Description',N'规格型号','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry','COLUMN',N'F_Specifications';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry','COLUMN',N'F_Unit';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry','COLUMN',N'F_Qty';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry','COLUMN',N'F_Price';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry','COLUMN',N'F_Amount';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'排序码','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_procurementmaterialentry','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：wform_purchaselist
-- ----------------------------
CREATE TABLE wform_purchaselist(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_Departmental nvarchar(255),
	F_VendorName nvarchar(50),
	F_Buyer nvarchar(50),
	F_PurchaseDate datetime,
	F_Warehouse nvarchar(50),
	F_Telephone nvarchar(50),
	F_PaymentMethod nvarchar(50),
	F_PaymentMoney decimal(18,2),
	F_FileJson nvarchar(max),
	F_Reason nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'日常物品采购清单','SCHEMA',N'dbo','TABLE',N'wform_purchaselist';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'所在部门','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_Departmental';
EXEC sp_addextendedproperty 'MS_Description',N'供应商名称','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_VendorName';
EXEC sp_addextendedproperty 'MS_Description',N'采购人员','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_Buyer';
EXEC sp_addextendedproperty 'MS_Description',N'采购日期','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_PurchaseDate';
EXEC sp_addextendedproperty 'MS_Description',N'仓库','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_Warehouse';
EXEC sp_addextendedproperty 'MS_Description',N'联系方式','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_Telephone';
EXEC sp_addextendedproperty 'MS_Description',N'支付方式','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_PaymentMethod';
EXEC sp_addextendedproperty 'MS_Description',N'支付总额','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_PaymentMoney';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'用途原因','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'F_Reason';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_purchaselist','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_purchaselistentry
-- ----------------------------
CREATE TABLE wform_purchaselistentry(
	F_Id nvarchar(50) NOT NULL,
	F_PurchaseId nvarchar(50),
	F_GoodsName nvarchar(50),
	F_Specifications nvarchar(50),
	F_Unit nvarchar(50),
	F_Qty nvarchar(50),
	F_Price decimal(18,2),
	F_Amount decimal(18,2),
	F_Description nvarchar(max),
	F_SortCode bigint,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'日常物品采购清单','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'采购主键','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry','COLUMN',N'F_PurchaseId';
EXEC sp_addextendedproperty 'MS_Description',N'商品名称','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry','COLUMN',N'F_GoodsName';
EXEC sp_addextendedproperty 'MS_Description',N'规格型号','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry','COLUMN',N'F_Specifications';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry','COLUMN',N'F_Unit';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry','COLUMN',N'F_Qty';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry','COLUMN',N'F_Price';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry','COLUMN',N'F_Amount';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'排序码','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_purchaselistentry','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：wform_quotationapproval
-- ----------------------------
CREATE TABLE wform_quotationapproval(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_Writer nvarchar(50),
	F_WriteDate datetime,
	F_CustomerName nvarchar(50),
	F_QuotationType nvarchar(50),
	F_PartnerName nvarchar(50),
	F_StandardFile nvarchar(50),
	F_CustSituation nvarchar(max),
	F_FileJson nvarchar(max),
	F_type nvarchar(255),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'报价审批表','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'流程等级','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'填报人','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_Writer';
EXEC sp_addextendedproperty 'MS_Description',N'填表日期','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_WriteDate';
EXEC sp_addextendedproperty 'MS_Description',N'客户名称','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_CustomerName';
EXEC sp_addextendedproperty 'MS_Description',N'类型','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_QuotationType';
EXEC sp_addextendedproperty 'MS_Description',N'合作人名','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_PartnerName';
EXEC sp_addextendedproperty 'MS_Description',N'模板参考','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_StandardFile';
EXEC sp_addextendedproperty 'MS_Description',N'情况描述','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_CustSituation';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'报价类型','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'F_type';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_quotationapproval','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_receiptprocessing
-- ----------------------------
CREATE TABLE wform_receiptprocessing(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_FileTitle nvarchar(50),
	F_CommunicationUnit nvarchar(50),
	F_LetterNum nvarchar(50),
	F_ReceiptDate datetime,
	F_FileJson nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'收文处理表','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'文件标题','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'F_FileTitle';
EXEC sp_addextendedproperty 'MS_Description',N'来文单位','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'F_CommunicationUnit';
EXEC sp_addextendedproperty 'MS_Description',N'来文字号','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'F_LetterNum';
EXEC sp_addextendedproperty 'MS_Description',N'收文日期','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'F_ReceiptDate';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_receiptprocessing','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_receiptsign
-- ----------------------------
CREATE TABLE wform_receiptsign(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ReceiptTitle nvarchar(50),
	F_Department nvarchar(255),
	F_Collector nvarchar(50),
	F_FileJson nvarchar(max),
	F_ReceiptPaper nvarchar(max),
	F_ReceiptDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'收文签呈单','SCHEMA',N'dbo','TABLE',N'wform_receiptsign';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'收文标题','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'F_ReceiptTitle';
EXEC sp_addextendedproperty 'MS_Description',N'收文部门','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'F_Department';
EXEC sp_addextendedproperty 'MS_Description',N'收文人','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'F_Collector';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'收文简述','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'F_ReceiptPaper';
EXEC sp_addextendedproperty 'MS_Description',N'收文日期','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'F_ReceiptDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_receiptsign','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_rewardpunishment
-- ----------------------------
CREATE TABLE wform_rewardpunishment(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_FullName nvarchar(50),
	F_FillFromDate datetime,
	F_Department nvarchar(255),
	F_Position nvarchar(50),
	F_RewardPun decimal(18,2),
	F_Reason nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'行政赏罚单','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'员工姓名','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'F_FullName';
EXEC sp_addextendedproperty 'MS_Description',N'填表日期','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'F_FillFromDate';
EXEC sp_addextendedproperty 'MS_Description',N'员工部门','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'F_Department';
EXEC sp_addextendedproperty 'MS_Description',N'员工职位','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'F_Position';
EXEC sp_addextendedproperty 'MS_Description',N'赏罚金额','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'F_RewardPun';
EXEC sp_addextendedproperty 'MS_Description',N'赏罚原因','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'F_Reason';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_rewardpunishment','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_salesorder
-- ----------------------------
CREATE TABLE wform_salesorder(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_Salesman nvarchar(50),
	F_CustomerName nvarchar(50),
	F_Contacts nvarchar(50),
	F_ContactPhone nvarchar(50),
	F_CustomerAddres nvarchar(50),
	F_TicketNum nvarchar(50),
	F_InvoiceType nvarchar(50),
	F_PaymentMethod nvarchar(50),
	F_PaymentMoney decimal(18,2),
	F_SalesDate datetime,
	F_FileJson nvarchar(max),
	F_Description nvarchar(max),
	F_TicketDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'销售订单','SCHEMA',N'dbo','TABLE',N'wform_salesorder';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'流程等级','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'业务人员','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_Salesman';
EXEC sp_addextendedproperty 'MS_Description',N'客户名称','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_CustomerName';
EXEC sp_addextendedproperty 'MS_Description',N'联系人','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_Contacts';
EXEC sp_addextendedproperty 'MS_Description',N'联系电话','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_ContactPhone';
EXEC sp_addextendedproperty 'MS_Description',N'客户地址','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_CustomerAddres';
EXEC sp_addextendedproperty 'MS_Description',N'发票编号','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_TicketNum';
EXEC sp_addextendedproperty 'MS_Description',N'发票类型','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_InvoiceType';
EXEC sp_addextendedproperty 'MS_Description',N'付款方式','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_PaymentMethod';
EXEC sp_addextendedproperty 'MS_Description',N'付款金额','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_PaymentMoney';
EXEC sp_addextendedproperty 'MS_Description',N'销售日期','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_SalesDate';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'描述','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'开票日期','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'F_TicketDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_salesorder','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：wform_salesorderentry
-- ----------------------------
CREATE TABLE wform_salesorderentry(
	F_Id nvarchar(50) NOT NULL,
	F_SalesOrderId nvarchar(50),
	F_GoodsName nvarchar(50),
	F_Specifications nvarchar(50),
	F_Unit nvarchar(max),
	F_Qty nvarchar(50),
	F_Price decimal(18,2),
	F_Amount decimal(18,2),
	F_Description nvarchar(max),
	F_SortCode bigint,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'销售订单明细','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'订单主键','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry','COLUMN',N'F_SalesOrderId';
EXEC sp_addextendedproperty 'MS_Description',N'商品名称','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry','COLUMN',N'F_GoodsName';
EXEC sp_addextendedproperty 'MS_Description',N'规格型号','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry','COLUMN',N'F_Specifications';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry','COLUMN',N'F_Unit';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry','COLUMN',N'F_Qty';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry','COLUMN',N'F_Price';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry','COLUMN',N'F_Amount';
EXEC sp_addextendedproperty 'MS_Description',N'描述','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_salesorderentry','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：wform_salessupport
-- ----------------------------
CREATE TABLE wform_salessupport(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_ApplyDate datetime,
	F_ApplyDept nvarchar(255),
	F_Customer nvarchar(50),
	F_Project nvarchar(50),
	F_PSaleSupInfo nvarchar(50),
	F_StartDate datetime,
	F_EndDate datetime,
	F_PSaleSupDays nvarchar(50),
	F_PSalePreDays nvarchar(50),
	F_ConsulManager nvarchar(50),
	F_PSalSupConsul nvarchar(50),
	F_FileJson nvarchar(max),
	F_SalSupConclu nvarchar(max),
	F_ConsultResult nvarchar(max),
	F_IEvaluation nvarchar(max),
	F_Conclusion nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'销售支持表','SCHEMA',N'dbo','TABLE',N'wform_salessupport';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'申请部门','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_ApplyDept';
EXEC sp_addextendedproperty 'MS_Description',N'相关客户','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_Customer';
EXEC sp_addextendedproperty 'MS_Description',N'相关项目','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_Project';
EXEC sp_addextendedproperty 'MS_Description',N'售前支持','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_PSaleSupInfo';
EXEC sp_addextendedproperty 'MS_Description',N'开始时间','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_StartDate';
EXEC sp_addextendedproperty 'MS_Description',N'结束日期','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_EndDate';
EXEC sp_addextendedproperty 'MS_Description',N'支持天数','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_PSaleSupDays';
EXEC sp_addextendedproperty 'MS_Description',N'准备天数','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_PSalePreDays';
EXEC sp_addextendedproperty 'MS_Description',N'机构咨询','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_ConsulManager';
EXEC sp_addextendedproperty 'MS_Description',N'售前顾问','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_PSalSupConsul';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'销售总结','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_SalSupConclu';
EXEC sp_addextendedproperty 'MS_Description',N'交付说明','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_ConsultResult';
EXEC sp_addextendedproperty 'MS_Description',N'咨询评价','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_IEvaluation';
EXEC sp_addextendedproperty 'MS_Description',N'发起人总结','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'F_Conclusion';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_salessupport','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_staffovertime
-- ----------------------------
CREATE TABLE wform_staffovertime(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_Department nvarchar(255),
	F_ApplyDate datetime,
	F_TotleTime nvarchar(50),
	F_StartTime datetime,
	F_EndTime datetime,
	F_Category nvarchar(50),
	F_Cause nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'员工加班申请表','SCHEMA',N'dbo','TABLE',N'wform_staffovertime';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'申请部门','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_Department';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'总计时间','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_TotleTime';
EXEC sp_addextendedproperty 'MS_Description',N'开始时间','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_StartTime';
EXEC sp_addextendedproperty 'MS_Description',N'结束时间','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_EndTime';
EXEC sp_addextendedproperty 'MS_Description',N'记入类别','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_Category';
EXEC sp_addextendedproperty 'MS_Description',N'加班事由','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'F_Cause';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_staffovertime','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_supplementcard
-- ----------------------------
CREATE TABLE wform_supplementcard(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_FullName nvarchar(50),
	F_Department nvarchar(255),
	F_Position nvarchar(50),
	F_Witness nvarchar(50),
	F_SupplementNum nvarchar(50),
	F_Description nvarchar(max),
	F_ApplyDate datetime,
	F_StartTime datetime,
	F_EndTime datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'补卡申请','SCHEMA',N'dbo','TABLE',N'wform_supplementcard';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'员工姓名','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_FullName';
EXEC sp_addextendedproperty 'MS_Description',N'所在部门','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_Department';
EXEC sp_addextendedproperty 'MS_Description',N'所在职务','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_Position';
EXEC sp_addextendedproperty 'MS_Description',N'证明人','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_Witness';
EXEC sp_addextendedproperty 'MS_Description',N'补卡次数','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_SupplementNum';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'开始时间','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_StartTime';
EXEC sp_addextendedproperty 'MS_Description',N'结束日期','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'F_EndTime';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_supplementcard','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_travelapply
-- ----------------------------
CREATE TABLE wform_travelapply(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_TravelMan nvarchar(50),
	F_ApplyDate datetime,
	F_Departmental nvarchar(255),
	F_Position nvarchar(50),
	F_StartDate datetime,
	F_EndDate datetime,
	F_StartPlace nvarchar(50),
	F_Destination nvarchar(50),
	F_PrepaidTravel decimal(18,2),
	F_Description nvarchar(max),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'出差预支申请单','SCHEMA',N'dbo','TABLE',N'wform_travelapply';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'出差人','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_TravelMan';
EXEC sp_addextendedproperty 'MS_Description',N'申请日期','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'所属部门','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_Departmental';
EXEC sp_addextendedproperty 'MS_Description',N'所属职务','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_Position';
EXEC sp_addextendedproperty 'MS_Description',N'开始日期','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_StartDate';
EXEC sp_addextendedproperty 'MS_Description',N'结束日期','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_EndDate';
EXEC sp_addextendedproperty 'MS_Description',N'起始地点','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_StartPlace';
EXEC sp_addextendedproperty 'MS_Description',N'目的地','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_Destination';
EXEC sp_addextendedproperty 'MS_Description',N'预支旅费','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_PrepaidTravel';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_travelapply','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_travelreimbursement
-- ----------------------------
CREATE TABLE wform_travelreimbursement(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_ApplyUser nvarchar(50),
	F_Departmental nvarchar(255),
	F_BillsNum nvarchar(50),
	F_BusinessMission nvarchar(max),
	F_SetOutDate datetime,
	F_ReturnDate datetime,
	F_Destination nvarchar(50),
	F_PlaneTicket decimal(18,2),
	F_Fare decimal(18,2),
	F_GetAccommodation decimal(18,2),
	F_TravelAllowance decimal(18,2),
	F_Other decimal(18,2),
	F_Total decimal(18,2),
	F_ReimbursementAmount decimal(18,2),
	F_LoanAmount decimal(18,2),
	F_SumOfMoney decimal(18,2),
	F_TravelerUser nvarchar(50),
	F_VehicleMileage decimal(18,2),
	F_RoadFee decimal(18,2),
	F_ParkingRate decimal(18,2),
	F_MealAllowance decimal(18,2),
	F_BreakdownFee decimal(18,2),
	F_ReimbursementId nvarchar(50),
	F_RailTransit decimal(18,2),
	F_ApplyDate datetime,
	f_versions int,
	f_flowtaskid nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'差旅报销申请表','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'流程等级','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'申请人','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_ApplyUser';
EXEC sp_addextendedproperty 'MS_Description',N'申请部门','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_Departmental';
EXEC sp_addextendedproperty 'MS_Description',N'票据数','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_BillsNum';
EXEC sp_addextendedproperty 'MS_Description',N'出差任务','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_BusinessMission';
EXEC sp_addextendedproperty 'MS_Description',N'出发日期','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_SetOutDate';
EXEC sp_addextendedproperty 'MS_Description',N'回归日期','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_ReturnDate';
EXEC sp_addextendedproperty 'MS_Description',N'到达地','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_Destination';
EXEC sp_addextendedproperty 'MS_Description',N'机票费','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_PlaneTicket';
EXEC sp_addextendedproperty 'MS_Description',N'车船费','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_Fare';
EXEC sp_addextendedproperty 'MS_Description',N'住宿费用','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_GetAccommodation';
EXEC sp_addextendedproperty 'MS_Description',N'出差补助','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_TravelAllowance';
EXEC sp_addextendedproperty 'MS_Description',N'其他费用','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_Other';
EXEC sp_addextendedproperty 'MS_Description',N'合计','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_Total';
EXEC sp_addextendedproperty 'MS_Description',N'报销金额','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_ReimbursementAmount';
EXEC sp_addextendedproperty 'MS_Description',N'借款金额','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_LoanAmount';
EXEC sp_addextendedproperty 'MS_Description',N'补找金额','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_SumOfMoney';
EXEC sp_addextendedproperty 'MS_Description',N'','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_TravelerUser';
EXEC sp_addextendedproperty 'MS_Description',N'车辆里程','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_VehicleMileage';
EXEC sp_addextendedproperty 'MS_Description',N'过路费','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_RoadFee';
EXEC sp_addextendedproperty 'MS_Description',N'停车费','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_ParkingRate';
EXEC sp_addextendedproperty 'MS_Description',N'餐补费用','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_MealAllowance';
EXEC sp_addextendedproperty 'MS_Description',N'故障报修费','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_BreakdownFee';
EXEC sp_addextendedproperty 'MS_Description',N'报销编号','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_ReimbursementId';
EXEC sp_addextendedproperty 'MS_Description',N'轨道交通费','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_RailTransit';
EXEC sp_addextendedproperty 'MS_Description',N'申请时间','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'F_ApplyDate';
EXEC sp_addextendedproperty 'MS_Description',N'乐观锁','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'f_versions';
EXEC sp_addextendedproperty 'MS_Description',N'流程任务主键','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'f_flowtaskid';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_travelreimbursement','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_vehicleapply
-- ----------------------------
CREATE TABLE wform_vehicleapply(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_CarMan nvarchar(50),
	F_Department nvarchar(255),
	F_PlateNum nvarchar(50),
	F_Destination nvarchar(50),
	F_RoadFee decimal(18,2),
	F_KilometreNum nvarchar(50),
	F_Entourage nvarchar(50),
	F_Description nvarchar(max),
	F_StartDate datetime,
	F_EndDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'车辆申请','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'用车人','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_CarMan';
EXEC sp_addextendedproperty 'MS_Description',N'所在部门','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_Department';
EXEC sp_addextendedproperty 'MS_Description',N'车牌号','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_PlateNum';
EXEC sp_addextendedproperty 'MS_Description',N'目的地','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_Destination';
EXEC sp_addextendedproperty 'MS_Description',N'路费金额','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_RoadFee';
EXEC sp_addextendedproperty 'MS_Description',N'公里数','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_KilometreNum';
EXEC sp_addextendedproperty 'MS_Description',N'随行人数','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_Entourage';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'开始日期','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_StartDate';
EXEC sp_addextendedproperty 'MS_Description',N'结束日期','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'F_EndDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_vehicleapply','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_violationhandling
-- ----------------------------
CREATE TABLE wform_violationhandling(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_PlateNum nvarchar(50),
	F_Driver nvarchar(50),
	F_LeadingOfficial nvarchar(50),
	F_ViolationSite nvarchar(50),
	F_ViolationBehavior nvarchar(50),
	F_Deduction nvarchar(50),
	F_AmountMoney decimal(18,2),
	F_Description nvarchar(max),
	F_NoticeDate datetime,
	F_PeccancyDate datetime,
	F_LimitDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'违章处理申请表','SCHEMA',N'dbo','TABLE',N'wform_violationhandling';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'车牌号','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_PlateNum';
EXEC sp_addextendedproperty 'MS_Description',N'驾驶人','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_Driver';
EXEC sp_addextendedproperty 'MS_Description',N'负责人','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_LeadingOfficial';
EXEC sp_addextendedproperty 'MS_Description',N'违章地点','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_ViolationSite';
EXEC sp_addextendedproperty 'MS_Description',N'违章行为','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_ViolationBehavior';
EXEC sp_addextendedproperty 'MS_Description',N'违章扣分','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_Deduction';
EXEC sp_addextendedproperty 'MS_Description',N'违章罚款','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_AmountMoney';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'通知日期','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_NoticeDate';
EXEC sp_addextendedproperty 'MS_Description',N'违章日期','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_PeccancyDate';
EXEC sp_addextendedproperty 'MS_Description',N'限处理日期','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'F_LimitDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_violationhandling','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_warehousereceipt
-- ----------------------------
CREATE TABLE wform_warehousereceipt(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_SupplierName nvarchar(50),
	F_ContactPhone nvarchar(50),
	F_WarehousCategory nvarchar(50),
	F_Warehouse nvarchar(50),
	F_WarehousesPeople nvarchar(50),
	F_DeliveryNo nvarchar(50),
	F_WarehouseNo nvarchar(50),
	F_WarehousDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'入库申请单','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'供应商名称','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_SupplierName';
EXEC sp_addextendedproperty 'MS_Description',N'联系电话','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_ContactPhone';
EXEC sp_addextendedproperty 'MS_Description',N'入库类别','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_WarehousCategory';
EXEC sp_addextendedproperty 'MS_Description',N'仓库','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_Warehouse';
EXEC sp_addextendedproperty 'MS_Description',N'入库人','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_WarehousesPeople';
EXEC sp_addextendedproperty 'MS_Description',N'送货单号','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_DeliveryNo';
EXEC sp_addextendedproperty 'MS_Description',N'入库单号','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_WarehouseNo';
EXEC sp_addextendedproperty 'MS_Description',N'入库日期','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'F_WarehousDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_warehousereceipt','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_warehousereceiptentry
-- ----------------------------
CREATE TABLE wform_warehousereceiptentry(
	F_Id nvarchar(50) NOT NULL,
	F_WarehouseId nvarchar(50),
	F_GoodsName nvarchar(50),
	F_Specifications nvarchar(50),
	F_Unit nvarchar(50),
	F_Qty nvarchar(50),
	F_Price decimal(18,2),
	F_Amount decimal(18,2),
	F_Description nvarchar(max),
	F_SortCode bigint,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'出库单明细','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'入库主键','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry','COLUMN',N'F_WarehouseId';
EXEC sp_addextendedproperty 'MS_Description',N'商品名称','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry','COLUMN',N'F_GoodsName';
EXEC sp_addextendedproperty 'MS_Description',N'规格型号','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry','COLUMN',N'F_Specifications';
EXEC sp_addextendedproperty 'MS_Description',N'单位','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry','COLUMN',N'F_Unit';
EXEC sp_addextendedproperty 'MS_Description',N'数量','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry','COLUMN',N'F_Qty';
EXEC sp_addextendedproperty 'MS_Description',N'单价','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry','COLUMN',N'F_Price';
EXEC sp_addextendedproperty 'MS_Description',N'金额','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry','COLUMN',N'F_Amount';
EXEC sp_addextendedproperty 'MS_Description',N'备注','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry','COLUMN',N'F_Description';
EXEC sp_addextendedproperty 'MS_Description',N'排序码','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry','COLUMN',N'F_SortCode';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_warehousereceiptentry','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：wform_workcontactsheet
-- ----------------------------
CREATE TABLE wform_workcontactsheet(
	F_Id nvarchar(50) NOT NULL,
	F_FlowId nvarchar(50),
	F_FlowTitle nvarchar(50),
	F_FlowUrgent int,
	F_BillNo nvarchar(50),
	F_DrawPeople nvarchar(50),
	F_IssuingDepartment nvarchar(255),
	F_ServiceDepartment nvarchar(255),
	F_Recipients nvarchar(50),
	F_Coordination nvarchar(max),
	F_FileJson nvarchar(max),
	F_ToDate datetime,
	F_CollectionDate datetime,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_flow_id nvarchar(50)

, PRIMARY KEY (F_Id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'工作联系单','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_Id';
EXEC sp_addextendedproperty 'MS_Description',N'流程主键','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_FlowId';
EXEC sp_addextendedproperty 'MS_Description',N'流程标题','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_FlowTitle';
EXEC sp_addextendedproperty 'MS_Description',N'紧急程度','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_FlowUrgent';
EXEC sp_addextendedproperty 'MS_Description',N'流程单据','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_BillNo';
EXEC sp_addextendedproperty 'MS_Description',N'发件人','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_DrawPeople';
EXEC sp_addextendedproperty 'MS_Description',N'发件部门','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_IssuingDepartment';
EXEC sp_addextendedproperty 'MS_Description',N'收件部门','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_ServiceDepartment';
EXEC sp_addextendedproperty 'MS_Description',N'收件人','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_Recipients';
EXEC sp_addextendedproperty 'MS_Description',N'协调事项','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_Coordination';
EXEC sp_addextendedproperty 'MS_Description',N'相关附件','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_FileJson';
EXEC sp_addextendedproperty 'MS_Description',N'发件日期','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_ToDate';
EXEC sp_addextendedproperty 'MS_Description',N'收件日期','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'F_CollectionDate';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'wform_workcontactsheet','COLUMN',N'f_flow_id';
-- ----------------------------
-- 表名：wform_zjf_wikxqi
-- ----------------------------
CREATE TABLE wform_zjf_wikxqi(
	userSelectField101 nvarchar(255),
	f_id nvarchar(50) NOT NULL,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'主表','SCHEMA',N'dbo','TABLE',N'wform_zjf_wikxqi';
EXEC sp_addextendedproperty 'MS_Description',N'用户选择','SCHEMA',N'dbo','TABLE',N'wform_zjf_wikxqi','COLUMN',N'userSelectField101';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'wform_zjf_wikxqi','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'wform_zjf_wikxqi','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：workflow_candidates
-- ----------------------------
CREATE TABLE workflow_candidates(
	f_id nvarchar(50) NOT NULL,
	f_node_code nvarchar(50),
	f_task_id nvarchar(50),
	f_handle_id nvarchar(50),
	f_account nvarchar(50),
	f_candidates nvarchar(max),
	f_operator_id nvarchar(50),
	f_type int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'流程抄送','SCHEMA',N'dbo','TABLE',N'workflow_circulate';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'抄送人员','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'任务主键','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'节点编号','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_node_code';
EXEC sp_addextendedproperty 'MS_Description',N'节点名称','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_node_name';
EXEC sp_addextendedproperty 'MS_Description',N'节点主键','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_node_id';
EXEC sp_addextendedproperty 'MS_Description',N'经办主键','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_operator_id';
EXEC sp_addextendedproperty 'MS_Description',N'是否已读','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_read';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'workflow_circulate','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：workflow_comment
-- ----------------------------
CREATE TABLE workflow_comment(
	f_id nvarchar(50) NOT NULL,
	f_task_id nvarchar(50),
	f_reply_id nvarchar(50),
	f_text nvarchar(max),
	f_image nvarchar(max),
	f_file nvarchar(max),
	f_delete_show int,
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_mark int,
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'常用流程','SCHEMA',N'dbo','TABLE',N'workflow_common';
EXEC sp_addextendedproperty 'MS_Description',N'自然主键','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'类型 web、app','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_type';
EXEC sp_addextendedproperty 'MS_Description',N'流程版本id','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'workflow_common','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：workflow_delegate
-- ----------------------------
CREATE TABLE workflow_delegate(
	f_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(4000),
	f_flow_name nvarchar(4000),
	f_start_time datetime,
	f_end_time datetime,
	f_user_id nvarchar(50),
	f_user_name nvarchar(50),
	f_type int,
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'流程表单关联表','SCHEMA',N'dbo','TABLE',N'workflow_form_relation';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程id','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'表单id','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_form_id';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'workflow_form_relation','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：workflow_launch_user
-- ----------------------------
CREATE TABLE workflow_launch_user(
	f_id nvarchar(50) NOT NULL,
	f_organize_id nvarchar(max),
	f_position_id nvarchar(max),
	f_manager_id nvarchar(50),
	f_superior nvarchar(50),
	f_subordinate nvarchar(max),
	f_task_id nvarchar(50),
	f_department nvarchar(max),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0'

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'流程节点','SCHEMA',N'dbo','TABLE',N'workflow_node';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'流程版本主键','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_flow_id';
EXEC sp_addextendedproperty 'MS_Description',N'表单主键','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_form_id';
EXEC sp_addextendedproperty 'MS_Description',N'节点类型','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_node_type';
EXEC sp_addextendedproperty 'MS_Description',N'节点编码','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_node_code';
EXEC sp_addextendedproperty 'MS_Description',N'节点属性','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_node_json';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'workflow_node','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：workflow_node_record
-- ----------------------------
CREATE TABLE workflow_node_record(
	f_id nvarchar(50) NOT NULL,
	f_task_id nvarchar(50),
	f_node_id nvarchar(50),
	f_node_code nvarchar(50),
	f_node_name nvarchar(50),
	f_node_status int,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_sort_code bigint

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'节点流转','SCHEMA',N'dbo','TABLE',N'workflow_node_record';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'任务id','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'节点id','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_node_id';
EXEC sp_addextendedproperty 'MS_Description',N'节点编码','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_node_code';
EXEC sp_addextendedproperty 'MS_Description',N'节点名称','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_node_name';
EXEC sp_addextendedproperty 'MS_Description',N'节点状态','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_node_status';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_tenant_id';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'workflow_node_record','COLUMN',N'f_sort_code';
-- ----------------------------
-- 表名：workflow_operator
-- ----------------------------
CREATE TABLE workflow_operator(
	f_id nvarchar(50) NOT NULL,
	f_node_name nvarchar(50),
	f_node_code nvarchar(50),
	f_task_id nvarchar(50),
	f_node_id nvarchar(50),
	f_parent_id nvarchar(50),
	f_handle_time datetime,
	f_handle_id nvarchar(50),
	f_handle_all nvarchar(max),
	f_handle_status int,
	f_handle_parameter nvarchar(max),
	f_start_handle_time datetime,
	f_duedate datetime,
	f_sign_time datetime,
	f_status int,
	f_instance_id nvarchar(50),
	f_engine_type int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_draft_data nvarchar(max),
	f_completion int,
	f_is_processing int

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'冻结审批','SCHEMA',N'dbo','TABLE',N'workflow_reject_data';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'任务json','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_task_json';
EXEC sp_addextendedproperty 'MS_Description',N'经办json','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_operator_json';
EXEC sp_addextendedproperty 'MS_Description',N'节点编码','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_node_code';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'workflow_reject_data','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：workflow_revoke
-- ----------------------------
CREATE TABLE workflow_revoke(
	f_id nvarchar(50) NOT NULL,
	f_task_id nvarchar(50),
	f_revoke_task_id nvarchar(50),
	f_form_data nvarchar(max),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'流程撤销','SCHEMA',N'dbo','TABLE',N'workflow_revoke';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'任务主键','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'撤销任务主键','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_revoke_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'表单数据','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_form_data';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'workflow_revoke','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：workflow_subtask_data
-- ----------------------------
CREATE TABLE workflow_subtask_data(
	f_id nvarchar(50) NOT NULL,
	f_subtask_json nvarchar(max),
	f_parent_id nvarchar(50),
	f_node_code nvarchar(50),
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL

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

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

, PRIMARY KEY (f_id,f_tenant_id)
);
EXEC sp_addextendedproperty 'MS_Description',N'任务条件','SCHEMA',N'dbo','TABLE',N'workflow_task_line';
EXEC sp_addextendedproperty 'MS_Description',N'主键','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_id';
EXEC sp_addextendedproperty 'MS_Description',N'任务主键','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_task_id';
EXEC sp_addextendedproperty 'MS_Description',N'线的键','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_line_key';
EXEC sp_addextendedproperty 'MS_Description',N'线的值','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_line_value';
EXEC sp_addextendedproperty 'MS_Description',N'排序','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_sort_code';
EXEC sp_addextendedproperty 'MS_Description',N'创建时间','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_creator_time';
EXEC sp_addextendedproperty 'MS_Description',N'创建用户','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_creator_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'修改时间','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_last_modify_time';
EXEC sp_addextendedproperty 'MS_Description',N'修改用户','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_last_modify_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除时间','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_delete_time';
EXEC sp_addextendedproperty 'MS_Description',N'删除用户','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_delete_user_id';
EXEC sp_addextendedproperty 'MS_Description',N'删除标志','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_delete_mark';
EXEC sp_addextendedproperty 'MS_Description',N'租户id','SCHEMA',N'dbo','TABLE',N'workflow_task_line','COLUMN',N'f_tenant_id';
-- ----------------------------
-- 表名：workflow_template
-- ----------------------------
CREATE TABLE workflow_template(
	f_id nvarchar(50) NOT NULL,
	f_flow_id nvarchar(50),
	f_version nvarchar(50),
	f_en_code nvarchar(200),
	f_full_name nvarchar(200),
	f_type int,
	f_category nvarchar(50),
	f_icon nvarchar(50),
	f_icon_background nvarchar(50),
	f_configuration nvarchar(max),
	f_activiti_id nvarchar(50),
	f_flowable_id nvarchar(50),
	f_camunda_id nvarchar(50),
	f_description nvarchar(500),
	f_enabled_mark int,
	f_sort_code bigint,
	f_creator_time datetime,
	f_creator_user_id nvarchar(50),
	f_last_modify_time datetime,
	f_last_modify_user_id nvarchar(50),
	f_delete_time datetime,
	f_delete_user_id nvarchar(50),
	f_delete_mark int,
	f_tenant_id nvarchar(50) NOT NULL DEFAULT '0',
	f_visible_type int,
	f_flow_config nvarchar(max),
	f_show_type int,
	f_status int

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

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

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

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


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