-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `ft_db`
--

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

--
-- Table structure for table `ft_about_us`
--

CREATE TABLE `ft_about_us` (
  `about_us_id` int NOT NULL,
  `description` text NOT NULL,
  `aws_id` varchar(32) NOT NULL,
  `filename` varchar(100) NOT NULL,
  `filetype` varchar(15) NOT NULL,
  `updated_at` datetime NOT NULL,
  `updated_by` int NOT NULL COMMENT 'Staff Id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_account_notification`
--

CREATE TABLE `ft_account_notification` (
  `account_notification_id` int NOT NULL,
  `member_id` int NOT NULL,
  `message_id` int NOT NULL DEFAULT '0' COMMENT 'to save latest message id seen by member',
  `bid_id` int NOT NULL DEFAULT '0' COMMENT 'to save latest bid id seen by member	',
  `sales_contract_id` int NOT NULL DEFAULT '0' COMMENT 'to save latest sales_contract id seen by member',
  `invoice_id` int NOT NULL DEFAULT '0' COMMENT 'to save latest invoice id seen by member	',
  `alert_id` int DEFAULT '0' COMMENT 'to save latest alert id seen by member',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_ag_service`
--

CREATE TABLE `ft_ag_service` (
  `ag_service_id` int NOT NULL,
  `ag_service_category_id` int DEFAULT '0',
  `ag_service_subcategory_id` int DEFAULT '0',
  `member_id` int NOT NULL,
  `logoimage_id` int DEFAULT '0',
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text,
  `status` int DEFAULT '0' COMMENT '0=pending, 1=approved, 2=expired, 3=delisted',
  `contact_name` varchar(60) DEFAULT NULL,
  `contact_company` varchar(60) DEFAULT NULL,
  `contact_phone` varchar(30) DEFAULT NULL,
  `contact_email` varchar(80) DEFAULT NULL,
  `contact_address` varchar(100) DEFAULT NULL,
  `social_desc` varchar(200) DEFAULT NULL,
  `videos` varchar(200) DEFAULT NULL,
  `views_count` int DEFAULT '0',
  `is_featured` tinyint(1) DEFAULT '0',
  `logo` varchar(200) DEFAULT NULL,
  `approved_at` datetime DEFAULT NULL,
  `expired_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_ag_service_category`
--

CREATE TABLE `ft_ag_service_category` (
  `ag_service_category_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `services_count` int DEFAULT '0',
  `subcategories_count` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_ag_service_image`
--

CREATE TABLE `ft_ag_service_image` (
  `ag_service_image_id` int NOT NULL,
  `ag_service_id` int DEFAULT '0',
  `aws_id` varchar(32) DEFAULT NULL,
  `filename` varchar(100) DEFAULT NULL,
  `filetype` varchar(15) DEFAULT NULL,
  `primary_image` tinyint NOT NULL DEFAULT '0' COMMENT '1-primary\r\n0-non primary',
  `logo_image` tinyint(1) DEFAULT '0',
  `old_ft` tinyint(1) DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_ag_service_subcategory`
--

CREATE TABLE `ft_ag_service_subcategory` (
  `ag_service_subcategory_id` int NOT NULL,
  `ag_service_category_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `services_count` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_alerts`
--

CREATE TABLE `ft_alerts` (
  `alert_id` int NOT NULL,
  `member_id` int DEFAULT NULL,
  `body` text,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_app_version`
--

CREATE TABLE `ft_app_version` (
  `app_version_id` int NOT NULL,
  `name` varchar(200) DEFAULT NULL,
  `version` varchar(10) NOT NULL DEFAULT '0',
  `link` varchar(225) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `messages` text,
  `success` varchar(20) DEFAULT NULL,
  `failure` varchar(20) DEFAULT NULL,
  `staff_id` int DEFAULT NULL COMMENT 'create and update by staff',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_article`
--

CREATE TABLE `ft_article` (
  `article_id` int NOT NULL,
  `ft_id` varchar(32) DEFAULT NULL,
  `article_category_id` int DEFAULT '0',
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `status` int DEFAULT '0' COMMENT '0=draft, 1=publish',
  `browser_title` varchar(255) DEFAULT NULL,
  `meta_keywords` varchar(255) DEFAULT NULL,
  `meta_description` text,
  `views_count` int DEFAULT '0',
  `likes_count` int DEFAULT '0',
  `require_login` tinyint(1) DEFAULT '0',
  `profileimage_id` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_article_category`
--

CREATE TABLE `ft_article_category` (
  `article_category_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `browser_title` varchar(255) DEFAULT NULL,
  `meta_description` text,
  `articles_count` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_article_image`
--

CREATE TABLE `ft_article_image` (
  `article_image_id` int NOT NULL,
  `article_id` int DEFAULT '0',
  `aws_id` varchar(32) DEFAULT NULL,
  `filename` varchar(100) DEFAULT NULL,
  `filetype` varchar(15) DEFAULT NULL,
  `primary_image` tinyint(1) DEFAULT '0',
  `old_ft` tinyint(1) DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_auction`
--

CREATE TABLE `ft_auction` (
  `auction_id` int NOT NULL,
  `no` varchar(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text,
  `starts_at` datetime DEFAULT NULL,
  `ends_at` datetime DEFAULT NULL,
  `status` int DEFAULT '0' COMMENT '0=draft, 1=incoming, 2=preview, 3=active, 4=finished, 5=completed',
  `min_price` decimal(15,2) DEFAULT '0.00',
  `videos` varchar(200) DEFAULT NULL,
  `listings_count` int DEFAULT '0',
  `ap_url` varchar(255) DEFAULT NULL,
  `is_featured` tinyint(1) DEFAULT '0',
  `is_private` tinyint(1) DEFAULT '0',
  `profileimage_id` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_auction_image`
--

CREATE TABLE `ft_auction_image` (
  `auction_image_id` int NOT NULL,
  `auction_id` int DEFAULT '0',
  `aws_id` varchar(32) DEFAULT NULL,
  `filename` varchar(100) DEFAULT NULL,
  `filetype` varchar(15) DEFAULT NULL,
  `primary_image` tinyint(1) DEFAULT '0',
  `old_ft` tinyint(1) DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_auction_listing`
--

CREATE TABLE `ft_auction_listing` (
  `auction_listing_id` int NOT NULL,
  `listing_id` int NOT NULL,
  `auction_id` int NOT NULL,
  `lotno` int DEFAULT '0',
  `starting_price` decimal(15,2) DEFAULT '0.00',
  `reserve_price` decimal(15,2) DEFAULT '0.00',
  `bid_increment` decimal(15,2) DEFAULT '0.00',
  `sold_for` decimal(15,2) NOT NULL DEFAULT '0.00',
  `status` int DEFAULT '2' COMMENT '1=applied, 2=approved, 3=sold, 4=unsold',
  `notes` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_automation_app_template`
--

CREATE TABLE `ft_automation_app_template` (
  `id` int NOT NULL,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `body` text,
  `is_active` enum('Yes','No') DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_automation_campaign`
--

CREATE TABLE `ft_automation_campaign` (
  `id` int NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `member_type` enum('member','prime','All','') DEFAULT NULL,
  `member_activity` enum('All','Not listed','Never listed','Purchased','Commented','Made Offer','Listed','') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `member_count` int DEFAULT NULL,
  `category` int DEFAULT NULL,
  `subcategory` int DEFAULT NULL,
  `organic` tinyint(1) DEFAULT NULL,
  `baletype` varchar(40) DEFAULT NULL,
  `covering` varchar(40) DEFAULT NULL,
  `make_id` int DEFAULT NULL,
  `model_id` int DEFAULT NULL,
  `model_condition` enum('new','used','all','') DEFAULT NULL,
  `grain_type_id` int DEFAULT '0',
  `sold_as` enum('grain','seed','all','') DEFAULT NULL,
  `breed_id` int DEFAULT '0',
  `drop_year` varchar(20) DEFAULT NULL,
  `property_type` varchar(20) DEFAULT NULL,
  `keyword` varchar(255) DEFAULT NULL,
  `user_activity` enum('within','before','in between','') DEFAULT NULL,
  `days` int DEFAULT NULL,
  `from_date` date DEFAULT NULL,
  `to_date` date DEFAULT NULL,
  `state_id` int DEFAULT NULL,
  `district_id` int DEFAULT NULL,
  `suburb` varchar(30) DEFAULT NULL,
  `sending_method` varchar(255) DEFAULT NULL,
  `header_id` int DEFAULT NULL,
  `footer_id` int DEFAULT NULL,
  `email_template` int DEFAULT NULL,
  `header` text,
  `header_css` text,
  `email_subject` varchar(255) DEFAULT NULL,
  `footer` text,
  `footer_css` text,
  `email_body` text,
  `frequency` enum('once','repeat','') DEFAULT NULL,
  `time_trigger` enum('day','week','month','') DEFAULT NULL,
  `day` int DEFAULT NULL,
  `year` int DEFAULT NULL,
  `time` int DEFAULT NULL,
  `time_periods` enum('AM','PM','') DEFAULT NULL,
  `week_day` enum('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday','') DEFAULT NULL,
  `month` enum('January','February','March','April','May','June','July','August','September','October','November','December','') DEFAULT NULL,
  `status` int DEFAULT NULL,
  `sms_temp_id` int DEFAULT NULL,
  `sms_body` text,
  `app_temp_id` int DEFAULT NULL,
  `app_body` text,
  `campaign_start` date DEFAULT NULL,
  `campaign_end` date DEFAULT NULL,
  `business_tags` varchar(255) DEFAULT NULL,
  `seller_tags` varchar(255) DEFAULT NULL,
  `buyer_tags` varchar(255) DEFAULT NULL,
  `personality_tag` varchar(255) DEFAULT NULL,
  `campaign_code` varchar(255) DEFAULT NULL,
  `listing_group_1_header` varchar(200) DEFAULT NULL,
  `listing_group_2_header` varchar(200) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `created_by` int DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_automation_campaign_listing`
--

CREATE TABLE `ft_automation_campaign_listing` (
  `campaign_listing_id` int NOT NULL,
  `campaign_id` int NOT NULL,
  `listing_id` int NOT NULL,
  `listing_type_id` int NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_automation_footer`
--

CREATE TABLE `ft_automation_footer` (
  `f_id` int NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `footer_body` text,
  `footer_css_js` text,
  `is_active` enum('Yes','No','') DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_automation_header`
--

CREATE TABLE `ft_automation_header` (
  `hf_id` int NOT NULL,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `header_body` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `header_css_js` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `is_active` enum('Yes','No','') DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_automation_member_tags`
--

CREATE TABLE `ft_automation_member_tags` (
  `id` int NOT NULL,
  `member_id` int DEFAULT NULL,
  `business` varchar(255) DEFAULT NULL,
  `seller` varchar(255) DEFAULT NULL,
  `buyer` varchar(255) DEFAULT NULL,
  `personality` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `created_by` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_automation_past_campaign`
--

CREATE TABLE `ft_automation_past_campaign` (
  `id` int NOT NULL,
  `campaign_id` int DEFAULT NULL,
  `member_count` int DEFAULT NULL,
  `open` int DEFAULT '0',
  `clicks` int DEFAULT '0',
  `name` varchar(255) DEFAULT NULL,
  `member_type` enum('member','prime','All','') DEFAULT NULL,
  `member_activity` enum('All','Not listed','Never listed','Purchased','Commented','Made Offer','Listed','') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `category` int DEFAULT NULL,
  `subcategory` int DEFAULT NULL,
  `organic` tinyint(1) DEFAULT NULL,
  `baletype` varchar(40) DEFAULT NULL,
  `covering` varchar(40) DEFAULT NULL,
  `make_id` int DEFAULT NULL,
  `model_id` int DEFAULT NULL,
  `model_condition` enum('new','used','all','') DEFAULT NULL,
  `grain_type_id` int DEFAULT '0',
  `sold_as` enum('grain','seed','all','') DEFAULT NULL,
  `breed_id` int DEFAULT '0',
  `drop_year` varchar(20) DEFAULT NULL,
  `property_type` varchar(20) DEFAULT NULL,
  `keyword` varchar(255) DEFAULT NULL,
  `user_activity` enum('within','before','in between','') DEFAULT NULL,
  `days` int DEFAULT NULL,
  `state_id` int DEFAULT NULL,
  `district_id` int DEFAULT NULL,
  `suburb` varchar(30) DEFAULT NULL,
  `sending_method` varchar(255) DEFAULT NULL,
  `header_id` int DEFAULT NULL,
  `footer_id` int DEFAULT NULL,
  `email_template` int DEFAULT NULL,
  `header` text,
  `header_css` text,
  `email_subject` varchar(255) DEFAULT NULL,
  `footer` text,
  `footer_css` text,
  `email_body` text,
  `frequency` enum('once','repeat','') DEFAULT NULL,
  `time_trigger` enum('day','week','month','') DEFAULT NULL,
  `day` int DEFAULT NULL,
  `year` int DEFAULT NULL,
  `from_date` date DEFAULT NULL,
  `to_date` date DEFAULT NULL,
  `time` int DEFAULT NULL,
  `time_periods` enum('AM','PM','') DEFAULT NULL,
  `week_day` enum('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday','') DEFAULT NULL,
  `month` enum('January','February','March','April','May','June','July','August','September','October','November','December','') DEFAULT NULL,
  `status` int DEFAULT NULL,
  `sms_temp_id` int DEFAULT NULL,
  `sms_body` text,
  `app_temp_id` int DEFAULT NULL,
  `app_body` text,
  `campaign_start` date DEFAULT NULL,
  `campaign_end` date DEFAULT NULL,
  `business_tags` varchar(255) DEFAULT NULL,
  `seller_tags` varchar(255) DEFAULT NULL,
  `buyer_tags` varchar(255) DEFAULT NULL,
  `personality_tag` varchar(255) DEFAULT NULL,
  `campaign_code` varchar(255) DEFAULT NULL,
  `listing_group_1_header` varchar(200) DEFAULT NULL,
  `listing_group_2_header` varchar(200) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_automation_past_campaign_listing`
--

CREATE TABLE `ft_automation_past_campaign_listing` (
  `campaign_listing_id` int NOT NULL,
  `past_campaign_id` int NOT NULL,
  `listing_id` int NOT NULL,
  `listing_type_id` int NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_automation_past_campaign_members`
--

CREATE TABLE `ft_automation_past_campaign_members` (
  `id` int NOT NULL,
  `past_campaign_id` int DEFAULT NULL,
  `member_id` int DEFAULT NULL,
  `member_email` varchar(100) DEFAULT NULL,
  `member_status` varchar(100) DEFAULT NULL,
  `aws_email_response` varchar(100) DEFAULT NULL,
  `alert` int DEFAULT NULL,
  `alert_token` varchar(100) DEFAULT NULL,
  `newsletter` int DEFAULT NULL,
  `send_sms` int DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_automation_sms_template`
--

CREATE TABLE `ft_automation_sms_template` (
  `id` int NOT NULL,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `body` text,
  `is_active` enum('Yes','No') DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_automation_template`
--

CREATE TABLE `ft_automation_template` (
  `id` int NOT NULL,
  `hf_id` int DEFAULT NULL,
  `Name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `subject` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `body` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `is_active` enum('Yes','No') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_bid`
--

CREATE TABLE `ft_bid` (
  `bid_id` int NOT NULL,
  `listing_id` int NOT NULL,
  `owner_id` int NOT NULL,
  `member_id` int NOT NULL,
  `comment` text,
  `qty` int DEFAULT '0',
  `price` decimal(15,2) DEFAULT '0.00',
  `total` decimal(15,2) DEFAULT '0.00',
  `status` varchar(20) DEFAULT 'New',
  `staff_id` int DEFAULT '0',
  `owner_read` tinyint(1) DEFAULT '0',
  `admin_read` tinyint(1) DEFAULT '0',
  `member_read` tinyint(1) DEFAULT '0',
  `spotter` tinyint(1) DEFAULT '0',
  `dup` tinyint(1) DEFAULT '0',
  `deleted` tinyint(1) DEFAULT '0',
  `ft_id` varchar(32) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_breed`
--

CREATE TABLE `ft_breed` (
  `breed_id` int NOT NULL,
  `category_id` int NOT NULL DEFAULT '0',
  `subcategory_id` int DEFAULT '0',
  `name` varchar(80) NOT NULL,
  `slug` varchar(225) NOT NULL,
  `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `browser_title` varchar(225) NOT NULL,
  `meta_description` text NOT NULL,
  `heading` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_capsulecrm`
--

CREATE TABLE `ft_capsulecrm` (
  `capsulecrm_id` int NOT NULL,
  `member_id` int NOT NULL,
  `record_id` int NOT NULL DEFAULT '1',
  `organisation_id` varchar(20) NOT NULL,
  `phonenumber_id` varchar(20) NOT NULL,
  `address_id` varchar(20) NOT NULL,
  `emailaddress_id` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_catalogs`
--

CREATE TABLE `ft_catalogs` (
  `id` int NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `image` varchar(225) DEFAULT NULL,
  `status` int DEFAULT '3' COMMENT '1=active, 2=Finished, 3=Draft',
  `slug` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `created_on` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_catalogue_listings`
--

CREATE TABLE `ft_catalogue_listings` (
  `catalogue_listing_id` int NOT NULL,
  `listing_id` int DEFAULT NULL,
  `catalogue_id` int DEFAULT NULL,
  `lot_no` int DEFAULT NULL,
  `status` int DEFAULT NULL COMMENT '0-normal,1-primary,2-hide',
  `created_at` datetime DEFAULT NULL,
  `created_by` int DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_category`
--

CREATE TABLE `ft_category` (
  `category_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `description` text,
  `indexno` int DEFAULT '0',
  `paid_ad` tinyint(1) DEFAULT '0',
  `ad_price` decimal(10,2) DEFAULT '0.00',
  `ad_duration` int DEFAULT '0',
  `ask_price` tinyint(1) DEFAULT '1',
  `with_buysell` tinyint(1) DEFAULT '1',
  `gst_message` tinyint(1) DEFAULT '1',
  `price_opt` tinyint(1) DEFAULT '0',
  `kg_opt` tinyint(1) DEFAULT '0',
  `bale_opt` tinyint(1) DEFAULT '0',
  `browser_title` varchar(255) DEFAULT NULL,
  `meta_description` text,
  `meta_keywords` varchar(255) DEFAULT NULL,
  `price_range` text,
  `protein_range` text,
  `ndf_range` text,
  `me_range` text,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_delaypay_leads`
--

CREATE TABLE `ft_delaypay_leads` (
  `delaypay_leads_id` int NOT NULL,
  `member_id` int NOT NULL,
  `firstname` varchar(40) NOT NULL,
  `lastname` varchar(40) NOT NULL,
  `email` varchar(80) NOT NULL,
  `phone` varchar(10) NOT NULL,
  `requirement` text,
  `is_agree` int NOT NULL DEFAULT '0' COMMENT '0 for No 1 for Yes',
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_device`
--

CREATE TABLE `ft_device` (
  `device_id` int NOT NULL,
  `member_id` int DEFAULT '0',
  `device_token` varchar(255) DEFAULT NULL,
  `session_token` varchar(255) DEFAULT NULL,
  `platform` varchar(20) DEFAULT NULL,
  `udid` varchar(50) DEFAULT NULL,
  `status` int DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  `logout_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_district`
--

CREATE TABLE `ft_district` (
  `district_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `state_id` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_dropyear`
--

CREATE TABLE `ft_dropyear` (
  `dropyear_id` int NOT NULL,
  `breed_id` int DEFAULT '0',
  `name` varchar(80) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_emailsms_template`
--

CREATE TABLE `ft_emailsms_template` (
  `template_id` int NOT NULL,
  `type` enum('email','sms') DEFAULT 'email',
  `name` varchar(60) NOT NULL,
  `recipient` enum('','buyer','seller') DEFAULT '',
  `subject` varchar(200) DEFAULT NULL,
  `message` text NOT NULL,
  `notification_title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `notification_body` varchar(225) DEFAULT NULL,
  `notes` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_email_notification`
--

CREATE TABLE `ft_email_notification` (
  `emailnotification_id` int NOT NULL,
  `member_id` int NOT NULL,
  `category_id` int NOT NULL COMMENT 'if id is 9999 its only use for All category in email notification ',
  `subcategory_id` int NOT NULL COMMENT 'if id is 9999 its only use for All sub category in email notification ',
  `state_id` int NOT NULL COMMENT 'if state_id = 99 ,it is only use for email notification',
  `district_id` int NOT NULL COMMENT 'if district_id = 99 ,it is only use for email notification',
  `listing_type_id` tinyint NOT NULL DEFAULT '1' COMMENT '1:For Sale, 0:Wanted',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_favorite`
--

CREATE TABLE `ft_favorite` (
  `favorite_id` int NOT NULL,
  `member_id` int NOT NULL,
  `listing_id` int NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_ftle`
--

CREATE TABLE `ft_ftle` (
  `ftle_id` int NOT NULL,
  `listing_id` int DEFAULT NULL,
  `crossbreed` varchar(255) DEFAULT NULL,
  `listing_by` int DEFAULT '0' COMMENT '0 - default\r\n1 - Private\r\n2 - Registered Agent',
  `vendor_breed` enum('Yes','No','') DEFAULT NULL,
  `stock_own_for` varchar(255) DEFAULT NULL,
  `livestock_state` int DEFAULT NULL,
  `livestock_district` int DEFAULT NULL,
  `livestock_postcode` int DEFAULT NULL,
  `place_of_origin` varchar(255) DEFAULT NULL,
  `is_join` enum('Yes','No','') DEFAULT NULL,
  `joining_dts_qty` varchar(255) DEFAULT NULL,
  `medical_date_ramps` int DEFAULT NULL,
  `medical_date_bulls` int DEFAULT NULL,
  `breed_of_bull` int DEFAULT NULL,
  `breed_of_ram` int DEFAULT NULL,
  `is_preg` enum('Yes','No','') DEFAULT NULL,
  `by` varchar(255) DEFAULT NULL,
  `date_of_scan` date DEFAULT NULL,
  `multiple_single` varchar(255) DEFAULT NULL,
  `qty_multiple` int DEFAULT NULL,
  `qty_single` int DEFAULT NULL,
  `qty_empty` int DEFAULT NULL,
  `months_in_calf_lamb` int DEFAULT NULL,
  `month_in_calf_start` date DEFAULT NULL,
  `month_in_calf_finish` date DEFAULT NULL,
  `month_in_lamb_start` date DEFAULT NULL,
  `medical_treatments` text,
  `is_declare` varchar(255) DEFAULT NULL,
  `dob_dogs` date DEFAULT NULL,
  `vaccinated` enum('Yes','No','') DEFAULT 'No',
  `last_vacc_date` date DEFAULT NULL,
  `brn` varchar(20) DEFAULT NULL,
  `micro_chip_no` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `created_by` int DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_grain_type`
--

CREATE TABLE `ft_grain_type` (
  `grain_type_id` int NOT NULL,
  `subcategory_id` int DEFAULT '0',
  `name` varchar(80) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_invoice`
--

CREATE TABLE `ft_invoice` (
  `invoice_id` int NOT NULL,
  `sales_contract_id` int NOT NULL,
  `listing_id` int NOT NULL,
  `no` varchar(11) DEFAULT NULL,
  `date` date NOT NULL,
  `due_date` date DEFAULT NULL,
  `subtotal` decimal(15,2) DEFAULT '0.00',
  `taxamount` decimal(15,2) DEFAULT '0.00',
  `nettotal` decimal(15,2) DEFAULT '0.00',
  `paid` decimal(15,2) DEFAULT '0.00',
  `balance` decimal(15,2) DEFAULT '0.00',
  `status` enum('Draft','Pending','Partial','Paid','Overdue','Void') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'Draft',
  `txn_id` varchar(50) DEFAULT NULL,
  `bank_owner_name` text,
  `bsb` varchar(225) DEFAULT NULL,
  `acc` varchar(225) DEFAULT NULL,
  `payment_deposit` decimal(15,2) DEFAULT '0.00',
  `payment_method` varchar(100) DEFAULT NULL,
  `payment_term` varchar(50) DEFAULT NULL,
  `buyer_id` int NOT NULL,
  `buyer_company` text,
  `buyer_attn` varchar(255) DEFAULT NULL,
  `buyer_phone` varchar(20) DEFAULT NULL,
  `buyer_alternate_phone` varchar(20) DEFAULT NULL,
  `buyer_email` varchar(100) DEFAULT NULL,
  `buyer_address` text,
  `buyer_abn` varchar(20) DEFAULT NULL,
  `seller_id` int NOT NULL,
  `seller_company` text,
  `seller_attn` varchar(255) DEFAULT NULL,
  `seller_phone` varchar(20) DEFAULT NULL,
  `seller_alternate_phone` varchar(20) DEFAULT NULL,
  `seller_email` varchar(100) DEFAULT NULL,
  `seller_address` text,
  `seller_abn` varchar(20) DEFAULT NULL,
  `paid_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `staff_id` int NOT NULL DEFAULT '0',
  `updated_at` datetime DEFAULT NULL,
  `buyer_viewed_at` datetime DEFAULT NULL,
  `seller_viewed_at` datetime DEFAULT NULL,
  `email_token` varchar(128) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_invoice_item`
--

CREATE TABLE `ft_invoice_item` (
  `invoice_item_id` int NOT NULL,
  `invoice_id` int NOT NULL,
  `listing_id` int DEFAULT '0',
  `description` text,
  `qty` decimal(15,2) DEFAULT '1.00',
  `price` decimal(15,2) DEFAULT '0.00',
  `en_gst` enum('Yes','No') NOT NULL DEFAULT 'Yes',
  `total` decimal(15,2) DEFAULT '0.00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_listing`
--

CREATE TABLE `ft_listing` (
  `listing_id` int NOT NULL,
  `ft_id` varchar(32) DEFAULT NULL,
  `member_id` int NOT NULL,
  `profileimage_id` int DEFAULT '0',
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text,
  `link_1` varchar(100) DEFAULT NULL,
  `link_name_1` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `link_2` varchar(100) DEFAULT NULL,
  `link_name_2` varchar(100) DEFAULT NULL,
  `category_id` int NOT NULL,
  `subcategory_id` int NOT NULL,
  `address` varchar(100) DEFAULT NULL,
  `town` varchar(30) DEFAULT NULL,
  `state_id` int DEFAULT '0',
  `district_id` int DEFAULT '0',
  `suburb` varchar(30) DEFAULT NULL,
  `zipcode` varchar(10) DEFAULT NULL,
  `listing_type_id` int DEFAULT '1',
  `qty` int DEFAULT '0',
  `unit_price` decimal(15,2) DEFAULT '0.00',
  `total_price` decimal(15,2) DEFAULT '0.00',
  `price_is` varchar(15) DEFAULT NULL,
  `protein` decimal(10,2) DEFAULT '0.00',
  `me` decimal(10,2) DEFAULT '0.00',
  `ndf` decimal(10,2) DEFAULT '0.00',
  `organic` tinyint(1) DEFAULT '0',
  `baletype` varchar(40) DEFAULT NULL,
  `covering` varchar(40) DEFAULT NULL,
  `make_id` int DEFAULT '0',
  `make_other` varchar(80) DEFAULT NULL,
  `model_id` int DEFAULT '0',
  `model_other` varchar(80) DEFAULT NULL,
  `model_condition` enum('new','used','') DEFAULT '',
  `grain_type_id` int DEFAULT '0',
  `sold_as` enum('grain','seed','') DEFAULT '',
  `breed_id` int DEFAULT '0',
  `breed_other` varchar(80) DEFAULT NULL,
  `drop_year` varchar(20) DEFAULT NULL,
  `avg_live_weight` varchar(20) DEFAULT NULL,
  `property_type` varchar(20) DEFAULT NULL,
  `contact_name` varchar(80) DEFAULT NULL,
  `contact_email` varchar(80) DEFAULT NULL,
  `contact_phone` varchar(20) DEFAULT NULL,
  `contact_address` varchar(100) DEFAULT NULL,
  `show_contact` tinyint(1) DEFAULT '0',
  `videos` varchar(800) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `notes` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `status` varchar(20) DEFAULT 'Pending',
  `views_count` int DEFAULT '0',
  `by_admin` tinyint(1) DEFAULT '0',
  `featured` tinyint(1) DEFAULT '0',
  `under_auction` tinyint(1) DEFAULT '0',
  `auction_id` varchar(225) DEFAULT '0',
  `under_catalogue` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0-Not In catalogue, 1-In Catalogue',
  `catalog_id` int NOT NULL COMMENT 'Not in use',
  `catalog_status` int NOT NULL COMMENT 'Not in use 0-normal,1-primary,2-hide',
  `ap_url` varchar(255) DEFAULT NULL,
  `auctioned` tinyint(1) DEFAULT '0',
  `paid_listing` tinyint(1) DEFAULT '0',
  `order_id` int DEFAULT '0',
  `expiry_date` date DEFAULT NULL,
  `date_sold` datetime DEFAULT NULL,
  `hide_listing` tinyint(1) DEFAULT '0',
  `label` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `staff_id` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `approved_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `refreshed_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_listing_auction_activities`
--

CREATE TABLE `ft_listing_auction_activities` (
  `h_id` int NOT NULL,
  `listing_id` int DEFAULT NULL,
  `auction_id` int DEFAULT NULL,
  `amount` decimal(15,2) DEFAULT '0.00',
  `comments` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `created_on` datetime DEFAULT NULL,
  `created_by` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_listing_canonical`
--

CREATE TABLE `ft_listing_canonical` (
  `canonical_id` int NOT NULL,
  `listing_id` int NOT NULL,
  `canonical_url` varchar(225) NOT NULL,
  `isindex` int NOT NULL DEFAULT '0' COMMENT 'If 1 then show',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_listing_image`
--

CREATE TABLE `ft_listing_image` (
  `listing_image_id` int NOT NULL,
  `listing_id` int DEFAULT '0',
  `aws_id` varchar(32) DEFAULT NULL,
  `filename` varchar(100) DEFAULT NULL,
  `filetype` varchar(15) DEFAULT NULL,
  `primary_image` tinyint(1) DEFAULT '0',
  `old_ft` tinyint(1) DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_listing_log`
--

CREATE TABLE `ft_listing_log` (
  `listing_log_id` int NOT NULL,
  `listing_id` int NOT NULL DEFAULT '0',
  `logs` text NOT NULL,
  `staff_id` int NOT NULL DEFAULT '0' COMMENT 'if 0 then log by member',
  `member_id` int NOT NULL DEFAULT '0' COMMENT 'if 0 then log by staff',
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_listing_type`
--

CREATE TABLE `ft_listing_type` (
  `listing_type_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `listing_count` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_looper_billing_details`
--

CREATE TABLE `ft_looper_billing_details` (
  `looper_billing_id` int NOT NULL,
  `looper_order_id` int NOT NULL,
  `ll_firstname` varchar(50) NOT NULL,
  `ll_lastname` varchar(50) NOT NULL,
  `ll_business_name` varchar(100) NOT NULL,
  `ll_abn` varchar(50) NOT NULL,
  `ll_address` varchar(100) NOT NULL,
  `ll_suburb` varchar(50) NOT NULL,
  `ll_city` varchar(50) NOT NULL,
  `ll_state` varchar(50) NOT NULL,
  `ll_country` varchar(50) NOT NULL,
  `ll_pincode` varchar(10) NOT NULL,
  `ll_email` varchar(50) NOT NULL,
  `ll_mobile` bigint NOT NULL,
  `firstname` varchar(50) NOT NULL,
  `lastname` varchar(50) NOT NULL,
  `business_name` varchar(100) NOT NULL,
  `abn` varchar(50) NOT NULL,
  `address` varchar(100) NOT NULL,
  `suburb` varchar(50) NOT NULL,
  `city` varchar(50) NOT NULL,
  `state` varchar(50) NOT NULL,
  `country` varchar(50) NOT NULL,
  `pincode` varchar(10) NOT NULL,
  `email` varchar(50) NOT NULL,
  `mobile` bigint NOT NULL,
  `notes` varchar(150) NOT NULL,
  `created_at` datetime NOT NULL,
  `created_by` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_looper_items`
--

CREATE TABLE `ft_looper_items` (
  `looper_item_id` int NOT NULL,
  `looper_order_id` int NOT NULL,
  `item` tinyint NOT NULL COMMENT '1: Contractors Pack (pack of 8) , 2: Farmders friend (pack of 4)',
  `description` varchar(150) NOT NULL,
  `qty` int NOT NULL,
  `price` double NOT NULL,
  `total` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_looper_order`
--

CREATE TABLE `ft_looper_order` (
  `looper_order_id` int NOT NULL,
  `payment_type` varchar(50) NOT NULL,
  `unit_price` double NOT NULL,
  `qty` int NOT NULL,
  `subtotal` double NOT NULL,
  `taxamount` double NOT NULL,
  `shippingcharges` double NOT NULL,
  `nettotal` double NOT NULL,
  `status` varchar(50) NOT NULL COMMENT '1:Cretaed 2:Received 3:Dispatched 4:Deliverd',
  `txn_id` varchar(100) NOT NULL,
  `paid_on` datetime NOT NULL,
  `created_by` int NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_by` int NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_looper_shipping_details`
--

CREATE TABLE `ft_looper_shipping_details` (
  `looper_shipping_id` int NOT NULL,
  `looper_order_id` int NOT NULL,
  `biller_first_name` varchar(50) NOT NULL,
  `biller_last_name` varchar(50) NOT NULL,
  `biller_email` varchar(50) NOT NULL,
  `biller_phone` bigint NOT NULL,
  `biller_country` varchar(50) NOT NULL,
  `biller_state` varchar(50) NOT NULL,
  `biller_city` varchar(50) NOT NULL,
  `biller_address` varchar(150) NOT NULL,
  `biller_suburb` varchar(50) NOT NULL,
  `biller_zipcode` varchar(10) NOT NULL,
  `receipnt_first_name` varchar(50) NOT NULL,
  `receipnt_last_name` varchar(50) NOT NULL,
  `receipnt_email` varchar(50) NOT NULL,
  `receipnt_phone` varchar(20) NOT NULL,
  `receipnt_country` varchar(50) NOT NULL,
  `receipnt_state` varchar(50) NOT NULL,
  `receipnt_city` varchar(50) NOT NULL,
  `receipnt_address` varchar(150) NOT NULL,
  `receipnt_suburb` varchar(50) NOT NULL,
  `receipnt_zipcode` varchar(20) NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_mailchimp`
--

CREATE TABLE `ft_mailchimp` (
  `mailchimp_id` int NOT NULL,
  `member_id` int NOT NULL,
  `subscriber_hash_id` varchar(128) NOT NULL COMMENT 'The MD5 hash of the lowercase version of the list member''s email address.',
  `web_id` varchar(20) DEFAULT NULL,
  `mailchimp_status` varchar(20) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_make`
--

CREATE TABLE `ft_make` (
  `make_id` int NOT NULL,
  `category_id` int NOT NULL DEFAULT '0',
  `subcategory_id` int DEFAULT '0',
  `name` varchar(80) NOT NULL,
  `slug` varchar(225) NOT NULL,
  `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `models_count` int DEFAULT '0',
  `browser_title` varchar(225) NOT NULL,
  `meta_description` text NOT NULL,
  `heading` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_member`
--

CREATE TABLE `ft_member` (
  `member_id` int NOT NULL,
  `firstname` varchar(40) NOT NULL,
  `lastname` varchar(40) NOT NULL,
  `email` varchar(80) NOT NULL,
  `password` varchar(128) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `alternate_phone` varchar(20) DEFAULT NULL COMMENT 'ie Alternate Phone no',
  `address` varchar(100) DEFAULT NULL,
  `address_line2` varchar(100) DEFAULT NULL,
  `town` varchar(30) DEFAULT NULL,
  `state_id` int DEFAULT '0',
  `district_id` int DEFAULT '0',
  `suburb` varchar(30) DEFAULT NULL,
  `zipcode` varchar(10) DEFAULT NULL,
  `business_name` varchar(80) DEFAULT NULL,
  `abn` varchar(20) DEFAULT NULL,
  `ngr` varchar(20) DEFAULT NULL,
  `referral_id` int DEFAULT '0',
  `referral_info` varchar(40) DEFAULT NULL,
  `newsletter` tinyint(1) DEFAULT '0',
  `send_sms` tinyint(1) DEFAULT '1',
  `invoice_method` tinyint(1) DEFAULT '1',
  `alert` int DEFAULT '1',
  `alert_token` varchar(128) DEFAULT NULL,
  `app_reg_token` text,
  `staff_id` int DEFAULT '0',
  `status` varchar(20) DEFAULT 'unverified',
  `capsule_id` varchar(20) DEFAULT NULL,
  `confirmation_token` varchar(128) DEFAULT NULL,
  `confirmed_at` datetime DEFAULT NULL,
  `resetpassword_token` varchar(128) DEFAULT NULL,
  `resetpassword_sent_at` datetime DEFAULT NULL,
  `membership_id` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_member_log`
--

CREATE TABLE `ft_member_log` (
  `member_log_id` int NOT NULL,
  `log` varchar(100) NOT NULL COMMENT 'Changed member status',
  `staff_id` int NOT NULL COMMENT 'if not 0 then done entry by staff',
  `member_id` int NOT NULL COMMENT 'entry for this member and if staff 0 then done by this member(Self)',
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_member_prime`
--

CREATE TABLE `ft_member_prime` (
  `membership_id` int NOT NULL,
  `member_id` int NOT NULL,
  `order_id` int DEFAULT '0',
  `subscription_start` date DEFAULT NULL,
  `subscription_end` date DEFAULT NULL,
  `status` varchar(20) DEFAULT 'Pending',
  `rebill_id` varchar(15) DEFAULT NULL,
  `staff_id` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_message`
--

CREATE TABLE `ft_message` (
  `message_id` int NOT NULL,
  `parent_id` int DEFAULT '0',
  `listing_id` int NOT NULL,
  `member_id` int NOT NULL,
  `recipient_id` int DEFAULT '0',
  `comment` text NOT NULL,
  `opened` tinyint(1) DEFAULT '0',
  `status` varchar(20) DEFAULT 'New',
  `staff_id` int DEFAULT '0',
  `bid_id` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `created_by` int NOT NULL DEFAULT '0' COMMENT 'insert only if comment done my administrator'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_model`
--

CREATE TABLE `ft_model` (
  `model_id` int NOT NULL,
  `make_id` int DEFAULT '0',
  `name` varchar(80) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_newsletter_component`
--

CREATE TABLE `ft_newsletter_component` (
  `newsletter_component_id` int NOT NULL,
  `newsletter_id` int NOT NULL,
  `newcomponent_img` varchar(128) NOT NULL,
  `newcomponent_img_awsid` varchar(50) NOT NULL,
  `newcomponent_heading` varchar(128) NOT NULL,
  `newcomponent_bodytext` text NOT NULL,
  `new_component_delaypay` tinyint DEFAULT '0',
  `new_component_sponsor_banner` tinyint DEFAULT '0',
  `newcomponent_listing` varchar(50) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_newsletter_contacts`
--

CREATE TABLE `ft_newsletter_contacts` (
  `newsletter_contact_id` int NOT NULL,
  `newsletter_id` int NOT NULL,
  `staff_id` int NOT NULL,
  `staff_category_id` int NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_newsletter_generator`
--

CREATE TABLE `ft_newsletter_generator` (
  `newsletter_id` int NOT NULL,
  `newsletter_title` varchar(128) NOT NULL,
  `newsletter_description` text NOT NULL,
  `utm_source` varchar(50) NOT NULL,
  `utm_campaign` varchar(50) NOT NULL,
  `banner` varchar(128) NOT NULL,
  `banner_awsid` varchar(50) NOT NULL,
  `banner_heading` varchar(128) NOT NULL,
  `banner_bodytext` text NOT NULL,
  `banner_delaypay` tinyint NOT NULL DEFAULT '0',
  `delayPay_img` varchar(128) NOT NULL,
  `delayPay_awsid` varchar(50) NOT NULL,
  `sponsor_banner_id` int DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_newsletter_listing`
--

CREATE TABLE `ft_newsletter_listing` (
  `newsletter_listing_id` int NOT NULL,
  `newsletter_id` int NOT NULL,
  `listing_id` int NOT NULL,
  `listing_type_id` int NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_newsletter_sponsor_banner`
--

CREATE TABLE `ft_newsletter_sponsor_banner` (
  `sponsor_banner_id` int NOT NULL,
  `sponsor_name` varchar(252) NOT NULL,
  `aws_id` varchar(32) NOT NULL,
  `filename` varchar(100) NOT NULL,
  `filetype` varchar(15) NOT NULL,
  `sponsor_link` varchar(50) NOT NULL,
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '1: Active 0: Inactive',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_order`
--

CREATE TABLE `ft_order` (
  `order_id` int NOT NULL,
  `member_id` int NOT NULL,
  `order_type` enum('prime','listing') DEFAULT 'listing',
  `payment_type` enum('Credit Card','Bank Transfer') DEFAULT 'Credit Card',
  `subtotal` decimal(15,2) DEFAULT '0.00',
  `taxamount` decimal(15,2) DEFAULT '0.00',
  `nettotal` decimal(15,2) DEFAULT '0.00',
  `status` enum('Pending','Approved','Cancelled','') DEFAULT 'Pending',
  `txn_id` varchar(50) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_order_item`
--

CREATE TABLE `ft_order_item` (
  `order_item_id` int NOT NULL,
  `order_id` int NOT NULL,
  `listing_id` int DEFAULT '0',
  `description` text,
  `qty` int DEFAULT '1',
  `price` decimal(15,2) DEFAULT '0.00',
  `total` decimal(15,2) DEFAULT '0.00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_pac_category`
--

CREATE TABLE `ft_pac_category` (
  `pac_category_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `listings_count` int DEFAULT '0',
  `subcategories_count` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_pac_listing`
--

CREATE TABLE `ft_pac_listing` (
  `pac_listing_id` int NOT NULL,
  `pac_category_id` int DEFAULT '0',
  `pac_subcategory_id` int DEFAULT '0',
  `company_id` int DEFAULT '0',
  `member_id` int DEFAULT '0',
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text,
  `qty` int DEFAULT '0',
  `price` decimal(15,2) DEFAULT '0.00',
  `business_name` varchar(80) DEFAULT NULL,
  `product_code` varchar(80) DEFAULT NULL,
  `barcode` varchar(20) DEFAULT NULL,
  `qty_on_hand` int DEFAULT '0',
  `qty_on_order` int DEFAULT '0',
  `reorder_limit` int DEFAULT '0',
  `videos` varchar(200) DEFAULT NULL,
  `notes` varchar(250) DEFAULT NULL,
  `status` int DEFAULT '0' COMMENT '0=pending, 1=approved, 2=closed, 3=expired, 4=deleted',
  `views_count` int DEFAULT '0',
  `likes_count` int DEFAULT '0',
  `profileimage_id` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_pac_listing_image`
--

CREATE TABLE `ft_pac_listing_image` (
  `pac_listing_image_id` int NOT NULL,
  `pac_listing_id` int DEFAULT '0',
  `aws_id` varchar(32) DEFAULT NULL,
  `filename` varchar(100) DEFAULT NULL,
  `filetype` varchar(15) DEFAULT NULL,
  `primary_image` tinyint(1) DEFAULT '0',
  `old_ft` tinyint(1) DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_pac_page`
--

CREATE TABLE `ft_pac_page` (
  `pac_page_id` int NOT NULL,
  `page_content` text NOT NULL,
  `heading` varchar(225) NOT NULL,
  `filename` varchar(100) NOT NULL,
  `created_at` datetime NOT NULL,
  `visible` int NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_pac_subcategory`
--

CREATE TABLE `ft_pac_subcategory` (
  `pac_subcategory_id` int NOT NULL,
  `pac_category_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `listings_count` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_pagegenerator`
--

CREATE TABLE `ft_pagegenerator` (
  `pagegenerator_id` int NOT NULL,
  `heading` varchar(225) NOT NULL,
  `slug` varchar(225) NOT NULL,
  `canonical_url` varchar(225) NOT NULL,
  `listing_type_id` int NOT NULL,
  `category_id` int NOT NULL,
  `subcategory_id` int NOT NULL,
  `make_id` int NOT NULL,
  `breed_id` int NOT NULL,
  `model_id` int NOT NULL,
  `state_id` int NOT NULL,
  `district_id` int NOT NULL,
  `suburb_id` int NOT NULL,
  `description` text NOT NULL,
  `title` varchar(225) NOT NULL,
  `meta_description` text NOT NULL,
  `isindex` int NOT NULL DEFAULT '0' COMMENT 'If 1 then show',
  `keywords` varchar(225) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_post`
--

CREATE TABLE `ft_post` (
  `post_id` int NOT NULL,
  `ft_id` varchar(32) DEFAULT NULL,
  `post_category_id` int DEFAULT '0',
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `status` int DEFAULT '0' COMMENT '0=draft, 1=publish',
  `browser_title` varchar(255) DEFAULT NULL,
  `meta_keywords` varchar(255) DEFAULT NULL,
  `meta_description` text,
  `views_count` int DEFAULT '0',
  `likes_count` int DEFAULT '0',
  `require_login` tinyint(1) DEFAULT '0',
  `profileimage_id` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_postcode`
--

CREATE TABLE `ft_postcode` (
  `pcode_id` int NOT NULL,
  `state_id` int NOT NULL,
  `pcode` varchar(5) NOT NULL,
  `suburb` varchar(30) NOT NULL,
  `suburb_slug` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_post_category`
--

CREATE TABLE `ft_post_category` (
  `post_category_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `browser_title` varchar(255) DEFAULT NULL,
  `meta_description` text,
  `posts_count` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_post_image`
--

CREATE TABLE `ft_post_image` (
  `post_image_id` int NOT NULL,
  `post_id` int DEFAULT '0',
  `aws_id` varchar(32) DEFAULT NULL,
  `filename` varchar(100) DEFAULT NULL,
  `filetype` varchar(15) DEFAULT NULL,
  `primary_image` tinyint(1) DEFAULT '0',
  `old_ft` tinyint(1) DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_referral`
--

CREATE TABLE `ft_referral` (
  `referral_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `require_info` tinyint(1) DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_sales_contract`
--

CREATE TABLE `ft_sales_contract` (
  `sales_contract_id` int NOT NULL,
  `category_id` int NOT NULL,
  `listing_id` int NOT NULL,
  `seller_id` int NOT NULL,
  `buyer_id` int NOT NULL,
  `no` varchar(11) NOT NULL,
  `date` date NOT NULL,
  `expiry` date DEFAULT NULL,
  `qty` varchar(60) DEFAULT NULL,
  `price` decimal(15,2) DEFAULT '0.00',
  `gst` decimal(15,2) DEFAULT '0.00',
  `total_price` decimal(15,2) DEFAULT '0.00',
  `total_package` varchar(60) DEFAULT NULL,
  `apply_gst` tinyint(1) DEFAULT '1',
  `price_is` varchar(20) DEFAULT NULL,
  `details` int DEFAULT '0',
  `commodity` varchar(60) DEFAULT NULL,
  `spec` varchar(60) DEFAULT NULL,
  `variety` varchar(60) DEFAULT NULL,
  `season` varchar(60) DEFAULT NULL,
  `freight_rate` varchar(100) DEFAULT NULL,
  `distance` varchar(60) DEFAULT NULL,
  `gta_standard` tinyint(1) DEFAULT '0',
  `machine` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `make` varchar(40) DEFAULT NULL,
  `model` varchar(40) DEFAULT NULL,
  `year_of_build` varchar(20) DEFAULT NULL,
  `size` varchar(100) DEFAULT NULL,
  `colour` varchar(20) DEFAULT NULL,
  `serial_no` varchar(40) DEFAULT NULL,
  `livestock` varchar(60) DEFAULT NULL,
  `livestock_type` varchar(60) DEFAULT NULL,
  `buyer_attn` varchar(60) DEFAULT NULL,
  `seller_attn` varchar(60) DEFAULT NULL,
  `buyer_cc` varchar(250) DEFAULT NULL,
  `buyer_email_sent_at` datetime DEFAULT NULL,
  `buyer_status` varchar(20) DEFAULT NULL,
  `buyer_status_at` datetime DEFAULT NULL,
  `buyer_decline_reason` varchar(200) DEFAULT NULL,
  `seller_cc` varchar(255) DEFAULT NULL,
  `seller_email_sent_at` datetime DEFAULT NULL,
  `seller_status` varchar(20) DEFAULT NULL,
  `seller_status_at` datetime DEFAULT NULL,
  `email_sent_by` int DEFAULT NULL,
  `delivery_basis` varchar(50) DEFAULT NULL,
  `delivery_period` varchar(50) DEFAULT NULL,
  `pickup_point` varchar(50) DEFAULT NULL,
  `delivery_point` varchar(50) DEFAULT NULL,
  `pickup_contactdetails` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `delivered_weight` varchar(60) DEFAULT NULL,
  `freight_company` varchar(60) DEFAULT NULL,
  `please_invoice` varchar(100) DEFAULT NULL,
  `listing_type` varchar(20) DEFAULT NULL,
  `other_details` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `farmtender_fee` varchar(250) DEFAULT '',
  `payment_terms` varchar(250) DEFAULT NULL,
  `other_terms` text,
  `status` enum('Draft','Pending','Approved','Declined','Invoiced','Canceled') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'Draft',
  `invoice_id` int DEFAULT '0',
  `public_key` varchar(32) DEFAULT NULL,
  `staff_id` int NOT NULL,
  `sales_managers` varchar(100) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `buyer_viewed_at` datetime DEFAULT NULL,
  `seller_viewed_at` datetime DEFAULT NULL,
  `email_token` varchar(128) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_sales_contract_option`
--

CREATE TABLE `ft_sales_contract_option` (
  `option_id` int NOT NULL,
  `name` varchar(60) NOT NULL,
  `value` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `applicable_to` varchar(250) DEFAULT 'All',
  `indexno` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_sales_contract_signature`
--

CREATE TABLE `ft_sales_contract_signature` (
  `signature_id` int NOT NULL,
  `sales_contract_id` int NOT NULL,
  `buyer_name` varchar(60) DEFAULT NULL,
  `buyer_title` varchar(60) DEFAULT NULL,
  `buyer_signature` text,
  `seller_name` varchar(60) DEFAULT NULL,
  `seller_title` varchar(60) DEFAULT NULL,
  `seller_signature` text,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_searches`
--

CREATE TABLE `ft_searches` (
  `searches_id` int NOT NULL,
  `listing_id` int NOT NULL,
  `keywords` varchar(500) NOT NULL,
  `category_id` int NOT NULL,
  `sub_category_id` int NOT NULL,
  `state_id` int NOT NULL,
  `district_id` int NOT NULL,
  `created_at` datetime NOT NULL,
  `created_by` int NOT NULL,
  `updated_at` datetime NOT NULL,
  `updated_by` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_sell_type`
--

CREATE TABLE `ft_sell_type` (
  `sell_type_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_settings`
--

CREATE TABLE `ft_settings` (
  `settings_id` int NOT NULL,
  `noticeboard` tinyint(1) DEFAULT '1',
  `noticeboard_content` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_sms`
--

CREATE TABLE `ft_sms` (
  `sms_id` int NOT NULL,
  `message` text NOT NULL,
  `recipients` text NOT NULL,
  `type` varchar(50) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ft_staff`
--

CREATE TABLE `ft_staff` (
  `staff_id` int NOT NULL,
  `staff_category_id` int DEFAULT '0',
  `name` varchar(80) NOT NULL,
  `email` varchar(60) DEFAULT NULL,
  `password` varchar(128) DEFAULT NULL,
  `phone` varchar(60) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `is_primary` tinyint(1) DEFAULT '0',
  `on_leave` tinyint(1) DEFAULT '0',
  `admin_access` tinyint(1) DEFAULT '0',
  `visible` tinyint(1) DEFAULT '0',
  `leave_ft` int DEFAULT '0',
  `image` varchar(100) DEFAULT NULL,
  `mugshot` varchar(100) DEFAULT NULL,
  `staff_group` varchar(20) DEFAULT NULL,
  `resetpassword_token` varchar(128) DEFAULT NULL,
  `resetpassword_sent_at` datetime DEFAULT NULL,
  `current_login_at` datetime DEFAULT NULL,
  `current_login_ip` varchar(20) DEFAULT NULL,
  `last_login_at` datetime DEFAULT NULL,
  `last_login_ip` varchar(20) DEFAULT NULL,
  `indexno` int DEFAULT '0',
  `theme` varchar(10) DEFAULT 'dark',
  `sc_no` int NOT NULL DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_staff_category`
--

CREATE TABLE `ft_staff_category` (
  `staff_category_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `prio` tinyint(1) DEFAULT '0',
  `visible` tinyint(1) DEFAULT '0',
  `indexno` int DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_state`
--

CREATE TABLE `ft_state` (
  `state_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `district_count` int DEFAULT '0',
  `indexno` int DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_subcategory`
--

CREATE TABLE `ft_subcategory` (
  `subcategory_id` int NOT NULL,
  `category_id` int NOT NULL,
  `name` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `description` text,
  `indexno` int DEFAULT '0',
  `sheep_details` tinyint(1) DEFAULT '0',
  `breed_info` tinyint(1) DEFAULT '0',
  `makes_count` int DEFAULT '0',
  `breeds_count` int DEFAULT '0',
  `browser_title` varchar(255) DEFAULT NULL,
  `meta_description` text,
  `meta_keywords` varchar(255) DEFAULT NULL,
  `price_range` text,
  `protein_range` text,
  `ndf_range` text,
  `me_range` text,
  `ishide` int DEFAULT '1',
  `heading` varchar(100) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_tags`
--

CREATE TABLE `ft_tags` (
  `tag_id` int NOT NULL,
  `category_name` enum('Business','Seller','Buyer','Personality','') DEFAULT NULL,
  `tag_name` varchar(225) DEFAULT NULL,
  `status` enum('0','1','') DEFAULT '1' COMMENT '0-deactive 1-active',
  `created_at` datetime DEFAULT NULL,
  `created_by` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ft_url_shortener`
--

CREATE TABLE `ft_url_shortener` (
  `url_shortener_id` int NOT NULL,
  `listing_id` int NOT NULL COMMENT 'Listing Id',
  `url` varchar(225) NOT NULL COMMENT 'Shot Url Here',
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `ft_about_us`
--
ALTER TABLE `ft_about_us`
  ADD PRIMARY KEY (`about_us_id`);

--
-- Indexes for table `ft_account_notification`
--
ALTER TABLE `ft_account_notification`
  ADD PRIMARY KEY (`account_notification_id`);

--
-- Indexes for table `ft_ag_service`
--
ALTER TABLE `ft_ag_service`
  ADD PRIMARY KEY (`ag_service_id`);

--
-- Indexes for table `ft_ag_service_category`
--
ALTER TABLE `ft_ag_service_category`
  ADD PRIMARY KEY (`ag_service_category_id`),
  ADD KEY `name` (`name`);

--
-- Indexes for table `ft_ag_service_image`
--
ALTER TABLE `ft_ag_service_image`
  ADD PRIMARY KEY (`ag_service_image_id`);

--
-- Indexes for table `ft_ag_service_subcategory`
--
ALTER TABLE `ft_ag_service_subcategory`
  ADD PRIMARY KEY (`ag_service_subcategory_id`),
  ADD KEY `name` (`name`);

--
-- Indexes for table `ft_alerts`
--
ALTER TABLE `ft_alerts`
  ADD PRIMARY KEY (`alert_id`);

--
-- Indexes for table `ft_app_version`
--
ALTER TABLE `ft_app_version`
  ADD PRIMARY KEY (`app_version_id`);

--
-- Indexes for table `ft_article`
--
ALTER TABLE `ft_article`
  ADD PRIMARY KEY (`article_id`);

--
-- Indexes for table `ft_article_category`
--
ALTER TABLE `ft_article_category`
  ADD PRIMARY KEY (`article_category_id`);

--
-- Indexes for table `ft_article_image`
--
ALTER TABLE `ft_article_image`
  ADD PRIMARY KEY (`article_image_id`),
  ADD KEY `article_id` (`article_id`);

--
-- Indexes for table `ft_auction`
--
ALTER TABLE `ft_auction`
  ADD PRIMARY KEY (`auction_id`),
  ADD KEY `ends_at` (`ends_at`);

--
-- Indexes for table `ft_auction_image`
--
ALTER TABLE `ft_auction_image`
  ADD PRIMARY KEY (`auction_image_id`),
  ADD KEY `auction_id` (`auction_id`);

--
-- Indexes for table `ft_auction_listing`
--
ALTER TABLE `ft_auction_listing`
  ADD PRIMARY KEY (`auction_listing_id`);

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

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

--
-- Indexes for table `ft_automation_campaign_listing`
--
ALTER TABLE `ft_automation_campaign_listing`
  ADD PRIMARY KEY (`campaign_listing_id`);

--
-- Indexes for table `ft_automation_footer`
--
ALTER TABLE `ft_automation_footer`
  ADD PRIMARY KEY (`f_id`);

--
-- Indexes for table `ft_automation_header`
--
ALTER TABLE `ft_automation_header`
  ADD PRIMARY KEY (`hf_id`);

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

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

--
-- Indexes for table `ft_automation_past_campaign_listing`
--
ALTER TABLE `ft_automation_past_campaign_listing`
  ADD PRIMARY KEY (`campaign_listing_id`);

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

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

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

--
-- Indexes for table `ft_bid`
--
ALTER TABLE `ft_bid`
  ADD PRIMARY KEY (`bid_id`),
  ADD KEY `listing_id` (`listing_id`),
  ADD KEY `owner_id` (`owner_id`),
  ADD KEY `member_id` (`member_id`),
  ADD KEY `created_at` (`created_at`);

--
-- Indexes for table `ft_breed`
--
ALTER TABLE `ft_breed`
  ADD PRIMARY KEY (`breed_id`),
  ADD KEY `name` (`name`);

--
-- Indexes for table `ft_capsulecrm`
--
ALTER TABLE `ft_capsulecrm`
  ADD PRIMARY KEY (`capsulecrm_id`);

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

--
-- Indexes for table `ft_catalogue_listings`
--
ALTER TABLE `ft_catalogue_listings`
  ADD PRIMARY KEY (`catalogue_listing_id`);

--
-- Indexes for table `ft_category`
--
ALTER TABLE `ft_category`
  ADD PRIMARY KEY (`category_id`);

--
-- Indexes for table `ft_delaypay_leads`
--
ALTER TABLE `ft_delaypay_leads`
  ADD PRIMARY KEY (`delaypay_leads_id`);

--
-- Indexes for table `ft_device`
--
ALTER TABLE `ft_device`
  ADD PRIMARY KEY (`device_id`),
  ADD KEY `device_token` (`device_token`,`session_token`);

--
-- Indexes for table `ft_district`
--
ALTER TABLE `ft_district`
  ADD PRIMARY KEY (`district_id`),
  ADD KEY `slug` (`slug`);

--
-- Indexes for table `ft_dropyear`
--
ALTER TABLE `ft_dropyear`
  ADD PRIMARY KEY (`dropyear_id`),
  ADD KEY `breed_id` (`breed_id`);

--
-- Indexes for table `ft_emailsms_template`
--
ALTER TABLE `ft_emailsms_template`
  ADD PRIMARY KEY (`template_id`),
  ADD KEY `name` (`name`);

--
-- Indexes for table `ft_email_notification`
--
ALTER TABLE `ft_email_notification`
  ADD PRIMARY KEY (`emailnotification_id`);

--
-- Indexes for table `ft_favorite`
--
ALTER TABLE `ft_favorite`
  ADD PRIMARY KEY (`favorite_id`),
  ADD KEY `listing_id` (`listing_id`);

--
-- Indexes for table `ft_ftle`
--
ALTER TABLE `ft_ftle`
  ADD PRIMARY KEY (`ftle_id`);

--
-- Indexes for table `ft_grain_type`
--
ALTER TABLE `ft_grain_type`
  ADD PRIMARY KEY (`grain_type_id`);

--
-- Indexes for table `ft_invoice`
--
ALTER TABLE `ft_invoice`
  ADD PRIMARY KEY (`invoice_id`),
  ADD KEY `sales_contract_id` (`sales_contract_id`),
  ADD KEY `created_at` (`created_at`);

--
-- Indexes for table `ft_invoice_item`
--
ALTER TABLE `ft_invoice_item`
  ADD PRIMARY KEY (`invoice_item_id`);

--
-- Indexes for table `ft_listing`
--
ALTER TABLE `ft_listing`
  ADD PRIMARY KEY (`listing_id`),
  ADD KEY `refreshed_at` (`refreshed_at`),
  ADD KEY `member_id` (`member_id`);

--
-- Indexes for table `ft_listing_canonical`
--
ALTER TABLE `ft_listing_canonical`
  ADD PRIMARY KEY (`canonical_id`);

--
-- Indexes for table `ft_listing_image`
--
ALTER TABLE `ft_listing_image`
  ADD PRIMARY KEY (`listing_image_id`),
  ADD KEY `listing_id` (`listing_id`);

--
-- Indexes for table `ft_listing_log`
--
ALTER TABLE `ft_listing_log`
  ADD PRIMARY KEY (`listing_log_id`);

--
-- Indexes for table `ft_listing_type`
--
ALTER TABLE `ft_listing_type`
  ADD PRIMARY KEY (`listing_type_id`);

--
-- Indexes for table `ft_looper_billing_details`
--
ALTER TABLE `ft_looper_billing_details`
  ADD PRIMARY KEY (`looper_billing_id`);

--
-- Indexes for table `ft_looper_items`
--
ALTER TABLE `ft_looper_items`
  ADD PRIMARY KEY (`looper_item_id`);

--
-- Indexes for table `ft_looper_order`
--
ALTER TABLE `ft_looper_order`
  ADD PRIMARY KEY (`looper_order_id`);

--
-- Indexes for table `ft_looper_shipping_details`
--
ALTER TABLE `ft_looper_shipping_details`
  ADD PRIMARY KEY (`looper_shipping_id`);

--
-- Indexes for table `ft_mailchimp`
--
ALTER TABLE `ft_mailchimp`
  ADD PRIMARY KEY (`mailchimp_id`);

--
-- Indexes for table `ft_make`
--
ALTER TABLE `ft_make`
  ADD PRIMARY KEY (`make_id`),
  ADD KEY `subcategory_id` (`subcategory_id`),
  ADD KEY `name` (`name`);

--
-- Indexes for table `ft_member`
--
ALTER TABLE `ft_member`
  ADD PRIMARY KEY (`member_id`),
  ADD UNIQUE KEY `email` (`email`),
  ADD KEY `confirmation_token` (`confirmation_token`),
  ADD KEY `resetpassword_token` (`resetpassword_token`);

--
-- Indexes for table `ft_member_log`
--
ALTER TABLE `ft_member_log`
  ADD PRIMARY KEY (`member_log_id`);

--
-- Indexes for table `ft_member_prime`
--
ALTER TABLE `ft_member_prime`
  ADD PRIMARY KEY (`membership_id`);

--
-- Indexes for table `ft_message`
--
ALTER TABLE `ft_message`
  ADD PRIMARY KEY (`message_id`),
  ADD KEY `listing_id` (`listing_id`),
  ADD KEY `member_id` (`member_id`),
  ADD KEY `recipient_id` (`recipient_id`),
  ADD KEY `created_at` (`created_at`);

--
-- Indexes for table `ft_model`
--
ALTER TABLE `ft_model`
  ADD PRIMARY KEY (`model_id`),
  ADD KEY `make_id` (`make_id`),
  ADD KEY `make_id_2` (`make_id`),
  ADD KEY `name` (`name`);

--
-- Indexes for table `ft_newsletter_component`
--
ALTER TABLE `ft_newsletter_component`
  ADD PRIMARY KEY (`newsletter_component_id`);

--
-- Indexes for table `ft_newsletter_contacts`
--
ALTER TABLE `ft_newsletter_contacts`
  ADD PRIMARY KEY (`newsletter_contact_id`);

--
-- Indexes for table `ft_newsletter_generator`
--
ALTER TABLE `ft_newsletter_generator`
  ADD PRIMARY KEY (`newsletter_id`);

--
-- Indexes for table `ft_newsletter_listing`
--
ALTER TABLE `ft_newsletter_listing`
  ADD PRIMARY KEY (`newsletter_listing_id`);

--
-- Indexes for table `ft_newsletter_sponsor_banner`
--
ALTER TABLE `ft_newsletter_sponsor_banner`
  ADD PRIMARY KEY (`sponsor_banner_id`);

--
-- Indexes for table `ft_order`
--
ALTER TABLE `ft_order`
  ADD PRIMARY KEY (`order_id`);

--
-- Indexes for table `ft_order_item`
--
ALTER TABLE `ft_order_item`
  ADD PRIMARY KEY (`order_item_id`);

--
-- Indexes for table `ft_pac_category`
--
ALTER TABLE `ft_pac_category`
  ADD PRIMARY KEY (`pac_category_id`);

--
-- Indexes for table `ft_pac_listing`
--
ALTER TABLE `ft_pac_listing`
  ADD PRIMARY KEY (`pac_listing_id`),
  ADD KEY `created_at` (`created_at`),
  ADD KEY `pac_category_id` (`pac_category_id`),
  ADD KEY `pac_subcategory_id` (`pac_subcategory_id`);

--
-- Indexes for table `ft_pac_listing_image`
--
ALTER TABLE `ft_pac_listing_image`
  ADD PRIMARY KEY (`pac_listing_image_id`),
  ADD KEY `pac_listing_id` (`pac_listing_id`);

--
-- Indexes for table `ft_pac_page`
--
ALTER TABLE `ft_pac_page`
  ADD PRIMARY KEY (`pac_page_id`);

--
-- Indexes for table `ft_pac_subcategory`
--
ALTER TABLE `ft_pac_subcategory`
  ADD PRIMARY KEY (`pac_subcategory_id`);

--
-- Indexes for table `ft_pagegenerator`
--
ALTER TABLE `ft_pagegenerator`
  ADD PRIMARY KEY (`pagegenerator_id`);

--
-- Indexes for table `ft_post`
--
ALTER TABLE `ft_post`
  ADD PRIMARY KEY (`post_id`);

--
-- Indexes for table `ft_postcode`
--
ALTER TABLE `ft_postcode`
  ADD PRIMARY KEY (`pcode_id`),
  ADD KEY `pcode` (`pcode`);

--
-- Indexes for table `ft_post_category`
--
ALTER TABLE `ft_post_category`
  ADD PRIMARY KEY (`post_category_id`);

--
-- Indexes for table `ft_post_image`
--
ALTER TABLE `ft_post_image`
  ADD PRIMARY KEY (`post_image_id`),
  ADD KEY `post_id` (`post_id`);

--
-- Indexes for table `ft_referral`
--
ALTER TABLE `ft_referral`
  ADD PRIMARY KEY (`referral_id`);

--
-- Indexes for table `ft_sales_contract`
--
ALTER TABLE `ft_sales_contract`
  ADD PRIMARY KEY (`sales_contract_id`),
  ADD KEY `no` (`no`),
  ADD KEY `date` (`date`);

--
-- Indexes for table `ft_sales_contract_option`
--
ALTER TABLE `ft_sales_contract_option`
  ADD PRIMARY KEY (`option_id`);

--
-- Indexes for table `ft_sales_contract_signature`
--
ALTER TABLE `ft_sales_contract_signature`
  ADD PRIMARY KEY (`signature_id`);

--
-- Indexes for table `ft_searches`
--
ALTER TABLE `ft_searches`
  ADD PRIMARY KEY (`searches_id`);
ALTER TABLE `ft_searches` ADD FULLTEXT KEY `keywords` (`keywords`);

--
-- Indexes for table `ft_sell_type`
--
ALTER TABLE `ft_sell_type`
  ADD PRIMARY KEY (`sell_type_id`);

--
-- Indexes for table `ft_settings`
--
ALTER TABLE `ft_settings`
  ADD PRIMARY KEY (`settings_id`);

--
-- Indexes for table `ft_sms`
--
ALTER TABLE `ft_sms`
  ADD PRIMARY KEY (`sms_id`);

--
-- Indexes for table `ft_staff`
--
ALTER TABLE `ft_staff`
  ADD PRIMARY KEY (`staff_id`),
  ADD KEY `email` (`email`),
  ADD KEY `resetpassword_token` (`resetpassword_token`);

--
-- Indexes for table `ft_staff_category`
--
ALTER TABLE `ft_staff_category`
  ADD PRIMARY KEY (`staff_category_id`);

--
-- Indexes for table `ft_state`
--
ALTER TABLE `ft_state`
  ADD PRIMARY KEY (`state_id`),
  ADD KEY `slug` (`slug`);

--
-- Indexes for table `ft_subcategory`
--
ALTER TABLE `ft_subcategory`
  ADD PRIMARY KEY (`subcategory_id`);

--
-- Indexes for table `ft_tags`
--
ALTER TABLE `ft_tags`
  ADD PRIMARY KEY (`tag_id`);

--
-- Indexes for table `ft_url_shortener`
--
ALTER TABLE `ft_url_shortener`
  ADD PRIMARY KEY (`url_shortener_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `ft_about_us`
--
ALTER TABLE `ft_about_us`
  MODIFY `about_us_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_account_notification`
--
ALTER TABLE `ft_account_notification`
  MODIFY `account_notification_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_ag_service`
--
ALTER TABLE `ft_ag_service`
  MODIFY `ag_service_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_ag_service_category`
--
ALTER TABLE `ft_ag_service_category`
  MODIFY `ag_service_category_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_ag_service_image`
--
ALTER TABLE `ft_ag_service_image`
  MODIFY `ag_service_image_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_ag_service_subcategory`
--
ALTER TABLE `ft_ag_service_subcategory`
  MODIFY `ag_service_subcategory_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_alerts`
--
ALTER TABLE `ft_alerts`
  MODIFY `alert_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_app_version`
--
ALTER TABLE `ft_app_version`
  MODIFY `app_version_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_article`
--
ALTER TABLE `ft_article`
  MODIFY `article_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_article_category`
--
ALTER TABLE `ft_article_category`
  MODIFY `article_category_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_article_image`
--
ALTER TABLE `ft_article_image`
  MODIFY `article_image_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_auction`
--
ALTER TABLE `ft_auction`
  MODIFY `auction_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_auction_image`
--
ALTER TABLE `ft_auction_image`
  MODIFY `auction_image_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_auction_listing`
--
ALTER TABLE `ft_auction_listing`
  MODIFY `auction_listing_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_automation_app_template`
--
ALTER TABLE `ft_automation_app_template`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_automation_campaign`
--
ALTER TABLE `ft_automation_campaign`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_automation_campaign_listing`
--
ALTER TABLE `ft_automation_campaign_listing`
  MODIFY `campaign_listing_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_automation_footer`
--
ALTER TABLE `ft_automation_footer`
  MODIFY `f_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_automation_header`
--
ALTER TABLE `ft_automation_header`
  MODIFY `hf_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_automation_member_tags`
--
ALTER TABLE `ft_automation_member_tags`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_automation_past_campaign`
--
ALTER TABLE `ft_automation_past_campaign`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_automation_past_campaign_listing`
--
ALTER TABLE `ft_automation_past_campaign_listing`
  MODIFY `campaign_listing_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_automation_past_campaign_members`
--
ALTER TABLE `ft_automation_past_campaign_members`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_automation_sms_template`
--
ALTER TABLE `ft_automation_sms_template`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_automation_template`
--
ALTER TABLE `ft_automation_template`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_bid`
--
ALTER TABLE `ft_bid`
  MODIFY `bid_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_breed`
--
ALTER TABLE `ft_breed`
  MODIFY `breed_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_capsulecrm`
--
ALTER TABLE `ft_capsulecrm`
  MODIFY `capsulecrm_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_catalogs`
--
ALTER TABLE `ft_catalogs`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_catalogue_listings`
--
ALTER TABLE `ft_catalogue_listings`
  MODIFY `catalogue_listing_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_category`
--
ALTER TABLE `ft_category`
  MODIFY `category_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_delaypay_leads`
--
ALTER TABLE `ft_delaypay_leads`
  MODIFY `delaypay_leads_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_device`
--
ALTER TABLE `ft_device`
  MODIFY `device_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_district`
--
ALTER TABLE `ft_district`
  MODIFY `district_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_dropyear`
--
ALTER TABLE `ft_dropyear`
  MODIFY `dropyear_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_emailsms_template`
--
ALTER TABLE `ft_emailsms_template`
  MODIFY `template_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_email_notification`
--
ALTER TABLE `ft_email_notification`
  MODIFY `emailnotification_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_favorite`
--
ALTER TABLE `ft_favorite`
  MODIFY `favorite_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_ftle`
--
ALTER TABLE `ft_ftle`
  MODIFY `ftle_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_grain_type`
--
ALTER TABLE `ft_grain_type`
  MODIFY `grain_type_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_invoice`
--
ALTER TABLE `ft_invoice`
  MODIFY `invoice_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_invoice_item`
--
ALTER TABLE `ft_invoice_item`
  MODIFY `invoice_item_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_listing`
--
ALTER TABLE `ft_listing`
  MODIFY `listing_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_listing_canonical`
--
ALTER TABLE `ft_listing_canonical`
  MODIFY `canonical_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_listing_image`
--
ALTER TABLE `ft_listing_image`
  MODIFY `listing_image_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_listing_log`
--
ALTER TABLE `ft_listing_log`
  MODIFY `listing_log_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_listing_type`
--
ALTER TABLE `ft_listing_type`
  MODIFY `listing_type_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_looper_billing_details`
--
ALTER TABLE `ft_looper_billing_details`
  MODIFY `looper_billing_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_looper_items`
--
ALTER TABLE `ft_looper_items`
  MODIFY `looper_item_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_looper_order`
--
ALTER TABLE `ft_looper_order`
  MODIFY `looper_order_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_looper_shipping_details`
--
ALTER TABLE `ft_looper_shipping_details`
  MODIFY `looper_shipping_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_mailchimp`
--
ALTER TABLE `ft_mailchimp`
  MODIFY `mailchimp_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_make`
--
ALTER TABLE `ft_make`
  MODIFY `make_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_member`
--
ALTER TABLE `ft_member`
  MODIFY `member_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_member_log`
--
ALTER TABLE `ft_member_log`
  MODIFY `member_log_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_member_prime`
--
ALTER TABLE `ft_member_prime`
  MODIFY `membership_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_message`
--
ALTER TABLE `ft_message`
  MODIFY `message_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_model`
--
ALTER TABLE `ft_model`
  MODIFY `model_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_newsletter_component`
--
ALTER TABLE `ft_newsletter_component`
  MODIFY `newsletter_component_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_newsletter_contacts`
--
ALTER TABLE `ft_newsletter_contacts`
  MODIFY `newsletter_contact_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_newsletter_generator`
--
ALTER TABLE `ft_newsletter_generator`
  MODIFY `newsletter_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_newsletter_listing`
--
ALTER TABLE `ft_newsletter_listing`
  MODIFY `newsletter_listing_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_newsletter_sponsor_banner`
--
ALTER TABLE `ft_newsletter_sponsor_banner`
  MODIFY `sponsor_banner_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_order`
--
ALTER TABLE `ft_order`
  MODIFY `order_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_order_item`
--
ALTER TABLE `ft_order_item`
  MODIFY `order_item_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_pac_category`
--
ALTER TABLE `ft_pac_category`
  MODIFY `pac_category_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_pac_listing`
--
ALTER TABLE `ft_pac_listing`
  MODIFY `pac_listing_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_pac_listing_image`
--
ALTER TABLE `ft_pac_listing_image`
  MODIFY `pac_listing_image_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_pac_page`
--
ALTER TABLE `ft_pac_page`
  MODIFY `pac_page_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_pac_subcategory`
--
ALTER TABLE `ft_pac_subcategory`
  MODIFY `pac_subcategory_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_pagegenerator`
--
ALTER TABLE `ft_pagegenerator`
  MODIFY `pagegenerator_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_post`
--
ALTER TABLE `ft_post`
  MODIFY `post_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_postcode`
--
ALTER TABLE `ft_postcode`
  MODIFY `pcode_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_post_category`
--
ALTER TABLE `ft_post_category`
  MODIFY `post_category_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_post_image`
--
ALTER TABLE `ft_post_image`
  MODIFY `post_image_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_referral`
--
ALTER TABLE `ft_referral`
  MODIFY `referral_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_sales_contract`
--
ALTER TABLE `ft_sales_contract`
  MODIFY `sales_contract_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_sales_contract_option`
--
ALTER TABLE `ft_sales_contract_option`
  MODIFY `option_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_sales_contract_signature`
--
ALTER TABLE `ft_sales_contract_signature`
  MODIFY `signature_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_searches`
--
ALTER TABLE `ft_searches`
  MODIFY `searches_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_sell_type`
--
ALTER TABLE `ft_sell_type`
  MODIFY `sell_type_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_settings`
--
ALTER TABLE `ft_settings`
  MODIFY `settings_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_sms`
--
ALTER TABLE `ft_sms`
  MODIFY `sms_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_staff`
--
ALTER TABLE `ft_staff`
  MODIFY `staff_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_staff_category`
--
ALTER TABLE `ft_staff_category`
  MODIFY `staff_category_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_state`
--
ALTER TABLE `ft_state`
  MODIFY `state_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_subcategory`
--
ALTER TABLE `ft_subcategory`
  MODIFY `subcategory_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_tags`
--
ALTER TABLE `ft_tags`
  MODIFY `tag_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ft_url_shortener`
--
ALTER TABLE `ft_url_shortener`
  MODIFY `url_shortener_id` int NOT NULL AUTO_INCREMENT;
COMMIT;

