-- ----------------------------
-- Table structure for dynamic_field_group_items
-- ----------------------------
DROP TABLE IF EXISTS dynamic_field_group_items;
CREATE TABLE dynamic_field_group_items  (
  id int NOT NULL AUTO_INCREMENT,
  fld_grp_name varchar(255) NULL DEFAULT NULL,
  field_grp_functionality varchar(255) NULL DEFAULT NULL,
  fld_grp_code varchar(255) NULL DEFAULT NULL,
  description varchar(255) NULL DEFAULT NULL,
  created_at datetime(0) NULL DEFAULT NULL,
  modified_at datetime(0) NULL DEFAULT NULL,
  is_system enum('0','1') NULL DEFAULT '0',
  is_deleted enum('0','1') NULL DEFAULT '0',
  replicate_callback varchar(255) NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

-- ----------------------------
-- Table structure for dynamic_field_grp_mapping
-- ----------------------------
DROP TABLE IF EXISTS dynamic_field_grp_mapping;
CREATE TABLE dynamic_field_grp_mapping  (
  id int NOT NULL AUTO_INCREMENT,
  fld_grp_id int NULL DEFAULT NULL,
  fld_id int NULL DEFAULT NULL,
  serial int NULL DEFAULT NULL,
  size int NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

-- ----------------------------
-- Table structure for dynamic_field_item_attr
-- ----------------------------
DROP TABLE IF EXISTS dynamic_field_item_attr;
CREATE TABLE dynamic_field_item_attr  (
  id int NOT NULL AUTO_INCREMENT,
  fld_id int NULL DEFAULT NULL,
  attr_type varchar(255) NULL DEFAULT NULL,
  attr_display varchar(255) NULL DEFAULT NULL,
  attr_val varchar(255) NULL DEFAULT NULL,
  created_at datetime(0) NULL DEFAULT NULL,
  serial int NULL DEFAULT 0,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

-- ----------------------------
-- Table structure for dynamic_field_items
-- ----------------------------
DROP TABLE IF EXISTS dynamic_field_items;
CREATE TABLE dynamic_field_items  (
  id int NOT NULL AUTO_INCREMENT,
  field_name varchar(255) NOT NULL,
  field_code varchar(255) NOT NULL,
  filed_description varchar(255) NOT NULL,
  field_type int NOT NULL,
  created_at datetime(0) NULL DEFAULT NULL,
  modified_at datetime(0) NULL DEFAULT NULL,
  is_system enum('0','1') NULL DEFAULT '0',
  is_deleted enum('0','1') NULL DEFAULT '0',
  is_look_up enum('0','1') NULL DEFAULT '0',
  look_up_code varchar(255) NULL DEFAULT NULL,
  is_other_master enum('0','1') NULL DEFAULT '0',
  master_data longtext NULL,
  is_server_side enum('0','1') NULL DEFAULT '0',
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

-- ----------------------------
-- Table structure for dynamic_form_child_map
-- ----------------------------
DROP TABLE IF EXISTS dynamic_form_child_map;
CREATE TABLE dynamic_form_child_map  (
  id int NOT NULL AUTO_INCREMENT,
  form_id int NULL DEFAULT NULL,
  child_id int NULL DEFAULT NULL,
  serial varchar(255) NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

-- ----------------------------
-- Table structure for dynamic_form_db_map
-- ----------------------------
DROP TABLE IF EXISTS dynamic_form_db_map;
CREATE TABLE dynamic_form_db_map  (
  id int NOT NULL AUTO_INCREMENT,
  form_id int NULL DEFAULT NULL,
  tab_id int NULL DEFAULT NULL,
  panel_id int NULL DEFAULT NULL,
  fld_grp_id int NULL DEFAULT NULL,
  fld_id int NULL DEFAULT NULL,
  table_name varchar(255) NULL DEFAULT NULL,
  col_name varchar(255) NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

-- ----------------------------
-- Table structure for dynamic_form_validation_data
-- ----------------------------
DROP TABLE IF EXISTS dynamic_form_validation_data;
CREATE TABLE dynamic_form_validation_data  (
  id int NOT NULL AUTO_INCREMENT,
  form_id int NULL DEFAULT NULL,
  tab_id int NULL DEFAULT NULL,
  panel_id int NULL DEFAULT NULL,
  fld_grp_id int NULL DEFAULT NULL,
  fld_id int NULL DEFAULT NULL,
  vldtion_type varchar(255) NULL DEFAULT NULL,
  vldtion_val varchar(255) NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

-- ----------------------------
-- Table structure for dynamic_forms
-- ----------------------------
DROP TABLE IF EXISTS dynamic_forms;
CREATE TABLE dynamic_forms  (
  id int NOT NULL AUTO_INCREMENT,
  form_name varchar(255) NULL DEFAULT NULL,
  form_code varchar(255) NULL DEFAULT NULL,
  description varchar(255) NULL DEFAULT NULL,
  form_html longtext NULL,
  created_at datetime(0) NULL DEFAULT NULL,
  modified_at datetime(0) NULL DEFAULT NULL,
  is_system enum('0','1') NULL DEFAULT '0',
  is_deleted enum('0','1') NULL DEFAULT '0',
  submit_func varchar(255) NULL DEFAULT NULL,
  validationFunc varchar(255) NULL DEFAULT NULL,
  is_on_modal enum('Y','N') NULL DEFAULT NULL,
  modal_id varchar(255) NULL DEFAULT NULL,
  loadListingAftrSubmit enum('Y','N') NULL DEFAULT NULL,
  listing_id varchar(255) NULL DEFAULT NULL,
  num_of_row_in_list int NULL DEFAULT NULL,
  listing_serverside_funct varchar(255) NULL DEFAULT NULL,
  external_js_link varchar(255) NULL DEFAULT NULL,
  aftrFromResetFunc varchar(255) NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

-- ----------------------------
-- Table structure for dynamic_panel_mapping
-- ----------------------------
DROP TABLE IF EXISTS dynamic_panel_mapping;
CREATE TABLE dynamic_panel_mapping  (
  id int NOT NULL AUTO_INCREMENT,
  panel_id int NULL DEFAULT NULL,
  child_id int NULL DEFAULT NULL,
  child_type varchar(255) NULL DEFAULT NULL,
  serial int NULL DEFAULT NULL,
  size int NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

-- ----------------------------
-- Table structure for dynamic_panels
-- ----------------------------
DROP TABLE IF EXISTS dynamic_panels;
CREATE TABLE dynamic_panels  (
  id int NOT NULL AUTO_INCREMENT,
  panel_name varchar(255) NULL DEFAULT NULL,
  panel_code varchar(255) NULL DEFAULT NULL,
  description varchar(255) NULL DEFAULT NULL,
  created_at datetime(0) NULL DEFAULT NULL,
  modified_at datetime(0) NULL DEFAULT NULL,
  is_system enum('0','1') NULL DEFAULT '0',
  is_deleted enum('0','1') NULL DEFAULT '0',
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

-- ----------------------------
-- Table structure for dynamic_tab_mapping
-- ----------------------------
DROP TABLE IF EXISTS dynamic_tab_mapping;
CREATE TABLE dynamic_tab_mapping  (
  id int NOT NULL AUTO_INCREMENT,
  tab_id int NULL DEFAULT NULL,
  child_id int NULL DEFAULT NULL,
  serial int NULL DEFAULT NULL,
  size int NULL DEFAULT NULL,
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

-- ----------------------------
-- Table structure for dynamic_tabs
-- ----------------------------
DROP TABLE IF EXISTS dynamic_tabs;
CREATE TABLE dynamic_tabs  (
  id int NOT NULL AUTO_INCREMENT,
  tab_name varchar(255) NULL DEFAULT NULL,
  tab_code varchar(255) NULL DEFAULT NULL,
  description varchar(255) NULL DEFAULT NULL,
  created_at datetime(0) NULL DEFAULT NULL,
  modified_at datetime(0) NULL DEFAULT NULL,
  is_system enum('0','1') NULL DEFAULT '0',
  is_deleted enum('0','1') NULL DEFAULT '0',
  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;

SET FOREIGN_KEY_CHECKS = 1;
