-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Tempo de geração: 30-Set-2025 às 10:48
-- Versão do servidor: 11.4.8-MariaDB
-- versão do PHP: 8.4.11

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 */;

--
-- Base de dados: `donam_donamarmita`
--

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

--
-- Estrutura da tabela `about`
--

DROP TABLE IF EXISTS `about`;
CREATE TABLE `about` (
  `about_id` int(11) NOT NULL DEFAULT 1,
  `about_search_pt` varchar(600) NOT NULL DEFAULT '',
  `about_search_en` varchar(600) NOT NULL DEFAULT '',
  `about_search_es` varchar(600) NOT NULL DEFAULT '',
  `about_search_fr` varchar(600) NOT NULL DEFAULT '',
  `about_search_img` varchar(30) NOT NULL DEFAULT '',
  `about_delivery_pt` varchar(6000) NOT NULL DEFAULT '',
  `about_delivery_en` varchar(6000) NOT NULL DEFAULT '',
  `about_delivery_es` varchar(6000) NOT NULL DEFAULT '',
  `about_delivery_fr` varchar(6000) NOT NULL DEFAULT '',
  `about_delivery_img` varchar(30) NOT NULL DEFAULT '',
  `about_prepare_pt` varchar(6000) NOT NULL,
  `about_prepare_en` varchar(6000) NOT NULL,
  `about_prepare_es` varchar(6000) NOT NULL,
  `about_prepare_fr` varchar(6000) NOT NULL,
  `about_prepare_img` varchar(30) NOT NULL,
  `about_shop_pt` varchar(600) NOT NULL DEFAULT '',
  `about_shop_en` varchar(600) NOT NULL DEFAULT '',
  `about_shop_es` varchar(600) NOT NULL DEFAULT '',
  `about_shop_img` varchar(30) NOT NULL DEFAULT '',
  `about_partner_pt` varchar(600) NOT NULL DEFAULT '',
  `about_partner_en` varchar(600) NOT NULL DEFAULT '',
  `about_partner_es` varchar(600) NOT NULL DEFAULT '',
  `about_partner_url` varchar(100) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `address`
--

DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
  `add_id` int(10) UNSIGNED NOT NULL,
  `add_cliid` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `add_address1` varchar(80) NOT NULL DEFAULT '',
  `add_address2` varchar(80) NOT NULL DEFAULT '',
  `add_city` varchar(50) NOT NULL DEFAULT '',
  `add_zipcode` varchar(9) NOT NULL DEFAULT '0000-000',
  `add_district` varchar(50) NOT NULL DEFAULT '',
  `add_shicid` varchar(3) NOT NULL DEFAULT '',
  `add_invoice` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `banner`
--

DROP TABLE IF EXISTS `banner`;
CREATE TABLE `banner` (
  `ban_id` int(10) UNSIGNED NOT NULL,
  `ban_img` varchar(30) NOT NULL DEFAULT '',
  `ban_imgmb` varchar(30) NOT NULL DEFAULT '',
  `ban_description01_pt` varchar(100) NOT NULL DEFAULT '',
  `ban_description02_pt` varchar(100) NOT NULL DEFAULT '',
  `ban_description01_en` varchar(100) NOT NULL DEFAULT '',
  `ban_description02_en` varchar(100) NOT NULL DEFAULT '',
  `ban_description01_es` varchar(100) NOT NULL DEFAULT '',
  `ban_description02_es` varchar(100) NOT NULL DEFAULT '',
  `ban_description01_fr` varchar(100) NOT NULL DEFAULT '',
  `ban_description02_fr` varchar(100) NOT NULL DEFAULT '',
  `ban_video` varchar(100) NOT NULL DEFAULT '',
  `ban_link` varchar(100) NOT NULL DEFAULT '',
  `ban_type` varchar(1) NOT NULL DEFAULT '',
  `ban_visible` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `cartproducts`
--

DROP TABLE IF EXISTS `cartproducts`;
CREATE TABLE `cartproducts` (
  `carp_id` varchar(50) NOT NULL,
  `carp_cliid` int(11) NOT NULL DEFAULT 0,
  `carp_packid` int(10) UNSIGNED NOT NULL,
  `carp_prodid` int(11) NOT NULL,
  `carp_typemealid` int(11) NOT NULL DEFAULT 0,
  `carp_unitprice` decimal(10,4) NOT NULL DEFAULT 0.0000,
  `carp_qt` int(11) NOT NULL,
  `carp_date` datetime DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `cartproductsitems`
--

DROP TABLE IF EXISTS `cartproductsitems`;
CREATE TABLE `cartproductsitems` (
  `cpi_id` varchar(50) NOT NULL,
  `cpi_cliid` int(11) NOT NULL DEFAULT 0,
  `cpi_packid` int(10) UNSIGNED NOT NULL,
  `cpi_prodid` int(11) NOT NULL,
  `cpi_typemealid` int(11) NOT NULL,
  `cpi_dishid` int(11) NOT NULL,
  `cpi_qt` int(11) NOT NULL,
  `cpi_ref` varchar(10) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `category`
--

DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
  `cat_id` int(10) UNSIGNED NOT NULL,
  `cat_type` enum('Pack','Sopa','Sobremesa','Sumo','Voucher') NOT NULL DEFAULT 'Pack',
  `cat_moloni_id` int(11) NOT NULL DEFAULT 0,
  `cat_scid` int(11) NOT NULL DEFAULT 0,
  `cat_description_pt` varchar(50) NOT NULL DEFAULT '',
  `cat_description_en` varchar(50) NOT NULL DEFAULT '',
  `cat_description_es` varchar(50) NOT NULL DEFAULT '',
  `cat_description_fr` varchar(50) NOT NULL DEFAULT '',
  `cat_img` varchar(30) NOT NULL DEFAULT 'cat_img.jpg',
  `cat_imghp` varchar(30) NOT NULL DEFAULT 'cat_imghp.jpg',
  `cat_imgmb` varchar(30) NOT NULL DEFAULT 'cat_imgmb.jpg',
  `cat_info_pt` varchar(30) NOT NULL DEFAULT '',
  `cat_info_en` varchar(30) NOT NULL DEFAULT '',
  `cat_info_es` varchar(30) NOT NULL DEFAULT '',
  `cat_info_fr` varchar(30) NOT NULL DEFAULT '',
  `cat_flyer` int(11) NOT NULL DEFAULT 1,
  `cat_qtmeals` int(11) NOT NULL DEFAULT 0,
  `cat_level` int(11) NOT NULL DEFAULT 1,
  `cat_order` int(11) NOT NULL DEFAULT 1,
  `cat_visible` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `client`
--

DROP TABLE IF EXISTS `client`;
CREATE TABLE `client` (
  `cli_id` int(10) UNSIGNED NOT NULL,
  `cli_moloniid` int(11) NOT NULL DEFAULT 0,
  `cli_facebookid` varchar(30) NOT NULL DEFAULT '',
  `cli_firstname` varchar(50) NOT NULL DEFAULT '',
  `cli_lastname` varchar(50) NOT NULL DEFAULT '',
  `cli_avatar` varchar(32) NOT NULL DEFAULT '',
  `cli_nif` int(11) NOT NULL,
  `cli_pwd` varchar(50) NOT NULL DEFAULT '',
  `cli_email` varchar(50) NOT NULL DEFAULT '',
  `cli_datebirth` date DEFAULT NULL,
  `cli_registrationdate` datetime NOT NULL,
  `cli_lastlogindate` datetime NOT NULL DEFAULT current_timestamp(),
  `cli_phone` varchar(32) NOT NULL DEFAULT '',
  `cli_letter` tinyint(1) NOT NULL DEFAULT 0,
  `cli_status` tinyint(1) NOT NULL DEFAULT 0,
  `cli_discount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `cli_recovercode` int(11) NOT NULL DEFAULT 0,
  `cli_recovertimestamp` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `clientnewsletter`
--

DROP TABLE IF EXISTS `clientnewsletter`;
CREATE TABLE `clientnewsletter` (
  `cnl_id` int(11) NOT NULL,
  `cnl_email` varchar(50) NOT NULL,
  `cnl_status` tinyint(1) NOT NULL DEFAULT 1,
  `cnl_registrationdate` datetime NOT NULL DEFAULT current_timestamp(),
  `cnl_updated` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `clientorder`
--

DROP TABLE IF EXISTS `clientorder`;
CREATE TABLE `clientorder` (
  `ord_id` int(10) UNSIGNED NOT NULL,
  `ord_cliid` int(11) UNSIGNED NOT NULL DEFAULT 0,
  `ord_moloni_id` int(11) NOT NULL DEFAULT 0,
  `ord_date` datetime DEFAULT NULL,
  `ord_update` datetime NOT NULL,
  `ord_status` enum('Nova','Confirmada','Paga','Enviada','Concluida','Cancelada') NOT NULL DEFAULT 'Nova',
  `ord_numLastOrders` int(11) DEFAULT 0,
  `ord_totalOrders` decimal(10,2) DEFAULT 0.00,
  `ord_numTotalDishes` int(11) DEFAULT 0,
  `ord_memo` varchar(255) NOT NULL DEFAULT '',
  `ord_expedition_firstname` varchar(50) NOT NULL DEFAULT '',
  `ord_expedition_lastname` varchar(50) NOT NULL DEFAULT '',
  `ord_expedition_email` varchar(100) NOT NULL,
  `ord_expedition_phone` varchar(32) NOT NULL DEFAULT '',
  `ord_expedition_nif` int(11) NOT NULL,
  `ord_expedition_shic` int(11) NOT NULL DEFAULT 0,
  `ord_expedition_district` varchar(32) NOT NULL DEFAULT '',
  `ord_expedition_city` varchar(100) NOT NULL DEFAULT '',
  `ord_expedition_address1` varchar(100) NOT NULL DEFAULT '',
  `ord_expedition_address2` varchar(100) NOT NULL DEFAULT '',
  `ord_expedition_zipcode` varchar(10) NOT NULL DEFAULT '',
  `ord_expedition_product_cost` decimal(5,2) DEFAULT 0.00,
  `ord_expedition_cost` decimal(5,2) DEFAULT 0.00,
  `ord_expedition_cost1` decimal(5,2) DEFAULT 0.00,
  `ord_payment_firstname` varchar(50) NOT NULL,
  `ord_payment_lastname` varchar(50) NOT NULL,
  `ord_payment_shic` int(11) NOT NULL DEFAULT 0,
  `ord_payment_district` varchar(32) NOT NULL DEFAULT '',
  `ord_payment_city` varchar(100) NOT NULL DEFAULT '',
  `ord_payment_address1` varchar(100) NOT NULL DEFAULT '',
  `ord_payment_address2` varchar(100) NOT NULL DEFAULT '',
  `ord_payment_zipcode` varchar(10) NOT NULL DEFAULT '',
  `ord_formpayment` int(11) NOT NULL,
  `ord_payrate` decimal(5,2) DEFAULT 0.00,
  `ord_coupondiscount` decimal(5,2) DEFAULT 0.00,
  `ord_transportdiscount` decimal(5,2) NOT NULL DEFAULT 0.00,
  `ord_tracking` varchar(50) NOT NULL DEFAULT '',
  `ord_clientdiscount` decimal(5,2) NOT NULL DEFAULT 0.00,
  `ord_notifyisdone` tinyint(1) NOT NULL DEFAULT 0,
  `ord_pickupinstore` tinyint(1) NOT NULL DEFAULT 0,
  `ord_notes` varchar(30) NOT NULL DEFAULT '',
  `ord_invoicepdf` varchar(255) NOT NULL DEFAULT '',
  `ord_cannotchange` tinyint(1) NOT NULL DEFAULT 0,
  `ord_guidedpd` varchar(40) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `clienttemp`
--

DROP TABLE IF EXISTS `clienttemp`;
CREATE TABLE `clienttemp` (
  `cli_session` varchar(40) NOT NULL,
  `cli_id` int(11) DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `dish`
--

DROP TABLE IF EXISTS `dish`;
CREATE TABLE `dish` (
  `dis_id` int(11) NOT NULL,
  `dis_name_pt` varchar(255) NOT NULL,
  `dis_name_en` varchar(255) NOT NULL,
  `dis_name_es` varchar(255) NOT NULL,
  `dis_name_fr` varchar(255) NOT NULL,
  `dis_description_pt` varchar(255) NOT NULL DEFAULT '',
  `dis_description_en` varchar(255) NOT NULL DEFAULT '',
  `dis_description_es` varchar(255) NOT NULL DEFAULT '',
  `dis_description_fr` varchar(255) NOT NULL DEFAULT '',
  `dis_img` varchar(30) NOT NULL,
  `dis_visible` tinyint(1) NOT NULL,
  `dis_type` enum('Normal','Vegetariano') NOT NULL DEFAULT 'Normal',
  `dis_information` varchar(100) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `exportedemails`
--

DROP TABLE IF EXISTS `exportedemails`;
CREATE TABLE `exportedemails` (
  `exp_id` int(11) NOT NULL,
  `exp_email` varchar(255) NOT NULL,
  `exp_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `faq`
--

DROP TABLE IF EXISTS `faq`;
CREATE TABLE `faq` (
  `faq_id` int(10) UNSIGNED NOT NULL,
  `faq_description_pt` varchar(50) NOT NULL DEFAULT '',
  `faq_description_en` varchar(50) NOT NULL DEFAULT '',
  `faq_description_es` varchar(50) NOT NULL DEFAULT '',
  `faq_sort` int(11) NOT NULL DEFAULT 1,
  `faq_visible` tinyint(1) NOT NULL DEFAULT 1,
  `faq_scid` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `faq_questions`
--

DROP TABLE IF EXISTS `faq_questions`;
CREATE TABLE `faq_questions` (
  `que_id` int(10) UNSIGNED NOT NULL,
  `que_faqid` int(11) NOT NULL DEFAULT 0,
  `que_description_pt` varchar(200) NOT NULL DEFAULT '',
  `que_description_en` varchar(200) NOT NULL DEFAULT '',
  `que_description_es` varchar(200) NOT NULL DEFAULT '',
  `que_file_pt` varchar(30) NOT NULL DEFAULT '',
  `que_file_en` varchar(30) NOT NULL DEFAULT '',
  `que_file_es` varchar(30) NOT NULL DEFAULT '',
  `que_sort` int(11) NOT NULL DEFAULT 1,
  `que_visible` tinyint(1) NOT NULL DEFAULT 1,
  `que_scid` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `finalorder`
--

DROP TABLE IF EXISTS `finalorder`;
CREATE TABLE `finalorder` (
  `fin_id` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `fin_proid` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `fin_packid` int(11) NOT NULL DEFAULT 0,
  `fin_typemealid` int(11) NOT NULL,
  `fin_unitprice` decimal(10,4) DEFAULT 0.0000,
  `fin_qt` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `fin_date` datetime DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `formpayment`
--

DROP TABLE IF EXISTS `formpayment`;
CREATE TABLE `formpayment` (
  `for_id` int(10) UNSIGNED NOT NULL,
  `for_description_pt` varchar(50) NOT NULL DEFAULT '',
  `for_description_en` varchar(50) NOT NULL DEFAULT '',
  `for_description_es` varchar(50) NOT NULL DEFAULT '',
  `for_flatrate` decimal(5,2) NOT NULL DEFAULT 0.00,
  `for_percentagerate` decimal(5,2) NOT NULL DEFAULT 0.00,
  `for_visible` tinyint(1) NOT NULL DEFAULT 1,
  `for_img` varchar(30) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

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

--
-- Estrutura da tabela `menu`
--

DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
  `men_id` int(11) NOT NULL,
  `men_description_pt` varchar(160) NOT NULL,
  `men_description_en` varchar(160) NOT NULL,
  `men_description_es` varchar(160) NOT NULL,
  `men_description_fr` varchar(160) NOT NULL,
  `men_img` varchar(30) DEFAULT NULL,
  `men_visible` tinyint(1) NOT NULL,
  `men_data` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `menudishes`
--

DROP TABLE IF EXISTS `menudishes`;
CREATE TABLE `menudishes` (
  `mend_menid` int(11) NOT NULL,
  `mend_disid` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `orderitems`
--

DROP TABLE IF EXISTS `orderitems`;
CREATE TABLE `orderitems` (
  `foi_id` varchar(50) NOT NULL,
  `foi_packid` int(10) UNSIGNED NOT NULL,
  `foi_prodid` int(11) NOT NULL,
  `foi_typemealid` int(11) NOT NULL,
  `foi_dishid` int(11) NOT NULL,
  `foi_qty` int(11) NOT NULL,
  `foi_ref` varchar(10) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `prodtypemeal`
--

DROP TABLE IF EXISTS `prodtypemeal`;
CREATE TABLE `prodtypemeal` (
  `protm_proid` int(11) NOT NULL,
  `protm_typid` int(11) NOT NULL,
  `protm_cost` decimal(10,2) NOT NULL DEFAULT 0.00,
  `protm_moloni_id` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `product`
--

DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
  `pro_id` int(10) UNSIGNED NOT NULL,
  `pro_slug` varchar(100) NOT NULL DEFAULT '',
  `pro_description_pt` varchar(50) NOT NULL DEFAULT '',
  `pro_description_en` varchar(50) NOT NULL DEFAULT '',
  `pro_description_es` varchar(50) NOT NULL DEFAULT '',
  `pro_description_fr` varchar(50) NOT NULL DEFAULT '',
  `pro_info_pt` varchar(30) NOT NULL DEFAULT '',
  `pro_info_en` varchar(30) NOT NULL DEFAULT '',
  `pro_info_es` varchar(30) NOT NULL DEFAULT '',
  `pro_info_fr` varchar(30) NOT NULL DEFAULT '',
  `pro_catid` int(11) NOT NULL,
  `pro_img` varchar(30) NOT NULL DEFAULT 'pro_img.jpg',
  `pro_type` enum('Normal','Vegetariano') NOT NULL DEFAULT 'Normal',
  `pro_vatrateid` int(11) NOT NULL DEFAULT 0,
  `pro_highlight` tinyint(1) NOT NULL DEFAULT 0,
  `pro_created` datetime NOT NULL DEFAULT current_timestamp(),
  `pro_updated` datetime NOT NULL DEFAULT current_timestamp(),
  `pro_visible` tinyint(1) NOT NULL DEFAULT 1,
  `pro_delete` tinyint(1) NOT NULL DEFAULT 0,
  `pro_transexp` int(11) NOT NULL DEFAULT 0,
  `pro_tags_pt` varchar(255) NOT NULL DEFAULT '',
  `pro_tags_en` varchar(255) NOT NULL DEFAULT '',
  `pro_tags_es` varchar(255) NOT NULL DEFAULT '',
  `pro_tags_fr` varchar(255) NOT NULL DEFAULT '',
  `pro_views` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `productcost`
--

DROP TABLE IF EXISTS `productcost`;
CREATE TABLE `productcost` (
  `pro_id` int(11) NOT NULL,
  `pro_prid` int(10) UNSIGNED NOT NULL,
  `pro_purchaseprice` decimal(10,2) NOT NULL DEFAULT 0.00,
  `pro_profit` decimal(10,2) NOT NULL DEFAULT 0.00,
  `pro_saleprice` decimal(10,2) NOT NULL DEFAULT 0.00,
  `pro_promotion` tinyint(1) NOT NULL DEFAULT 0,
  `pro_pricepromotion` decimal(10,2) NOT NULL DEFAULT 0.00,
  `pro_promotionstarts` datetime NOT NULL DEFAULT current_timestamp(),
  `pro_promotionends` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `shippingcountries`
--

DROP TABLE IF EXISTS `shippingcountries`;
CREATE TABLE `shippingcountries` (
  `shic_id` int(10) UNSIGNED NOT NULL,
  `shic_description_pt` varchar(50) NOT NULL DEFAULT '',
  `shic_description_en` varchar(50) NOT NULL DEFAULT '',
  `shic_description_es` varchar(50) NOT NULL DEFAULT '',
  `shic_acronym` varchar(3) NOT NULL DEFAULT '',
  `shic_visible` tinyint(1) NOT NULL DEFAULT 1,
  `shic_freeshipping` decimal(5,0) NOT NULL DEFAULT 99999,
  `shic_tabid` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `system`
--

DROP TABLE IF EXISTS `system`;
CREATE TABLE `system` (
  `sys_id` int(10) UNSIGNED NOT NULL,
  `sys_name` varchar(30) NOT NULL DEFAULT '',
  `sys_address` varchar(50) NOT NULL DEFAULT '',
  `sys_postalcode` varchar(9) NOT NULL DEFAULT '0000-000',
  `sys_nif` int(11) NOT NULL DEFAULT 0,
  `sys_phone` varchar(15) NOT NULL DEFAULT '',
  `sys_fax` varchar(15) NOT NULL DEFAULT '',
  `sys_email` varchar(50) NOT NULL DEFAULT '',
  `sys_user` varchar(15) NOT NULL DEFAULT '',
  `sys_password` varchar(33) NOT NULL DEFAULT '',
  `sys_paypal` varchar(50) NOT NULL DEFAULT '',
  `sys_url` varchar(50) NOT NULL DEFAULT '',
  `sys_tpage` varchar(50) NOT NULL DEFAULT '',
  `sys_slogan` varchar(50) NOT NULL DEFAULT '',
  `sys_iva` decimal(4,2) NOT NULL DEFAULT 0.23,
  `sys_avatar` varchar(30) NOT NULL DEFAULT '',
  `sys_recovercode` int(11) NOT NULL DEFAULT 0,
  `sys_recovertimestamp` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `team`
--

DROP TABLE IF EXISTS `team`;
CREATE TABLE `team` (
  `team_id` int(11) NOT NULL,
  `team_name` varchar(100) NOT NULL DEFAULT '',
  `team_aboutid` tinyint(1) NOT NULL DEFAULT 1,
  `team_office` varchar(100) NOT NULL DEFAULT '',
  `team_facebook` varchar(255) NOT NULL DEFAULT '',
  `team_instagram` varchar(255) NOT NULL DEFAULT '',
  `team_linkedin` varchar(255) NOT NULL DEFAULT '',
  `team_email` varchar(100) NOT NULL DEFAULT '',
  `team_avatar` varchar(30) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `testimonials`
--

DROP TABLE IF EXISTS `testimonials`;
CREATE TABLE `testimonials` (
  `tes_id` int(11) NOT NULL,
  `tes_cliid` int(11) NOT NULL,
  `tes_text` varchar(250) NOT NULL DEFAULT '',
  `tes_stars` int(11) NOT NULL DEFAULT 5,
  `tes_visible` tinyint(1) NOT NULL DEFAULT 0,
  `tes_date` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `ticket`
--

DROP TABLE IF EXISTS `ticket`;
CREATE TABLE `ticket` (
  `tic_id` int(11) NOT NULL,
  `tic_cliid` int(11) NOT NULL,
  `tic_subject` varchar(25) NOT NULL DEFAULT '',
  `tic_dtsubmitted` datetime NOT NULL DEFAULT '1979-12-30 00:00:00',
  `tic_dtupdate` datetime NOT NULL DEFAULT '1979-12-30 00:00:00',
  `tic_type` tinyint(1) NOT NULL DEFAULT 0,
  `tic_priority` tinyint(1) NOT NULL DEFAULT 0,
  `tic_status` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `ticketinfo`
--

DROP TABLE IF EXISTS `ticketinfo`;
CREATE TABLE `ticketinfo` (
  `tic_infoid` int(11) NOT NULL,
  `tic_ticid` int(11) NOT NULL,
  `tic_auth` varchar(50) NOT NULL DEFAULT '',
  `tic_info` varchar(40) NOT NULL DEFAULT '',
  `tic_dtupdate` datetime NOT NULL DEFAULT '1971-01-01 00:00:00',
  `tic_admavatar` varchar(30) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `typemeal`
--

DROP TABLE IF EXISTS `typemeal`;
CREATE TABLE `typemeal` (
  `typ_id` int(11) NOT NULL,
  `typ_description_pt` varchar(60) NOT NULL,
  `typ_description_en` varchar(60) NOT NULL,
  `typ_description_es` varchar(60) NOT NULL,
  `typ_description_fr` varchar(60) NOT NULL,
  `typ_img` varchar(30) NOT NULL,
  `typ_visible` tinyint(1) NOT NULL,
  `typ_sort` int(11) NOT NULL DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `users`
--

DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `ip` varchar(40) NOT NULL DEFAULT '',
  `city` varchar(50) NOT NULL DEFAULT '',
  `country` varchar(50) NOT NULL DEFAULT '',
  `country_code` varchar(5) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `users_browsers`
--

DROP TABLE IF EXISTS `users_browsers`;
CREATE TABLE `users_browsers` (
  `id` int(11) NOT NULL,
  `ip` varchar(40) NOT NULL DEFAULT '',
  `browser` varchar(50) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `users_online`
--

DROP TABLE IF EXISTS `users_online`;
CREATE TABLE `users_online` (
  `timestamp` int(11) NOT NULL DEFAULT 0,
  `ip` varchar(40) NOT NULL DEFAULT '',
  `city` varchar(50) NOT NULL,
  `country` varchar(50) NOT NULL,
  `country_code` varchar(5) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `users_search`
--

DROP TABLE IF EXISTS `users_search`;
CREATE TABLE `users_search` (
  `id` int(11) NOT NULL,
  `ip` varchar(40) NOT NULL DEFAULT '',
  `page` varchar(100) NOT NULL DEFAULT '',
  `nvisual` int(11) NOT NULL DEFAULT 0,
  `search` varchar(100) NOT NULL DEFAULT '',
  `search_engine` varchar(50) NOT NULL DEFAULT '',
  `data_visita` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `vatrate`
--

DROP TABLE IF EXISTS `vatrate`;
CREATE TABLE `vatrate` (
  `tax_id` int(11) NOT NULL,
  `tax_name` varchar(60) NOT NULL DEFAULT '',
  `tax_value` decimal(10,2) NOT NULL DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura da tabela `voucher`
--

DROP TABLE IF EXISTS `voucher`;
CREATE TABLE `voucher` (
  `vou_id` int(11) NOT NULL,
  `vou_cliid` int(11) NOT NULL,
  `vou_ordid` int(11) NOT NULL DEFAULT 0,
  `vou_code` varchar(30) NOT NULL DEFAULT '',
  `vou_amount` decimal(5,2) NOT NULL DEFAULT 0.00,
  `vou_startdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `vou_enddate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `vou_used` tinyint(1) NOT NULL DEFAULT 0,
  `vou_cli` tinyint(1) NOT NULL DEFAULT 0,
  `vou_higher` decimal(10,2) NOT NULL DEFAULT 0.00,
  `vou_delete` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Estrutura da tabela `voucherusedby`
--

DROP TABLE IF EXISTS `voucherusedby`;
CREATE TABLE `voucherusedby` (
  `vub_id` int(11) NOT NULL,
  `vub_useremail` varchar(100) NOT NULL,
  `vub_dtused` datetime NOT NULL DEFAULT current_timestamp(),
  `vub_order` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Índices para tabelas despejadas
--

--
-- Índices para tabela `about`
--
ALTER TABLE `about`
  ADD PRIMARY KEY (`about_id`);

--
-- Índices para tabela `address`
--
ALTER TABLE `address`
  ADD PRIMARY KEY (`add_id`,`add_cliid`);

--
-- Índices para tabela `banner`
--
ALTER TABLE `banner`
  ADD PRIMARY KEY (`ban_id`);

--
-- Índices para tabela `cartproducts`
--
ALTER TABLE `cartproducts`
  ADD PRIMARY KEY (`carp_id`,`carp_packid`,`carp_prodid`,`carp_typemealid`);

--
-- Índices para tabela `cartproductsitems`
--
ALTER TABLE `cartproductsitems`
  ADD PRIMARY KEY (`cpi_id`,`cpi_packid`,`cpi_prodid`,`cpi_typemealid`,`cpi_dishid`);

--
-- Índices para tabela `category`
--
ALTER TABLE `category`
  ADD PRIMARY KEY (`cat_id`);

--
-- Índices para tabela `client`
--
ALTER TABLE `client`
  ADD PRIMARY KEY (`cli_id`);

--
-- Índices para tabela `clientnewsletter`
--
ALTER TABLE `clientnewsletter`
  ADD PRIMARY KEY (`cnl_id`);

--
-- Índices para tabela `clientorder`
--
ALTER TABLE `clientorder`
  ADD PRIMARY KEY (`ord_id`);

--
-- Índices para tabela `clienttemp`
--
ALTER TABLE `clienttemp`
  ADD PRIMARY KEY (`cli_session`);

--
-- Índices para tabela `dish`
--
ALTER TABLE `dish`
  ADD PRIMARY KEY (`dis_id`);

--
-- Índices para tabela `exportedemails`
--
ALTER TABLE `exportedemails`
  ADD PRIMARY KEY (`exp_id`),
  ADD UNIQUE KEY `exp_email` (`exp_email`);

--
-- Índices para tabela `faq`
--
ALTER TABLE `faq`
  ADD PRIMARY KEY (`faq_id`);

--
-- Índices para tabela `faq_questions`
--
ALTER TABLE `faq_questions`
  ADD PRIMARY KEY (`que_id`);

--
-- Índices para tabela `finalorder`
--
ALTER TABLE `finalorder`
  ADD PRIMARY KEY (`fin_id`,`fin_proid`,`fin_packid`,`fin_typemealid`);

--
-- Índices para tabela `formpayment`
--
ALTER TABLE `formpayment`
  ADD PRIMARY KEY (`for_id`);

--
-- Índices para tabela `menu`
--
ALTER TABLE `menu`
  ADD PRIMARY KEY (`men_id`);

--
-- Índices para tabela `menudishes`
--
ALTER TABLE `menudishes`
  ADD PRIMARY KEY (`mend_menid`,`mend_disid`);

--
-- Índices para tabela `orderitems`
--
ALTER TABLE `orderitems`
  ADD PRIMARY KEY (`foi_id`,`foi_packid`,`foi_prodid`,`foi_typemealid`,`foi_dishid`);

--
-- Índices para tabela `prodtypemeal`
--
ALTER TABLE `prodtypemeal`
  ADD PRIMARY KEY (`protm_proid`,`protm_typid`);

--
-- Índices para tabela `product`
--
ALTER TABLE `product`
  ADD PRIMARY KEY (`pro_id`) USING BTREE;

--
-- Índices para tabela `productcost`
--
ALTER TABLE `productcost`
  ADD PRIMARY KEY (`pro_id`,`pro_prid`),
  ADD KEY `pro_id` (`pro_id`),
  ADD KEY `pro_prid` (`pro_prid`),
  ADD KEY `pro_pvp` (`pro_saleprice`);

--
-- Índices para tabela `shippingcountries`
--
ALTER TABLE `shippingcountries`
  ADD PRIMARY KEY (`shic_id`);

--
-- Índices para tabela `system`
--
ALTER TABLE `system`
  ADD PRIMARY KEY (`sys_id`);

--
-- Índices para tabela `team`
--
ALTER TABLE `team`
  ADD PRIMARY KEY (`team_id`,`team_aboutid`);

--
-- Índices para tabela `testimonials`
--
ALTER TABLE `testimonials`
  ADD PRIMARY KEY (`tes_id`);

--
-- Índices para tabela `ticket`
--
ALTER TABLE `ticket`
  ADD PRIMARY KEY (`tic_id`,`tic_cliid`);

--
-- Índices para tabela `ticketinfo`
--
ALTER TABLE `ticketinfo`
  ADD PRIMARY KEY (`tic_infoid`,`tic_ticid`);

--
-- Índices para tabela `typemeal`
--
ALTER TABLE `typemeal`
  ADD PRIMARY KEY (`typ_id`);

--
-- Índices para tabela `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`ip`),
  ADD KEY `ip` (`ip`),
  ADD KEY `ip_2` (`ip`,`city`);

--
-- Índices para tabela `users_browsers`
--
ALTER TABLE `users_browsers`
  ADD PRIMARY KEY (`id`);

--
-- Índices para tabela `users_online`
--
ALTER TABLE `users_online`
  ADD PRIMARY KEY (`ip`);

--
-- Índices para tabela `users_search`
--
ALTER TABLE `users_search`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id` (`id`),
  ADD KEY `ip` (`ip`),
  ADD KEY `page` (`page`),
  ADD KEY `search` (`search`);

--
-- Índices para tabela `vatrate`
--
ALTER TABLE `vatrate`
  ADD PRIMARY KEY (`tax_id`);

--
-- Índices para tabela `voucher`
--
ALTER TABLE `voucher`
  ADD PRIMARY KEY (`vou_id`,`vou_cliid`),
  ADD UNIQUE KEY `vou_id` (`vou_id`,`vou_cliid`,`vou_code`),
  ADD KEY `vou_ordid` (`vou_ordid`);

--
-- Índices para tabela `voucherusedby`
--
ALTER TABLE `voucherusedby`
  ADD PRIMARY KEY (`vub_id`,`vub_useremail`);

--
-- AUTO_INCREMENT de tabelas despejadas
--

--
-- AUTO_INCREMENT de tabela `address`
--
ALTER TABLE `address`
  MODIFY `add_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `banner`
--
ALTER TABLE `banner`
  MODIFY `ban_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `category`
--
ALTER TABLE `category`
  MODIFY `cat_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `client`
--
ALTER TABLE `client`
  MODIFY `cli_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `clientnewsletter`
--
ALTER TABLE `clientnewsletter`
  MODIFY `cnl_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `clientorder`
--
ALTER TABLE `clientorder`
  MODIFY `ord_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `dish`
--
ALTER TABLE `dish`
  MODIFY `dis_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `exportedemails`
--
ALTER TABLE `exportedemails`
  MODIFY `exp_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `faq`
--
ALTER TABLE `faq`
  MODIFY `faq_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `faq_questions`
--
ALTER TABLE `faq_questions`
  MODIFY `que_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `formpayment`
--
ALTER TABLE `formpayment`
  MODIFY `for_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `menu`
--
ALTER TABLE `menu`
  MODIFY `men_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `product`
--
ALTER TABLE `product`
  MODIFY `pro_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `productcost`
--
ALTER TABLE `productcost`
  MODIFY `pro_prid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `shippingcountries`
--
ALTER TABLE `shippingcountries`
  MODIFY `shic_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `team`
--
ALTER TABLE `team`
  MODIFY `team_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `testimonials`
--
ALTER TABLE `testimonials`
  MODIFY `tes_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `ticket`
--
ALTER TABLE `ticket`
  MODIFY `tic_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `ticketinfo`
--
ALTER TABLE `ticketinfo`
  MODIFY `tic_infoid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `typemeal`
--
ALTER TABLE `typemeal`
  MODIFY `typ_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `users_browsers`
--
ALTER TABLE `users_browsers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `users_search`
--
ALTER TABLE `users_search`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `voucher`
--
ALTER TABLE `voucher`
  MODIFY `vou_id` int(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 */;
