-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 15, 2023 at 03:31 PM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 7.4.25

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `shared_majoris3`
--

-- --------------------------------------------------------

--
-- Table structure for table `account_items`
--

CREATE TABLE `account_items` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `pos` int(11) NOT NULL DEFAULT 0,
  `icon_code` tinytext NOT NULL DEFAULT '',
  `icon_color` tinytext NOT NULL DEFAULT '',
  `bubble_color` tinytext NOT NULL DEFAULT '',
  `bubble_text_color` tinytext NOT NULL DEFAULT '',
  `text` text NOT NULL DEFAULT '',
  `intent_type` tinytext NOT NULL DEFAULT '',
  `intent_data` mediumtext NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `admins`
--

CREATE TABLE `admins` (
  `id` int(11) NOT NULL,
  `app_ids` text NOT NULL DEFAULT '' COMMENT 'Ids should be separated by commas.',
  `selected_app` int(11) NOT NULL DEFAULT 0,
  `name` tinytext NOT NULL DEFAULT '',
  `email` tinytext NOT NULL DEFAULT '',
  `phone` tinytext NOT NULL DEFAULT '',
  `access` enum('owner','writer','pending') NOT NULL DEFAULT 'writer',
  `removeable` tinyint(1) NOT NULL DEFAULT 1,
  `password` text NOT NULL DEFAULT '' COMMENT 'sha1-hash',
  `access_limit` text NOT NULL DEFAULT '' COMMENT 'its a json that contain all sections of panel and will get 0-1 for every section that present that admin has access or not',
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `admins_auth`
--

CREATE TABLE `admins_auth` (
  `id` int(11) NOT NULL,
  `admin_id` int(11) NOT NULL DEFAULT 0,
  `token` text NOT NULL DEFAULT '',
  `expire` tinytext NOT NULL DEFAULT '' COMMENT 'we save date with (Y-m-d) format here and not the default Y-m-d H:i:s format because +7 day date extender not works in php when the default format'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `appconfig`
--

CREATE TABLE `appconfig` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `type` tinytext NOT NULL DEFAULT '',
  `data` mediumtext NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `apps`
--

CREATE TABLE `apps` (
  `id` int(11) NOT NULL,
  `packagename` text NOT NULL DEFAULT '',
  `appuid` tinytext NOT NULL COMMENT 'generate uuid for site demos 16chars',
  `app_icon` text NOT NULL DEFAULT '',
  `app_name` text NOT NULL DEFAULT '',
  `app_short_name` tinytext NOT NULL DEFAULT '',
  `owner_id` int(11) NOT NULL DEFAULT 0,
  `variation_code` enum('demo','starter','pro','unlimited','demo_plus','pro_plus','unlimited_plus','unlimited_web') NOT NULL DEFAULT 'demo_plus' COMMENT 'This column defines how much option a specific subscription has access to. ',
  `initialized_demo` tinytext NOT NULL DEFAULT '',
  `app_primary_color` tinytext NOT NULL DEFAULT '',
  `expire_date` tinytext NOT NULL DEFAULT '',
  `space` int(11) NOT NULL DEFAULT 0 COMMENT 'This attribute shows the amount of space for a specific subscription.',
  `sms` int(11) NOT NULL DEFAULT 0 COMMENT 'This column shows number of sms remained to send for related subscription.',
  `page_limit` int(11) NOT NULL DEFAULT 0 COMMENT 'This column shows number of pages related to an application.\r\n',
  `admin_limit` int(11) NOT NULL DEFAULT 3,
  `disable_app` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'if user is not paying so desable app fully',
  `expire_sms_sent` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'does we sent sms to main admin about his/her expired panel or not? "1" shows expire sms sent ,"2" means panel disable sms sent.',
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `bottombar_items`
--

CREATE TABLE `bottombar_items` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `pos` int(11) NOT NULL DEFAULT 0,
  `icon_code` tinytext NOT NULL DEFAULT '',
  `icon_color` tinytext NOT NULL DEFAULT '',
  `text` text NOT NULL DEFAULT '',
  `text_color` tinytext NOT NULL DEFAULT '',
  `intent_type` text NOT NULL DEFAULT '',
  `intent_data` text NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `captcha`
--

CREATE TABLE `captcha` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `code` text NOT NULL DEFAULT '',
  `question` text NOT NULL DEFAULT '' COMMENT 'string',
  `answer` text NOT NULL DEFAULT '' COMMENT 'hashed sha-1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `parent_id` int(11) NOT NULL DEFAULT 0 COMMENT 'home (root) must be -1. independent cats root are also -1 but they have visible_in_list = 0',
  `pos` int(11) NOT NULL DEFAULT 0,
  `image` text NOT NULL DEFAULT '',
  `title` text NOT NULL DEFAULT '',
  `primary_link_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0 means primary_link and 1 means primary_link_full_url',
  `primary_link` text NOT NULL DEFAULT '',
  `primary_link_full_url` TEXT NOT NULL DEFAULT '',
  `summary` text NOT NULL DEFAULT '',
  `seo_title` text NOT NULL DEFAULT '',
  `seo_description` text NOT NULL DEFAULT '',
  `header_banner` text NOT NULL DEFAULT '' COMMENT 'banner image on top for marketings',
  `data` mediumtext NOT NULL DEFAULT '' COMMENT 'like posts data good for seo in web',
  `where_to_show_data` enum('android','web','both','none') NOT NULL DEFAULT 'both',
  `visible_in_list` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0-1',
  `subitems_order` text NOT NULL DEFAULT '' COMMENT 'date_desc , date_asc , pos_desc , pos_asc',
  `custom_order_byuser` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'active it only if all subitems are posts not cats',
  `custom_order_options` text NOT NULL DEFAULT '' COMMENT 'this is a json like [newer,older,topsale]',
  `show_sub_posts` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'show posts attached to sub cats of this cat',
  `show_mixed_posts` tinyint(4) NOT NULL DEFAULT 1 COMMENT 'show posts attached to this cat sametime with sub cats',
  `show_sibling_cats_at_top` tinyint(4) NOT NULL DEFAULT 0,
  `subcats_with_posts_display_mode` enum('normal','normal_scroll','boxed','boxed_scroll') NOT NULL DEFAULT 'normal' COMMENT 'works only when atleast one of show_sub_posts or show_mixed_posts is active',
  `subcat_boxed_img_height` int(11) NOT NULL DEFAULT 40,
  `subcat_boxed_img_height_mobile` int(11) NOT NULL DEFAULT 30,
  `list_type` tinyint(11) NOT NULL DEFAULT 2 COMMENT '1 = list , 2 = grid ',
  `grid_width` int(11) NOT NULL DEFAULT 90 COMMENT 'recommended between 60 and 200',
  `list_img_height` int(11) NOT NULL DEFAULT 50,
  `grid_width_mobile` int(11) NOT NULL DEFAULT 90,
  `list_img_height_mobile` int(11) NOT NULL DEFAULT 50,
  `show_likes` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-1',
  `show_postviews` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-1',
  `show_dates` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-1',
  `show_price` tinyint(1) NOT NULL DEFAULT 1,
  `quick_add_to_cart` tinyint(4) NOT NULL DEFAULT 0,
  `image_margin` int(11) NOT NULL DEFAULT 0 COMMENT 'in dp',
  `image_ratio` tinytext NOT NULL DEFAULT '' COMMENT 'something like 1:1 or 3:4',
  `box_margin` int(11) NOT NULL DEFAULT 10,
  `img_corner_radius` int(11) NOT NULL DEFAULT 0,
  `box_corner_radius` int(11) NOT NULL DEFAULT 0,
  `title_text_color` tinytext NOT NULL DEFAULT '',
  `desc_text_color` tinytext NOT NULL DEFAULT '',
  `view_like_date_text_color` tinytext NOT NULL DEFAULT '',
  `box_background_color` tinytext NOT NULL DEFAULT '',
  `arrow_color` tinytext NOT NULL DEFAULT '',
  `actionbar_color` text NOT NULL DEFAULT '',
  `background_color` text NOT NULL DEFAULT '',
  `background_img` text NOT NULL DEFAULT '',
  `title_max_lines` int(11) NOT NULL DEFAULT 2,
  `description_max_lines` int(11) NOT NULL DEFAULT 2,
  `actionbar_icon_code` tinytext NOT NULL DEFAULT '',
  `actionbar_icon_intent_type` text NOT NULL DEFAULT '',
  `actionbar_icon_intent_data` text NOT NULL DEFAULT '',
  `date` timestamp NOT NULL DEFAULT current_timestamp(),
  `date_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `comments`
--

CREATE TABLE `comments` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `post_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `show_name` text NOT NULL DEFAULT '' COMMENT 'this must be name of user',
  `is_admin` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'if user is admin or comment from panel',
  `has_purchased` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'if post is product and user has purchased the product we set this to 1 when comment submitted,',
  `user_recommendation` enum('not_set','recommended','not_recommended','not_sure') NOT NULL DEFAULT 'not_set' COMMENT 'only for physical products',
  `comment_text` text NOT NULL DEFAULT '',
  `reply_of_comment_id` int(11) NOT NULL DEFAULT 0,
  `confirmed` tinyint(1) NOT NULL DEFAULT 0,
  `rate` int(11) NOT NULL DEFAULT 0 COMMENT 'between 1 to 5 stars. 0 means no rate has set',
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `contactus`
--

CREATE TABLE `contactus` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0 COMMENT 'not required',
  `phone_email` text NOT NULL DEFAULT '',
  `subject` text NOT NULL DEFAULT '',
  `text` text NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `coupons`
--

CREATE TABLE `coupons` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `coupon_nature` int(11) NOT NULL DEFAULT 0 COMMENT '0:normal/1:gift_token',
  `coupon_code` text NOT NULL DEFAULT '',
  `gift_token_id` int(11) NOT NULL DEFAULT 0,
  `gift_token_title` text NOT NULL DEFAULT '',
  `type` text NOT NULL DEFAULT '' COMMENT 'fixed, percent',
  `amount` text NOT NULL DEFAULT '',
  `active` tinyint(1) NOT NULL DEFAULT 0,
  `date_limit` text NOT NULL DEFAULT '',
  `use_count_limit` int(11) NOT NULL DEFAULT 0,
  `times_used` int(11) NOT NULL DEFAULT 0,
  `user_limit` mediumtext NOT NULL DEFAULT '' COMMENT 'disable for now',
  `use_with_other_off` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'disabled for now',
  `one_time_for_one_user` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'disable for now',
  `list_of_users_used` mediumtext NOT NULL DEFAULT '' COMMENT 'disable for now',
  `section_limit` TEXT NOT NULL DEFAULT '' COMMENT 'nolimit,pp,dp,subscribes,form_orders',
  `category_limit` int(11) NOT NULL DEFAULT 0 COMMENT '0 means no limit',
  `post_limit` int(11) NOT NULL DEFAULT 0,
  `min_purchase_amount` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `defaults`
--

CREATE TABLE `defaults` (
  `id` int(11) NOT NULL,
  `type` tinytext NOT NULL DEFAULT '',
  `data` mediumtext NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `donates`
--

CREATE TABLE `donates` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `name` text NOT NULL DEFAULT '',
  `price` text NOT NULL DEFAULT '',
  `sku` text NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `footer_items`
--

CREATE TABLE `footer_items` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `pos` int(11) NOT NULL DEFAULT 0,
  `title` text NOT NULL DEFAULT '',
  `icon_code` tinytext NOT NULL DEFAULT '',
  `custom_class` tinytext NOT NULL DEFAULT '',
  `align_content` enum('unset','center','flex-start','flex-end','space-around','space-between','stretch') NOT NULL DEFAULT 'flex-start',
  `justify_content` enum('unset','center','flex-start','flex-end','space-between','space-around','space-evenly') NOT NULL DEFAULT 'flex-start',
  `align_items` enum('unset','center','flex-start','flex-end','stretch','baseline') NOT NULL DEFAULT 'center',
  `arrenge` enum('row','column') NOT NULL DEFAULT 'row',
  `item_arrenge` enum('row','column') NOT NULL DEFAULT 'row',
  `col_count` enum('col-count1','col-count2','col-count4','col-count6') NOT NULL DEFAULT 'col-count1',
  `title_color` tinytext NOT NULL DEFAULT '',
  `icon_color` tinytext NOT NULL DEFAULT '',
  `text_color` tinytext NOT NULL DEFAULT '',
  `img_width` int(11) NOT NULL DEFAULT 100,
  `icon_size` int(11) NOT NULL DEFAULT 20,
  `data` mediumtext NOT NULL DEFAULT '' COMMENT 'big json data with icons-images-text-intent-data-imgwidth...',
  `html_data` text NOT NULL DEFAULT '',
  `border_bottom_color` tinytext NOT NULL DEFAULT '',
  `border_top_color` tinytext NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `forms`
--

CREATE TABLE `forms` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `author_id` int(11) NOT NULL DEFAULT 0 COMMENT 'which admin_id created this post	',
  `icon_code` tinytext NOT NULL DEFAULT '',
  `color` tinytext NOT NULL DEFAULT '',
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `title` tinytext NOT NULL DEFAULT '',
  `out_of_stock_text` tinytext NOT NULL DEFAULT '',
  `status` enum('in_stock','out_of_stock') NOT NULL DEFAULT 'in_stock',
  `nature` enum('normal','form_order','attachable') NOT NULL DEFAULT 'normal',
  `init_price` int(11) NOT NULL DEFAULT 0,
  `init_price_off` int(11) NOT NULL DEFAULT 0,
  `price_fallback_title` tinytext NOT NULL DEFAULT '',
  `order_first_status` tinytext NOT NULL DEFAULT '',
  `after_pay_auto_log_text` text NOT NULL DEFAULT '',
  `after_pay_auto_log_btn_text` text NOT NULL DEFAULT '',
  `after_pay_auto_log_intent_type` text NOT NULL DEFAULT '',
  `after_pay_auto_log_intent_data` text NOT NULL DEFAULT '',
  `description` tinytext NOT NULL DEFAULT '',
  `user_can_resend_data` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'this must check in serverside',
  `guests_can_send_data` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0|1',
  `data` mediumtext NOT NULL DEFAULT '' COMMENT 'json array of all fields',
  `send_btn_text` tinytext NOT NULL DEFAULT '',
  `send_btn_color` tinytext NOT NULL DEFAULT '',
  `box_bg_color` tinytext NOT NULL DEFAULT '',
  `fields_bg_color` tinytext NOT NULL DEFAULT '',
  `fields_text_color` tinytext NOT NULL DEFAULT '',
  `fields_hint_color` tinytext NOT NULL DEFAULT '',
  `on_success_intent_type` tinytext NOT NULL DEFAULT '',
  `on_success_intent_data` text NOT NULL DEFAULT '',
  `intent_also_happen_when_user_resend` tinyint(1) NOT NULL DEFAULT 1,
  `date` timestamp NOT NULL DEFAULT current_timestamp(),
  `date_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `forms_responses`
--

CREATE TABLE `forms_responses` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `form_id` int(11) NOT NULL DEFAULT 0,
  `form_order_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `response` mediumtext NOT NULL DEFAULT '',
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `form_orders`
--


CREATE TABLE `form_orders` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `form_response_id` int(11) NOT NULL DEFAULT 0 COMMENT 'first user response to calculate price',
  `purchase_id` int(11) NOT NULL DEFAULT 0,
  `form_id` int(11) NOT NULL DEFAULT 0,
  `what_user_can_reply` enum('none','text','file','text_file') NOT NULL DEFAULT 'none',
  `status` enum('submitted','working','checking','waiting','need_changes','need_resubmit','canceled','finished','refunded','receiving') NOT NULL DEFAULT 'submitted',
  `date_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `form_orders_log`
--


CREATE TABLE `form_orders_log` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `form_order_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `author_id` int(11) NOT NULL DEFAULT 0,
  `role_label` enum('user','admin','system') NOT NULL DEFAULT 'user',
  `visible_for_user` tinyint(4) NOT NULL DEFAULT 0,
  `response_text` text NOT NULL,
  `response_file` text NOT NULL,
  `response_btn_text` text NOT NULL,
  `response_intent_type` text NOT NULL,
  `response_intent_data` text NOT NULL,
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `deprecated_homepage_items`
--

CREATE TABLE `deprecated_homepage_items` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `type` tinytext NOT NULL DEFAULT '' COMMENT 'notif,slider,text,img,img_dual,line_post_byids,line_post_bycat,grid,date,account,account,text_button,search',
  `pos` int(11) NOT NULL DEFAULT 0,
  `theme` int(11) NOT NULL DEFAULT 0,
  `data` text NOT NULL DEFAULT '',
  `direction` tinytext NOT NULL DEFAULT '' COMMENT 'rtl / ltr  / if not set homw row will extend from app direction from appconfig',
  `margin` int(11) NOT NULL DEFAULT 0 COMMENT 'margin left and right in dp',
  `icon_code` tinytext NOT NULL DEFAULT '' COMMENT 'text color will effect icon color too',
  `text_color` tinytext NOT NULL DEFAULT '' COMMENT 'support transparency',
  `background_color` tinytext NOT NULL DEFAULT '' COMMENT 'support transparency',
  `root_background_color` tinytext NOT NULL DEFAULT '' COMMENT 'support transparency',
  `img_height` int(11) NOT NULL DEFAULT 100 COMMENT 'simple image heigh in dp only used for fixed images',
  `round_corners` int(11) NOT NULL DEFAULT 0 COMMENT 'in dp could be 0 (not round) or more (round)',
  `space_between` int(11) NOT NULL DEFAULT 0 COMMENT 'if item has 2 options in a row this param will show a margin between them',
  `left_item_share` int(11) NOT NULL DEFAULT 35 COMMENT 'its a percent for dual images that set weight of left img',
  `text_on_img_location` tinytext NOT NULL DEFAULT '' COMMENT 'center / bottom / top',
  `grid_width` int(11) NOT NULL DEFAULT 90 COMMENT 'only used for grid menus or line of posts',
  `gravity` tinytext NOT NULL DEFAULT '' COMMENT 'start | center | end - just for text and gridviews',
  `line_post_order` tinytext NOT NULL DEFAULT '' COMMENT 'pos_desc , pos_asc , date_desc , date_asc , view_desc , like_desc',
  `line_post_limit` int(11) NOT NULL DEFAULT 20 COMMENT 'range 1 up to 30',
  `line_post_image_ratio` tinytext NOT NULL DEFAULT '' COMMENT 'something like 1:1 or 3:4',
  `line_post_recycler_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0 means defualt and other types are like  enfinite layout mangare and circle scrolling and ...',
  `line_post_show_description` tinyint(4) NOT NULL DEFAULT 0,
  `list_divider` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'used for line posts but maybe used in other types in future',
  `text_padding` int(11) NOT NULL DEFAULT 10 COMMENT 'dp only for img and img_dual , gif , gif_dual',
  `bold_text` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0-1 for text text_button img img_dual slider grid , gif , gif_dual',
  `comments` text NOT NULL DEFAULT '' COMMENT 'just additional infos',
  `visible_for` text NOT NULL DEFAULT '' COMMENT 'all - loggedin - guest - users_with_no_purchase - users_with_some_purchase - one_one',
  `line_post_first_item_as_image` text NOT NULL DEFAULT '' COMMENT 'if had an url, show it as first item of line post',
  `line_post_first_item_as_image_intent_type` tinytext NOT NULL DEFAULT '',
  `line_post_first_item_as_image_intent_data` text NOT NULL DEFAULT '',
  `inner_root_padding` int(11) NOT NULL DEFAULT 10 COMMENT 'this padding is for top and bottom of items that have root_backg',
  `margin_bottom` tinytext NOT NULL DEFAULT '' COMMENT 'if empty will read from appconfig vertival spacing. also can be negetive numbers',
  `line_post_extreme_card_bg_color` tinytext NOT NULL DEFAULT '' COMMENT 'sometimes maybe user want to override the nightmode colors and show static color for every conditions. like when show transparent card background with customm root background',
  `line_post_extreme_card_txt_color` tinytext NOT NULL DEFAULT '' COMMENT 'sometimes maybe user want to override the nightmode colors and show static color for every conditions. like when show transparent card background with customm root background'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `intro_items`
--

CREATE TABLE `intro_items` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `img` text NOT NULL DEFAULT '',
  `pos` int(11) NOT NULL DEFAULT 0,
  `text` text NOT NULL DEFAULT '',
  `description` text NOT NULL DEFAULT '',
  `text_color` tinytext NOT NULL DEFAULT '',
  `background_color` tinytext NOT NULL DEFAULT '',
  `active` tinyint(1) DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `luckywheel_items`
--

CREATE TABLE `luckywheel_items` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `pos` int(11) NOT NULL DEFAULT 0,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `text_header` text NOT NULL DEFAULT '',
  `text_mini` text NOT NULL DEFAULT '',
  `chance` int(11) NOT NULL DEFAULT 1 COMMENT 'its a number that define amount of chance happening this item',
  `coupon_code` text NOT NULL DEFAULT '' COMMENT 'coupon of reward to user. leave this empty for empty reward',
  `icon_code` text NOT NULL DEFAULT '',
  `text_color` text NOT NULL DEFAULT '',
  `icon_color` text NOT NULL DEFAULT '',
  `background_color` text NOT NULL DEFAULT '',
  `celebrate` tinyint(4) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `megamenu_items`
--

CREATE TABLE `megamenu_items` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `parent_id` int(11) NOT NULL COMMENT 'root megamenu items must be -1',
  `float_mode` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0/1',
  `pos` int(11) NOT NULL,
  `title` text NOT NULL DEFAULT '',
  `description` text NOT NULL DEFAULT '',
  `icon_code` text NOT NULL DEFAULT '',
  `image` text NOT NULL DEFAULT '',
  `color` tinytext NOT NULL DEFAULT '',
  `label` tinytext NOT NULL DEFAULT '' COMMENT 'for example new label',
  `label_color` tinytext NOT NULL DEFAULT '',
  `screen_limit` enum('no_limit','small_screen','large_screen','') NOT NULL DEFAULT 'no_limit',
  `intent_type` text NOT NULL DEFAULT '',
  `intent_data` text NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `author_id` int(11) NOT NULL DEFAULT 0,
  `icon_code` tinytext NOT NULL DEFAULT '',
  `color` tinytext NOT NULL DEFAULT '',
  `title` text NOT NULL DEFAULT '',
  `text` text NOT NULL DEFAULT '',
  `for_user` text NOT NULL DEFAULT '' COMMENT 'user_id , all , loggedin , guest',
  `user_id` int(11) NOT NULL DEFAULT 0 COMMENT 'if for_user is user_id so id of user will be set here',
  `button_text` tinytext NOT NULL DEFAULT '',
  `intent_type` tinytext NOT NULL DEFAULT '',
  `intent_data` text NOT NULL DEFAULT '',
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `navdrawer_items`
--

CREATE TABLE `navdrawer_items` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `pos` int(11) NOT NULL DEFAULT 0,
  `type` tinytext NOT NULL DEFAULT '' COMMENT 'row / cat  / cat means a single line of text for categorized bav drawer and didnt need intent data and intent type',
  `icon_code` tinytext NOT NULL DEFAULT '',
  `text` text NOT NULL DEFAULT '',
  `bold_text` tinyint(4) NOT NULL DEFAULT 0,
  `icon_color` text NOT NULL DEFAULT '',
  `text_color` text NOT NULL DEFAULT '',
  `intent_type` tinytext NOT NULL DEFAULT '',
  `intent_data` text NOT NULL DEFAULT '',
  `visible_for` tinytext NOT NULL DEFAULT '' COMMENT 'all - loggedin - guest - users_with_no_purchase - users_with_some_purchase - one_one'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `cart_data` mediumtext NOT NULL DEFAULT '' COMMENT 'json of purchase products and variables. its sent from cart',
  `purchased_product_ids` text NOT NULL DEFAULT '' COMMENT 'used for show comments for products so we can show commenter has purchased or not',
  `purchase_id` int(11) NOT NULL DEFAULT 0 COMMENT '0 mens not paid yet | or maybe user want to pay at destination',
  `payment_method` enum('online','transfer','atdes') NOT NULL DEFAULT 'online' COMMENT 'online|transfer|atdes',
  `status` enum('working','finished','waiting','refunded','checking','canceled','canceled_byuser','return_req_byuser') NOT NULL DEFAULT 'waiting',
  `post_tracking` tinytext NOT NULL DEFAULT '',
  `shipping_name` tinytext NOT NULL DEFAULT '',
  `shipping_province` tinytext NOT NULL DEFAULT '',
  `shipping_city` tinytext NOT NULL DEFAULT '',
  `shipping_address` text NOT NULL DEFAULT '',
  `shipping_location_lat` tinytext NOT NULL DEFAULT '',
  `shipping_location_lon` tinytext NOT NULL DEFAULT '',
  `shipping_phone` tinytext NOT NULL DEFAULT '',
  `shipping_tel` tinytext NOT NULL DEFAULT '',
  `shipping_postal_code` tinytext NOT NULL DEFAULT '',
  `order_note` text NOT NULL DEFAULT '' COMMENT 'user note about their order',
  `shipping_method_code` tinytext NOT NULL DEFAULT '',
  `shipping_method_title` text NOT NULL DEFAULT '',
  `shipping_method_cost` text NOT NULL DEFAULT '',
  `shipping_method_notes` text NOT NULL DEFAULT '',
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `orders_log`
--

CREATE TABLE `orders_log` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `order_id` int(11) NOT NULL DEFAULT 0,
  `visible_for_user` tinyint(1) NOT NULL DEFAULT 0,
  `data` text NOT NULL DEFAULT '',
  `date` timestamp NOT NULL DEFAULT current_timestamp(),
  `log_type` enum('manual','systematic') NOT NULL DEFAULT 'manual'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `panelconfig`
--

CREATE TABLE `panelconfig` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `api_token` text NOT NULL DEFAULT '',
  `aes_key` text NOT NULL DEFAULT '',
  `license_key` TEXT NOT NULL DEFAULT '',
  `runtime_token` TEXT NOT NULL DEFAULT '',
  `rootconfig_fallback` tinyint(1) NOT NULL DEFAULT 0,
  `data` mediumtext NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `poll`
--

CREATE TABLE `poll` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `author_id` int(11) NOT NULL DEFAULT 0,
  `icon_code` tinytext NOT NULL DEFAULT '',
  `color` tinytext NOT NULL DEFAULT '',
  `title` text NOT NULL DEFAULT '',
  `question` text NOT NULL DEFAULT '',
  `show_counts` tinyint(1) NOT NULL DEFAULT 0,
  `user_can_change_vote` tinyint(1) NOT NULL DEFAULT 1,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `box_color` text NOT NULL DEFAULT '',
  `button_color` text NOT NULL DEFAULT '',
  `show_result_without_vote` tinyint(1) NOT NULL DEFAULT 1,
  `multiple_select` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0-1 if active user can select more than one option',
  `date` timestamp NOT NULL DEFAULT current_timestamp(),
  `date_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `poll_items`
--

CREATE TABLE `poll_items` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `poll_id` int(11) NOT NULL DEFAULT 0,
  `pos` int(11) NOT NULL DEFAULT 0,
  `option_text` text NOT NULL DEFAULT '',
  `voters` longtext NOT NULL DEFAULT '',
  `color` tinytext NOT NULL DEFAULT '',
  `text_color` tinytext NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `posts`
--

CREATE TABLE `posts` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `author_id` int(11) NOT NULL DEFAULT 0 COMMENT 'which admin_id created this post',
  `pos` int(11) NOT NULL DEFAULT 0,
  `icon` tinytext NOT NULL DEFAULT '',
  `image` text NOT NULL DEFAULT '',
  `show_image_as_header` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'if 1 will set header image inside post with parallex effect or something. this item will not work for pp. pps are always set image as the first image in product gallery',
  `title` text NOT NULL DEFAULT '',
  `primary_link` text NOT NULL DEFAULT '',
  `summary` text NOT NULL DEFAULT '',
  `seo_title` text NOT NULL DEFAULT '',
  `seo_description` text NOT NULL DEFAULT '',
  `no_index` tinyint(4) NOT NULL DEFAULT 0,
  `published` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0-1',
  `type` tinytext NOT NULL DEFAULT '' COMMENT 'normal or intent (normal will open just post)',
  `cat_id` int(11) NOT NULL DEFAULT 0 COMMENT 'being -1 means its independed page and will not show in searchs like about us page ...',
  `cat_id2` int(11) NOT NULL DEFAULT 0 COMMENT 'secondary_cat id. 0 means not set',
  `cat_id3` int(11) NOT NULL DEFAULT 0 COMMENT 'tertiary cat id. 0 means not set',
  `cat2_title` text NOT NULL DEFAULT '' COMMENT 'this is title of cat 2 for example: brand,tag also can be empty for simple multiple cat system',
  `cat3_title` text NOT NULL DEFAULT '' COMMENT 'this is title of cat 3 for example: brand,tag also can be empty for simple multiple cat system',
  `depend_on_quiz` int(11) NOT NULL DEFAULT 0 COMMENT 'id of depended quiz',
  `comments` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0-1',
  `background` text NOT NULL DEFAULT '',
  `background_color` tinytext NOT NULL DEFAULT '',
  `data` mediumtext NOT NULL DEFAULT '' COMMENT 'bigdata to compile',
  `like_counter` int(11) NOT NULL DEFAULT 0,
  `view_counter` int(11) NOT NULL DEFAULT 0,
  `data_preview` mediumtext NOT NULL DEFAULT '' COMMENT 'bigdata to compile',
  `show_subscribe_preview_first` tinyint(4) NOT NULL DEFAULT 0,
  `single_buy` int(11) NOT NULL DEFAULT 0 COMMENT '0-1-2 0 means post/page and 1 means its digital product 2 means physical-product',
  `price` int(11) NOT NULL DEFAULT 0 COMMENT 'only for digital products',
  `price_off` int(11) NOT NULL DEFAULT 0 COMMENT 'only for digital products',
  `subscribe_ids` text NOT NULL DEFAULT '',
  `openwith_rewarded_ad` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0-1',
  `open_with_interstitial_ad` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0-1',
  `date` timestamp NOT NULL DEFAULT current_timestamp(),
  `date_updated` text NOT NULL DEFAULT '',
  `sku` text NOT NULL DEFAULT '' COMMENT 'if this post is single product, and we want to sell it with markets',
  `password_protected` mediumtext NOT NULL DEFAULT '' COMMENT 'must be AES encrypted. if set. user has to enter password to see this post',
  `only_for_logedin_users` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0-1',
  `hide_option_menu` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0-1 if 1 will hide 3 dots option menu from this post',
  `hide_like_view_dates` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0-1 if active will hide all of likes and views count and all dates',
  `show_find_in_page_by_default` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'if 1 will show find in page box right after post opened',
  `is_under_construction` tinyint(1) NOT NULL DEFAULT 0,
  `show_limit` enum('none','app','web') NOT NULL DEFAULT 'none' COMMENT 'none|app|web',
  `intent_type` tinytext NOT NULL DEFAULT '' COMMENT 'only if post type is intent',
  `intent_data` mediumtext NOT NULL DEFAULT '' COMMENT 'only if post type is intent',
  `intent_opener_only` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'ig active, we do not check anything inside the post and only we redirect to intent type. (fast intent opener mode)',
  `label_text` tinytext NOT NULL DEFAULT '',
  `label_txt_color` tinytext NOT NULL DEFAULT '',
  `label_bg_color` tinytext NOT NULL DEFAULT '',
  `pp_variables_list` mediumtext NOT NULL DEFAULT '',
  `pp_variables_map` mediumtext NOT NULL DEFAULT '',
  `pp_gallery` mediumtext NOT NULL DEFAULT '',
  `pp_spec_table` mediumtext NOT NULL DEFAULT '',
  `pp_type` enum('object','duty','virtual') NOT NULL DEFAULT 'object' COMMENT 'object means physical product and duty is service product.\r\nvirtual type is not recommended but also exists here. its better to set virtual prodduct with single_buy flag',
  `pp_show_similar` tinyint(1) NOT NULL DEFAULT 1,
  `pp_crosssell_ids` text NOT NULL DEFAULT '',
  `pp_is_amazing_discount` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0 = off, 1 = onNoLimit , 2 = onWithDeadLine',
  `pp_amazing_discount_deadline` text NOT NULL DEFAULT '' COMMENT 'valid only of amazing discount = 2, date and hour of ending amazing discount, type is : Y-m-d - H:i:s',
  `pp_guarantee` text NOT NULL DEFAULT '',
  `pp_user_can_buy_again` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'does user can buy this product again',
  `pp_quantity_limit_for_every_user` smallint(6) NOT NULL DEFAULT 0 COMMENT '0 means unlimite. this flag is set to every variable not full product. so user can buy more than this limit by adding onother variable to cart',
  `pp_virtual_intent_btn_text` tinytext NOT NULL DEFAULT '',
  `pp_virtual_intent_btn_icon` tinytext NOT NULL DEFAULT '',
  `pp_virtual_intent_type` text NOT NULL DEFAULT '' COMMENT 'this button will show in order item in virtual products only',
  `pp_virtual_intent_data` mediumtext NOT NULL DEFAULT '',
  `pp_price_index` text NOT NULL DEFAULT '' COMMENT 'used to sort in lists',
  `pp_stock_availability_index` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'if product has atleast 1 variable map in_stock this flag must set to 1',
  `pp_sale_counter` int(11) NOT NULL DEFAULT 0 COMMENT 'used to sort in lists',
  `pp_barcode` TEXT NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `purchases`
--

CREATE TABLE `purchases` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `purchase_type` text NOT NULL DEFAULT '' COMMENT 'subscribe / singlepost / donate / order / wallet / form_order',
  `payment_method` enum('online','transfer','atdes') NOT NULL DEFAULT 'online' COMMENT 'online|transfer|atdes',
  `transfer_proof_txt` text NOT NULL DEFAULT '',
  `transfer_proof_img` text NOT NULL DEFAULT '',
  `type_id` int(11) NOT NULL DEFAULT 0 COMMENT 'its id of (subcribe/donate/singlepost/order/wallet)',
  `reference_token` tinytext NOT NULL DEFAULT '',
  `title` text NOT NULL DEFAULT '',
  `old_amount` text NOT NULL DEFAULT '' COMMENT 'empty means no coupon is set',
  `amount` text NOT NULL DEFAULT '',
  `status` enum('pending','checking','paid','expired') NOT NULL DEFAULT 'pending' COMMENT 'checking means need admin verfiy and expired means not paid and canceled',
  `tracking_code` text NOT NULL DEFAULT '',
  `gateway` tinytext NOT NULL DEFAULT '',
  `authority` text NOT NULL DEFAULT '',
  `coupon_code` tinytext NOT NULL DEFAULT '' COMMENT 'empty means no coupon used',
  `date` timestamp NOT NULL DEFAULT current_timestamp(),
  `date_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `expire` text NOT NULL DEFAULT '' COMMENT 'deprecated'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `purchases_log`
--

CREATE TABLE `purchases_log` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `purchase_id` int(11) NOT NULL DEFAULT 0,
  `data` text NOT NULL DEFAULT '',
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `quiz`
--

CREATE TABLE `quiz` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `author_id` int(11) NOT NULL DEFAULT 0 COMMENT 'which admin_id created this quiz',
  `title` text NOT NULL DEFAULT '',
  `icon_code` tinytext NOT NULL DEFAULT '',
  `icon_image` text NOT NULL DEFAULT '',
  `save_results_on_server` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0/1 if active, user must login to start exam or finish it, else user not need login and data will save on user phone. do not change it on run time',
  `user_can_see_key` int(11) NOT NULL DEFAULT 0 COMMENT '0/1/2  (1=after exam finish 2 = always)',
  `user_can_see_descriptive_answers` int(11) NOT NULL DEFAULT 1 COMMENT '0/1/2  (1=after exam finish 2 = always)',
  `depend_on_quiz` int(11) NOT NULL DEFAULT 0 COMMENT 'id of depended quiz',
  `user_can_retake_quiz` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0/1 - if 0 and there is depending on post or other quiz may cause app be locked!',
  `quiz_time_limit` int(11) NOT NULL DEFAULT 0 COMMENT '(mins) 0 means no limit',
  `quiz_data` mediumtext NOT NULL DEFAULT '' COMMENT 'big json to compile',
  `quiz_key` text NOT NULL DEFAULT '' COMMENT 'json to compile',
  `descriptive_answers_type` int(11) NOT NULL DEFAULT 1 COMMENT '1/2 (1=single intent to a post | 2=big json)',
  `descriptive_answers` mediumtext NOT NULL DEFAULT '' COMMENT 'big json to compile',
  `descriptive_answers_button_text` text NOT NULL DEFAULT '' COMMENT 'only if descriptive_answers_type is 1',
  `descriptive_answers_intent_type` tinytext NOT NULL DEFAULT '' COMMENT 'just if descriptive answer type is 1',
  `descriptive_answers_intent_data` text NOT NULL DEFAULT '' COMMENT 'just if descriptive answer type is 1',
  `quiz_explain` text NOT NULL DEFAULT '',
  `grade_type` tinytext NOT NULL DEFAULT '' COMMENT 'iran(0-20) / universal(0-100) / custom',
  `custom_grade` text NOT NULL DEFAULT '' COMMENT 'json to compile / only if grade_type is custom',
  `negative_marking` int(11) NOT NULL DEFAULT 0 COMMENT '0-10   0 means off / 3 means 3 wrong answer will destroy 1 correct',
  `min_percent_to_pass` int(11) NOT NULL DEFAULT 0 COMMENT '0 means every body take exam is passed',
  `user_can_see_own_result` int(11) NOT NULL DEFAULT 0 COMMENT '0/1',
  `auto_start_quiz` int(11) NOT NULL DEFAULT 0 COMMENT 'if on, quiz will not show preview page and directly start the exam, but if need login or depended quiz this will not happen',
  `prevent_user_to_go_back` int(11) NOT NULL DEFAULT 0 COMMENT 'user cant change answers and only going forward. (if active, user cant see question list at all even it be active by it self)',
  `user_can_see_list_of_questions` int(11) NOT NULL DEFAULT 1 COMMENT 'if active user will be able to list of all questions',
  `question_number_pager` int(11) DEFAULT 1 COMMENT '0 = off     1 = full   2 = just_current',
  `option_numbering_type` int(11) NOT NULL DEFAULT 0 COMMENT '0 = off    1 = normal  2 = custom (exist in appText)',
  `images_zoom_type` int(11) NOT NULL DEFAULT 0 COMMENT '0 = off    1 = just_fullscreen   2 = fullscreen and zoomable',
  `image_option_float_start` int(11) NOT NULL DEFAULT 0 COMMENT '0 = full_width  |   1 = true(float start) ',
  `ask_user_to_confirm_on_next_button` int(11) NOT NULL DEFAULT 0 COMMENT '0 = off / 1 = always  / 2 = only when no answer submited.    this is useful when user cant go back',
  `ask_user_to_confirm_on_finish_quiz` int(11) NOT NULL DEFAULT 0 COMMENT 'if 0 don''t confirm if 1 always ask to confirm 2 = only when there is unanswered questions',
  `keep_next_previous_buttons_up` int(11) NOT NULL DEFAULT 0 COMMENT '0-1',
  `show_correct_answers_on_run_time` int(11) NOT NULL DEFAULT 0 COMMENT 'if active user will see answers right after click selecting an option',
  `image_height_on_question` int(11) NOT NULL DEFAULT 110,
  `image_height_on_options` int(11) NOT NULL DEFAULT 70,
  `active` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0/1',
  `date` timestamp NOT NULL DEFAULT current_timestamp(),
  `date_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `quiz_user_answers`
--

CREATE TABLE `quiz_user_answers` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `quiz_id` int(11) NOT NULL DEFAULT 0,
  `user_answer_key` text NOT NULL DEFAULT '' COMMENT 'json',
  `quiz_start_time` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'yyyy-mm-dd HH:mm:ss',
  `quiz_end_time` text NOT NULL DEFAULT '' COMMENT 'yyyy-MM-dd HH:mm:ss'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `redirects`
--

CREATE TABLE `redirects` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `redirect` tinytext NOT NULL DEFAULT '' COMMENT '301 or 302 ...',
  `old_link` text NOT NULL DEFAULT '',
  `new_link` text NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `serverconfig`
--

CREATE TABLE `serverconfig` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `type` tinytext NOT NULL DEFAULT '',
  `data` mediumtext NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0/1',
  `device_name` text NOT NULL DEFAULT '',
  `device_id` text NOT NULL DEFAULT '',
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `sitemap`
--

CREATE TABLE `sitemap` (
  `id` bigint(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `page_type` enum('homepage','static_pages','dynamic_pages','not_set') NOT NULL DEFAULT 'not_set' COMMENT 'posts for example are dynamic pages and account page is a static page',
  `loc` mediumtext NOT NULL DEFAULT '',
  `address` mediumtext NOT NULL DEFAULT '' COMMENT 'This is exactly same is loc only this one is not encoded!',
  `lastmod` text NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `subscribes`
--

CREATE TABLE `subscribes` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `pos` int(11) NOT NULL DEFAULT 0,
  `icon_code` tinytext NOT NULL DEFAULT '',
  `icon_color` tinytext NOT NULL DEFAULT '',
  `duration` int(11) NOT NULL DEFAULT 0 COMMENT 'in months 1- 3 - 6 - 12 ...  0 means unlimited',
  `duration_hour` int(11) NOT NULL DEFAULT 0 COMMENT 'duration month is deprecated in db4',
  `extendable` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'used for free demo subscribes',
  `name` text NOT NULL DEFAULT '',
  `description` text NOT NULL DEFAULT '',
  `price` int(11) NOT NULL DEFAULT 0,
  `price_off` int(11) NOT NULL DEFAULT 0,
  `is_amazing_discount` tinyint(4) NOT NULL DEFAULT 0,
  `amazing_discount_deadline` text NOT NULL DEFAULT '',
  `sku` text NOT NULL DEFAULT '' COMMENT 'bazaar,myket should be same',
  `intent_button_text` mediumtext NOT NULL DEFAULT '',
  `intent_type` text NOT NULL DEFAULT '',
  `intent_data` mediumtext NOT NULL DEFAULT '',
  `active` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'subscribe is purchaseable or not?'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `subscribe_orders`
--

CREATE TABLE `subscribe_orders` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `purchase_id` int(11) NOT NULL DEFAULT 0,
  `subscribe_id` int(11) NOT NULL DEFAULT 0,
  `status` enum('active','expired') NOT NULL DEFAULT 'expired' COMMENT 'active|expired',
  `expire_date` tinytext NOT NULL DEFAULT '',
  `date_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `subscribe_orders_log`
--

CREATE TABLE `subscribe_orders_log` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `subscribe_order_id` int(11) NOT NULL DEFAULT 0,
  `data` text NOT NULL DEFAULT '',
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `tickets`
--

CREATE TABLE `tickets` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `subject` text NOT NULL DEFAULT '',
  `priority` tinyint(11) NOT NULL DEFAULT 1 COMMENT '1-2-3 - low - medium - high',
  `department` text NOT NULL DEFAULT '',
  `status` tinytext NOT NULL DEFAULT '' COMMENT 'waiting - working - answered - useranswered - closed',
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `tickets_replys`
--

CREATE TABLE `tickets_replys` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `ticket_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `rule_label` enum('user','admin') NOT NULL DEFAULT 'user' COMMENT 'user , admin',
  `text` text NOT NULL DEFAULT '',
  `attachment` text NOT NULL DEFAULT '',
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `name` tinytext NOT NULL DEFAULT '',
  `family` text NOT NULL DEFAULT '' COMMENT 'for future uses',
  `profile_picture` text NOT NULL DEFAULT '' COMMENT 'for feature uses',
  `username` tinytext NOT NULL DEFAULT '',
  `email` text NOT NULL DEFAULT '',
  `phone` text NOT NULL DEFAULT '',
  `email_temp` text NOT NULL DEFAULT '',
  `phone_temp` text NOT NULL DEFAULT '',
  `email_verify` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0/1',
  `phone_verify` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0/1',
  `otp` int(11) NOT NULL DEFAULT 0,
  `otp_expire` text NOT NULL DEFAULT '',
  `password` text NOT NULL DEFAULT '',
  `status` tinytext NOT NULL DEFAULT '',
  `otp_date` text NOT NULL DEFAULT '',
  `otp_counter` int(11) NOT NULL DEFAULT 0,
  `province` text NOT NULL DEFAULT '',
  `city` text NOT NULL DEFAULT '',
  `address` text NOT NULL DEFAULT '',
  `postal_code` text NOT NULL DEFAULT '',
  `location` tinytext NOT NULL DEFAULT '' COMMENT 'user address location on map',
  `shipping_phone` tinytext NOT NULL DEFAULT '' COMMENT 'for feature uses',
  `additional_shipping_addresses` mediumtext NOT NULL DEFAULT '' COMMENT 'its array of shippingObjects for second address and more...',
  `is_admin` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'id active we will open under construction posts for admins',
  `is_blocked` tinyint(1) NOT NULL DEFAULT 0,
  `melli_code` text NOT NULL DEFAULT '',
  `authentication_image` text NOT NULL DEFAULT '',
  `credit_card_number` tinytext NOT NULL DEFAULT '',
  `is_account_completed` tinyint(1) NOT NULL DEFAULT 0,
  `old_phones` text NOT NULL DEFAULT '' COMMENT 'if user change the account phone number, old phone will kept here for security reasons',
  `old_emails` text NOT NULL DEFAULT '' COMMENT 'if user change the account email address, old emails will kept here for security reasons',
  `gender` enum('male','female','not_mentioned') NOT NULL DEFAULT 'not_mentioned',
  `birthday_en` text NOT NULL DEFAULT '',
  `birthday_fa` text NOT NULL DEFAULT '',
  `custom_field1` text NOT NULL DEFAULT '',
  `custom_field2` text NOT NULL DEFAULT '',
  `custom_field3` text NOT NULL DEFAULT '',
  `job` text NOT NULL DEFAULT '',
  `fav_posts` text NOT NULL DEFAULT '',
  `fav_products` text NOT NULL DEFAULT '',
  `cart_data` mediumtext NOT NULL DEFAULT '' COMMENT 'user product cart data will save here online',
  `next_cart_data` mediumtext NOT NULL DEFAULT '' COMMENT '[soon maybe] user product next cart data will save here online',
  `last_cart_update_date` tinytext NOT NULL DEFAULT '',
  `wallet_balance` int(11) NOT NULL DEFAULT 0 COMMENT 'max value 2,147,000,000 for int limit',
  `invite_code` tinytext NOT NULL DEFAULT '' COMMENT 'save phone number or email by default. user can change it maybe',
  `inviter_user_id` int(11) NOT NULL DEFAULT 0,
  `date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `users_auth`
--

CREATE TABLE `users_auth` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `token` text NOT NULL DEFAULT '',
  `expire` tinytext NOT NULL DEFAULT '' COMMENT 'we save date with (Y-m-d) format here and not the default Y-m-d H:i:s format because +7 day date extender not works in php when the default format'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `wallet`
--

CREATE TABLE `wallet` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `title` text NOT NULL DEFAULT '',
  `price` text NOT NULL DEFAULT '',
  `sku` text NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


-- --------------------------------------------------------

--
-- Table structure for table `deprecated_web_homepage_items`
--

CREATE TABLE `deprecated_web_homepage_items` (
  `id` int(11) NOT NULL,
  `app_id` int(11) NOT NULL DEFAULT 0,
  `type` tinytext NOT NULL COMMENT 'text|img|img_dual|slider|and so much more',
  `pos` int(11) NOT NULL DEFAULT 0,
  `theme` int(11) NOT NULL DEFAULT 0,
  `data` mediumtext NOT NULL DEFAULT '',
  `data2` mediumtext NOT NULL DEFAULT '',
  `direction` tinytext NOT NULL DEFAULT '' COMMENT 'ltr|rtl if not set extend from app direction',
  `screen_limit` enum('no_limit','small_screen','large_screen','') NOT NULL DEFAULT 'no_limit',
  `margin_bottom` tinytext NOT NULL DEFAULT '',
  `icon_code` tinytext NOT NULL DEFAULT '',
  `text_color` tinytext NOT NULL DEFAULT '',
  `background_color` tinytext NOT NULL DEFAULT '',
  `inner_padding` int(11) NOT NULL DEFAULT 0,
  `root_background_color` tinytext NOT NULL DEFAULT '',
  `inner_root_padding` int(11) NOT NULL DEFAULT 0,
  `img_height` int(11) NOT NULL DEFAULT 100,
  `img_height_mobile` int(11) NOT NULL DEFAULT 70,
  `round_corners` int(11) NOT NULL DEFAULT 0,
  `space_between` int(11) NOT NULL DEFAULT 0,
  `grid_width` int(11) NOT NULL DEFAULT 90,
  `gravity` tinytext NOT NULL DEFAULT '' COMMENT 'start|end|center',
  `horizontal_scroll` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0|1',
  `align_content` enum('flex-start','center','flex-end','space-between','space-around','stretch') NOT NULL DEFAULT 'flex-start' COMMENT 'center|flex-start|flex-end|space-between|space-around|stretch',
  `justify_content` enum('flex-start','center','flex-end','space-between','space-around','space-evenly') NOT NULL DEFAULT 'flex-start' COMMENT 'center|flex-start|flex-end|space-between|space-around|space-evenly	',
  `align_items` enum('center','flex-start','flex-end','stretch') NOT NULL DEFAULT 'center' COMMENT 'center|flex-start|flex-end|stretch	',
  `line_post_order` tinytext NOT NULL DEFAULT '' COMMENT 'pos_desc , pos_asc , date_desc , date_asc , view_desc , like_desc',
  `line_post_limit` int(11) NOT NULL DEFAULT 20 COMMENT 'range 1 up to 30',
  `line_post_image_ratio` tinytext NOT NULL DEFAULT '' COMMENT '	something like 1:1 or 3:4',
  `line_post_first_item_as_image` text NOT NULL DEFAULT '',
  `line_post_first_item_as_image_intent_type` tinytext NOT NULL DEFAULT '',
  `line_post_first_item_as_image_intent_data` text NOT NULL DEFAULT '',
  `text_padding` int(11) NOT NULL DEFAULT 10,
  `text_weight` enum('200','300','400','500','600','700','800','900') NOT NULL DEFAULT '400' COMMENT '200|300|400|500|600|700|800|900',
  `root_custom_class_name` tinytext NOT NULL DEFAULT '' COMMENT 'custom css class name',
  `left_item_share` int(11) NOT NULL DEFAULT 40
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


--
-- Indexes for dumped tables
--

--
-- Indexes for table `account_items`
--
ALTER TABLE `account_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `admins`
--
ALTER TABLE `admins`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `admins_auth`
--
ALTER TABLE `admins_auth`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `appconfig`
--
ALTER TABLE `appconfig`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `apps`
--
ALTER TABLE `apps`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bottombar_items`
--
ALTER TABLE `bottombar_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `captcha`
--
ALTER TABLE `captcha`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `date` (`date`);

--
-- Indexes for table `contactus`
--
ALTER TABLE `contactus`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `coupons`
--
ALTER TABLE `coupons`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `defaults`
--
ALTER TABLE `defaults`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `donates`
--
ALTER TABLE `donates`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `footer_items`
--
ALTER TABLE `footer_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `forms`
--
ALTER TABLE `forms`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `forms_responses`
--
ALTER TABLE `forms_responses`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `form_orders`
--
ALTER TABLE `form_orders`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `form_orders_log`
--
ALTER TABLE `form_orders_log`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `deprecated_homepage_items`
--
ALTER TABLE `deprecated_homepage_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `intro_items`
--
ALTER TABLE `intro_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `luckywheel_items`
--
ALTER TABLE `luckywheel_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `megamenu_items`
--
ALTER TABLE `megamenu_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `messages`
--
ALTER TABLE `messages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `navdrawer_items`
--
ALTER TABLE `navdrawer_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `orders_log`
--
ALTER TABLE `orders_log`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `panelconfig`
--
ALTER TABLE `panelconfig`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `poll`
--
ALTER TABLE `poll`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `poll_items`
--
ALTER TABLE `poll_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `posts`
--
ALTER TABLE `posts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `date` (`date`);

--
-- Indexes for table `purchases`
--
ALTER TABLE `purchases`
  ADD PRIMARY KEY (`id`),
  ADD KEY `date` (`date`);

--
-- Indexes for table `purchases_log`
--
ALTER TABLE `purchases_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `date` (`date`);

--
-- Indexes for table `quiz`
--
ALTER TABLE `quiz`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `quiz_user_answers`
--
ALTER TABLE `quiz_user_answers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`,`quiz_id`);

--
-- Indexes for table `serverconfig`
--
ALTER TABLE `serverconfig`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `subscribes`
--
ALTER TABLE `subscribes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `subscribe_orders`
--
ALTER TABLE `subscribe_orders`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `subscribe_orders_log`
--
ALTER TABLE `subscribe_orders_log`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tickets`
--
ALTER TABLE `tickets`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tickets_replys`
--
ALTER TABLE `tickets_replys`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ticket_id` (`ticket_id`,`user_id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users_auth`
--
ALTER TABLE `users_auth`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `wallet`
--
ALTER TABLE `wallet`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `deprecated_web_homepage_items`
--
ALTER TABLE `deprecated_web_homepage_items`
  ADD PRIMARY KEY (`id`);


ALTER TABLE `redirects`
  ADD PRIMARY KEY (`id`);


ALTER TABLE `sitemap`
  ADD PRIMARY KEY (`id`);


--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `account_items`
--
ALTER TABLE `account_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `admins`
--
ALTER TABLE `admins`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 1001;

--
-- AUTO_INCREMENT for table `admins_auth`
--
ALTER TABLE `admins_auth`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `appconfig`
--
ALTER TABLE `appconfig`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `apps`
--
ALTER TABLE `apps`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bottombar_items`
--
ALTER TABLE `bottombar_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `captcha`
--
ALTER TABLE `captcha`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 1001;

--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 1001;

--
-- AUTO_INCREMENT for table `contactus`
--
ALTER TABLE `contactus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `coupons`
--
ALTER TABLE `coupons`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `defaults`
--
ALTER TABLE `defaults`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `donates`
--
ALTER TABLE `donates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `footer_items`
--
ALTER TABLE `footer_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `forms`
--
ALTER TABLE `forms`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 1001;

--
-- AUTO_INCREMENT for table `forms_responses`
--
ALTER TABLE `forms_responses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 1001;

--
-- AUTO_INCREMENT for table `form_orders`
--
ALTER TABLE `form_orders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 11001;

--
-- AUTO_INCREMENT for table `form_orders_log`
--
ALTER TABLE `form_orders_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `deprecated_homepage_items`
--
ALTER TABLE `deprecated_homepage_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `intro_items`
--
ALTER TABLE `intro_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `luckywheel_items`
--
ALTER TABLE `luckywheel_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `megamenu_items`
--
ALTER TABLE `megamenu_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 1001;

--
-- AUTO_INCREMENT for table `navdrawer_items`
--
ALTER TABLE `navdrawer_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 11001;

--
-- AUTO_INCREMENT for table `orders_log`
--
ALTER TABLE `orders_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 1001;

--
-- AUTO_INCREMENT for table `panelconfig`
--
ALTER TABLE `panelconfig`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `poll`
--
ALTER TABLE `poll`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 1001;

--
-- AUTO_INCREMENT for table `poll_items`
--
ALTER TABLE `poll_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `posts`
--
ALTER TABLE `posts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 11001;

--
-- AUTO_INCREMENT for table `purchases`
--
ALTER TABLE `purchases`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 11001;

--
-- AUTO_INCREMENT for table `purchases_log`
--
ALTER TABLE `purchases_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `quiz`
--
ALTER TABLE `quiz`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 1001;

--
-- AUTO_INCREMENT for table `quiz_user_answers`
--
ALTER TABLE `quiz_user_answers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `serverconfig`
--
ALTER TABLE `serverconfig`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sessions`
--
ALTER TABLE `sessions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `subscribes`
--
ALTER TABLE `subscribes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 1001;

--
-- AUTO_INCREMENT for table `subscribe_orders`
--
ALTER TABLE `subscribe_orders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 11001;

--
-- AUTO_INCREMENT for table `subscribe_orders_log`
--
ALTER TABLE `subscribe_orders_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tickets`
--
ALTER TABLE `tickets`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 1001;

--
-- AUTO_INCREMENT for table `tickets_replys`
--
ALTER TABLE `tickets_replys`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
  AUTO_INCREMENT = 11001;

--
-- AUTO_INCREMENT for table `users_auth`
--
ALTER TABLE `users_auth`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `wallet`
--
ALTER TABLE `wallet`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `deprecated_web_homepage_items`
--
ALTER TABLE `deprecated_web_homepage_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

  
ALTER TABLE `redirects`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;


ALTER TABLE `sitemap`
  MODIFY `id` bigint(11) NOT NULL AUTO_INCREMENT;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
