/*
 Navicat Premium Data Transfer

 Source Server         : sql server
 Source Server Type    : SQL Server
 Source Server Version : 16001000
 Source Host           : localhost:1433
 Source Catalog        : zkqy-call
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 16001000
 File Encoding         : 65001

 Date: 15/09/2023 11:58:08
*/


-- ----------------------------
-- Table structure for drag_form
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[drag_form]') AND type IN ('U'))
DROP TABLE [dbo].[drag_form]
    ---

CREATE TABLE [dbo].[drag_form] (
    [f_id] bigint  IDENTITY(1,1) NOT NULL,
    [sql_key] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [df_name] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [df_nickname] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [df_vue_template] text COLLATE Chinese_PRC_CI_AS  NULL,
    [df_html_template] text COLLATE Chinese_PRC_CI_AS  NULL,
    [df_form_sql] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [df_node_id] bigint  NULL,
    [df_database] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [df_table_name] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [df_flie_path] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [df_notes] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [del_flag] char(1) COLLATE Chinese_PRC_CI_AS  NULL,
    [create_time] datetime  NULL,
    [create_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [update_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [update_time] datetime  NULL,
    [spare] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [spare1] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
    )
    ---

ALTER TABLE [dbo].[drag_form] SET (LOCK_ESCALATION = TABLE)
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表单主键',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'f_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'sql编号',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'sql_key'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表单名称
',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'df_name'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表单别名
',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'df_nickname'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表单vue模版',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'df_vue_template'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表单html模版',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'df_html_template'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表单sql',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'df_form_sql'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'节点ID',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'df_node_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'数据源名称
',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'df_database'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'绑定表名称',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'df_table_name'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'源文件存放地址',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'df_flie_path'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表单描述',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'df_notes'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'逻辑删除',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'del_flag'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建时间',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'create_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建人ID',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'create_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'更新者ID',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'update_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'更新时间',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'update_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'备用列',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'spare'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'备用列',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form',
    'COLUMN', N'spare1'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'动态表单',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_form'
    ---


    -- ----------------------------
-- Table structure for drag_table
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[drag_table]') AND type IN ('U'))
DROP TABLE [dbo].[drag_table]
    ---

CREATE TABLE [dbo].[drag_table] (
    [t_id] bigint  IDENTITY(1,1) NOT NULL,
    [dt_name] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [dt_nickname] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [table_key] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [sql_key] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [dt_table_name] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [dt_notes] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [dt_column_name] text COLLATE Chinese_PRC_CI_AS  NULL,
    [time_format] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [spare] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [spare1] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [del_flag] char(1) COLLATE Chinese_PRC_CI_AS  NULL,
    [create_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [create_time] datetime  NULL,
    [update_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [update_time] datetime  NULL,
    [is_selection] char(1) COLLATE Chinese_PRC_CI_AS  NULL,
    [echo_data] text COLLATE Chinese_PRC_CI_AS  NULL,
    [menu_id] bigint  NULL,
    [primary_key] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
    )
    ---

ALTER TABLE [dbo].[drag_table] SET (LOCK_ESCALATION = TABLE)
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表格主键',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N't_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表格名称(中文)',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'dt_name'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表格别名',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'dt_nickname'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'table编号(路由)',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'table_key'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'sql编号',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'sql_key'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'绑定表名称',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'dt_table_name'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表格描述',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'dt_notes'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'列字段以及标题名称',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'dt_column_name'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'时间格式',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'time_format'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'备用列',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'spare'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'备用列',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'spare1'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'逻辑删除',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'del_flag'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建人',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'create_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建时间',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'create_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'修改人',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'update_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'修改时间',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'update_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'是否显示列表复选框(0:显示；1;不显示)',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'is_selection'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'回显数据（前端回显数据使用）',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'echo_data'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'菜单编号',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'menu_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'当前表单的唯一标识，用来修改删除使用',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table',
    'COLUMN', N'primary_key'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'动态表格',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table'
    ---


    -- ----------------------------
-- Table structure for drag_table_condition
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[drag_table_condition]') AND type IN ('U'))
DROP TABLE [dbo].[drag_table_condition]
    ---

CREATE TABLE [dbo].[drag_table_condition] (
    [tc_id] bigint  IDENTITY(1,1) NOT NULL,
    [t_id] bigint  NULL,
    [condition_name] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [condition_field] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [condition_notes] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [condition_type] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [condition_default_value] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [sort] int  NULL,
    [condition_table_name] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [condition_table_field_name] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [condition_table_field_key] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [condition_datasource] char(1) COLLATE Chinese_PRC_CI_AS  NULL,
    [component_type] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [component_size] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [component_icon] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [is_hidden] char(1) COLLATE Chinese_PRC_CI_AS  NULL,
    [del_flag] char(1) COLLATE Chinese_PRC_CI_AS  NULL,
    [create_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [create_time] datetime  NULL,
    [update_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [update_time] datetime  NULL
    )
    ---

ALTER TABLE [dbo].[drag_table_condition] SET (LOCK_ESCALATION = TABLE)
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'编号',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'tc_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'动态表格编号',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N't_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'条件名称',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'condition_name'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'条件字段',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'condition_field'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'条件描述',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'condition_notes'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'条件类型',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'condition_type'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'默认值',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'condition_default_value'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'排序',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'sort'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表名称（下拉框关联）/ 字典类型',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'condition_table_name'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表字段名称（下拉框关联）',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'condition_table_field_name'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表字段key（下拉框关联）唯一标识',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'condition_table_field_key'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'数据来源（0：字典；1：表字段）',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'condition_datasource'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'组件类型（时间组件、btn等type类型参照element官方api中的类型 ）
 ',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'component_type'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'组件大小',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'component_size'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'组件图标',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'component_icon'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'是否隐藏(0 显示; 1 隐藏)',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'is_hidden'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'逻辑删除(0 否; 1 是)',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'del_flag'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建人',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'create_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建时间',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'create_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'修改人',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'update_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'修改时间',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition',
    'COLUMN', N'update_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'动态表格条件',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_condition'
    ---


    -- ----------------------------
-- Table structure for drag_table_form
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[drag_table_form]') AND type IN ('U'))
DROP TABLE [dbo].[drag_table_form]
    ---

CREATE TABLE [dbo].[drag_table_form] (
    [id] bigint  IDENTITY(1,1) NOT NULL,
    [dt_id] bigint  NULL,
    [df_id] bigint  NULL
    )
    ---

ALTER TABLE [dbo].[drag_table_form] SET (LOCK_ESCALATION = TABLE)
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'编号',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_form',
    'COLUMN', N'id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'动态表格id',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_form',
    'COLUMN', N'dt_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'动态表单id',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_form',
    'COLUMN', N'df_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'动态表格表单关联表',
    'SCHEMA', N'dbo',
    'TABLE', N'drag_table_form'
    ---


    -- ----------------------------
-- Table structure for m_f
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[m_f]') AND type IN ('U'))
DROP TABLE [dbo].[m_f]
    ---

CREATE TABLE [dbo].[m_f] (
    [m_f_id] int  NULL,
    [f_id] bigint  NULL,
    [m_id] bigint  NULL,
    [del_flag] char(1) COLLATE Chinese_PRC_CI_AS  NULL
    )
    ---

ALTER TABLE [dbo].[m_f] SET (LOCK_ESCALATION = TABLE)
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'主键',
    'SCHEMA', N'dbo',
    'TABLE', N'm_f',
    'COLUMN', N'm_f_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'动态表单主键',
    'SCHEMA', N'dbo',
    'TABLE', N'm_f',
    'COLUMN', N'f_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'流程节点id',
    'SCHEMA', N'dbo',
    'TABLE', N'm_f',
    'COLUMN', N'm_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'逻辑删除
',
    'SCHEMA', N'dbo',
    'TABLE', N'm_f',
    'COLUMN', N'del_flag'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'动态表单以及流程 关系表',
    'SCHEMA', N'dbo',
    'TABLE', N'm_f'
    ---


    -- ----------------------------
-- Table structure for sys_dict_data
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[sys_dict_data]') AND type IN ('U'))
DROP TABLE [dbo].[sys_dict_data]
    ---

CREATE TABLE [dbo].[sys_dict_data] (
    [dict_code] bigint  IDENTITY(1,1) NOT NULL,
    [dict_sort] int  NULL,
    [dict_label] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [dict_value] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [dict_type] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [css_class] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [list_class] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [is_default] char(1) COLLATE Chinese_PRC_CI_AS  NULL,
    [status] char(1) COLLATE Chinese_PRC_CI_AS  NULL,
    [create_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [create_time] datetime  NULL,
    [update_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [update_time] datetime  NULL,
    [remark] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
    )
    ---

ALTER TABLE [dbo].[sys_dict_data] SET (LOCK_ESCALATION = TABLE)
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'字典编码',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'dict_code'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'字典排序',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'dict_sort'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'字典标签',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'dict_label'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'字典键值',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'dict_value'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'字典类型',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'dict_type'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'样式属性（其他样式扩展）',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'css_class'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表格回显样式',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'list_class'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'是否默认（Y是 N否）',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'is_default'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'状态（0正常 1停用）',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'status'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建者',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'create_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建时间',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'create_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'更新者',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'update_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'更新时间',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'update_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'备注',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data',
    'COLUMN', N'remark'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'字典数据表',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_data'
    ---


    -- ----------------------------
-- Table structure for sys_dict_type
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[sys_dict_type]') AND type IN ('U'))
DROP TABLE [dbo].[sys_dict_type]
    ---

CREATE TABLE [dbo].[sys_dict_type] (
    [dict_id] bigint  IDENTITY(1,1) NOT NULL,
    [dict_name] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [dict_type] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [status] char(1) COLLATE Chinese_PRC_CI_AS  NULL,
    [create_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [create_time] datetime  NULL,
    [update_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [update_time] datetime  NULL,
    [remark] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
    )
    ---

ALTER TABLE [dbo].[sys_dict_type] SET (LOCK_ESCALATION = TABLE)
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'字典主键',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_type',
    'COLUMN', N'dict_id'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'字典名称',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_type',
    'COLUMN', N'dict_name'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'字典类型',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_type',
    'COLUMN', N'dict_type'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'状态（0正常 1停用）',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_type',
    'COLUMN', N'status'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建者',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_type',
    'COLUMN', N'create_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建时间',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_type',
    'COLUMN', N'create_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'更新者',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_type',
    'COLUMN', N'update_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'更新时间',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_type',
    'COLUMN', N'update_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'备注',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_type',
    'COLUMN', N'remark'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'字典类型表',
    'SCHEMA', N'dbo',
    'TABLE', N'sys_dict_type'
    ---


    -- ----------------------------
-- Table structure for table_sql
-- ----------------------------
    IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[table_sql]') AND type IN ('U'))
DROP TABLE [dbo].[table_sql]
    ---

CREATE TABLE [dbo].[table_sql] (
    [t_id] bigint  IDENTITY(1,1) NOT NULL,
    [table_sql] text COLLATE Chinese_PRC_CI_AS  NULL,
    [table_condition] text COLLATE Chinese_PRC_CI_AS  NULL,
    [table_alias] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [sql_key] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [table_export_field] text COLLATE Chinese_PRC_CI_AS  NULL,
    [create_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [create_time] datetime  NULL,
    [update_by] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [update_time] datetime  NULL,
    [del_flag] char(1) COLLATE Chinese_PRC_CI_AS  NULL,
    [is_asc] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
    [order_by_column] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
    )
    ---

ALTER TABLE [dbo].[table_sql] SET (LOCK_ESCALATION = TABLE)
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表查询语句
',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'table_sql'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表查询字段',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'table_condition'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'表别名',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'table_alias'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'sql编号，绑定tableList',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'sql_key'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'导出字段名称以及列名',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'table_export_field'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建人',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'create_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'创建时间',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'create_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'更新人',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'update_by'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'更新时间',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'update_time'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'逻辑删除',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'del_flag'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'排序规则（0：true 1:false）',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'is_asc'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'排序字段',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql',
    'COLUMN', N'order_by_column'
    ---

    EXEC sp_addextendedproperty
    'MS_Description', N'table 联合查询sql储存表',
    'SCHEMA', N'dbo',
    'TABLE', N'table_sql'
    ---


    -- ----------------------------
-- Auto increment value for drag_form
-- ----------------------------
    DBCC CHECKIDENT ('[dbo].[drag_form]', RESEED, 1)
    ---


-- ----------------------------
-- Primary Key structure for table drag_form
-- ----------------------------
ALTER TABLE [dbo].[drag_form] ADD CONSTRAINT [PK__drag_for__2911CBED8F1B9207] PRIMARY KEY CLUSTERED ([f_id])
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
    ON [PRIMARY]
    ---


    -- ----------------------------
-- Auto increment value for drag_table
-- ----------------------------
    DBCC CHECKIDENT ('[dbo].[drag_table]', RESEED, 1)
    ---


-- ----------------------------
-- Primary Key structure for table drag_table
-- ----------------------------
ALTER TABLE [dbo].[drag_table] ADD CONSTRAINT [PK__drag_tab__E579775FCBEDF40C] PRIMARY KEY CLUSTERED ([t_id])
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
    ON [PRIMARY]
    ---


    -- ----------------------------
-- Auto increment value for drag_table_condition
-- ----------------------------
    DBCC CHECKIDENT ('[dbo].[drag_table_condition]', RESEED, 1)
    ---


-- ----------------------------
-- Primary Key structure for table drag_table_condition
-- ----------------------------
ALTER TABLE [dbo].[drag_table_condition] ADD CONSTRAINT [PK__drag_tab__E61FEFB0A11CA594] PRIMARY KEY CLUSTERED ([tc_id])
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
    ON [PRIMARY]
    ---


    -- ----------------------------
-- Auto increment value for drag_table_form
-- ----------------------------
    DBCC CHECKIDENT ('[dbo].[drag_table_form]', RESEED, 1)
    ---


-- ----------------------------
-- Primary Key structure for table drag_table_form
-- ----------------------------
ALTER TABLE [dbo].[drag_table_form] ADD CONSTRAINT [PK__drag_tab__3213E83FCD5F0C51] PRIMARY KEY CLUSTERED ([id])
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
    ON [PRIMARY]
    ---


    -- ----------------------------
-- Auto increment value for sys_dict_data
-- ----------------------------
    DBCC CHECKIDENT ('[dbo].[sys_dict_data]', RESEED, 1)
    ---


-- ----------------------------
-- Primary Key structure for table sys_dict_data
-- ----------------------------
ALTER TABLE [dbo].[sys_dict_data] ADD CONSTRAINT [PK__sys_dict__19CBC34BC9A11B37] PRIMARY KEY CLUSTERED ([dict_code])
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
    ON [PRIMARY]
    ---


    -- ----------------------------
-- Auto increment value for sys_dict_type
-- ----------------------------
    DBCC CHECKIDENT ('[dbo].[sys_dict_type]', RESEED, 1)
    ---


-- ----------------------------
-- Primary Key structure for table sys_dict_type
-- ----------------------------
ALTER TABLE [dbo].[sys_dict_type] ADD CONSTRAINT [PK__sys_dict__3BD4186CD3BD0C59] PRIMARY KEY CLUSTERED ([dict_id])
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
    ON [PRIMARY]
    ---


    -- ----------------------------
-- Auto increment value for table_sql
-- ----------------------------
    DBCC CHECKIDENT ('[dbo].[table_sql]', RESEED, 1)
    ---


-- ----------------------------
-- Primary Key structure for table table_sql
-- ----------------------------
ALTER TABLE [dbo].[table_sql] ADD CONSTRAINT [PK__table_sq__E579775F9D51D70A] PRIMARY KEY CLUSTERED ([t_id])
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
    ON [PRIMARY]
    ---

