-- http://www.phpmyadmin.net
--




--
-- Database: `dbshop`
--
CREATE DATABASE IF NOT EXISTS `dbshop` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `dbshop`;

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

--
--Table structure for table `tdistributer`
  --

CREATE TABLE IF NOT EXISTS `tdistributer` (
  `distributer_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `distributer_ime` varchar(255) NOT NULL,
  `distributer_titula` varchar(255) NOT NULL,
  PRIMARY KEY (`distributer_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `tdistributer`
--

INSERT INTO `tdistributer` (`distributer_id`, `distributer_ime`, `distributer_titula`) VALUES
(1, 'Martina Stojanovska', 'VIP'),
(2, 'Natalija Ilievska', 'Standard'),
(3, 'Stefanija Stefkovska', 'Pocetnik'),
(4, 'Stefan Dimitrov', 'Standard'),
(5, 'Elena Mitreva', 'Pocetnik');

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

--
-- Table structure for table `tinvoice`
--

CREATE TABLE IF NOT EXISTS `tinvoice` (
  `invoice_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `invoice_create_ts` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `invoice_total` float NOT NULL,
  `invoice_status` smallint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`invoice_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;

--
-- Dumping data for table `tinvoice`
--

INSERT INTO `tinvoice` (`invoice_id`, `user_id`, `invoice_create_ts`, `invoice_total`, `invoice_status`) VALUES
(8, 1, '2014-04-21 23:07:41', 2088, 0),
(9, 2, '2014-04-21 23:10:46', 5450, 1),
(10, 2, '2014-04-21 23:11:07', 1000, 0),
(11, 3, '2014-04-21 23:12:05', 7200, 0),
(12, 4, '2014-04-21 23:13:05', 220, 0),
(13, 5, '2014-04-21 23:14:06', 3520, 0),
(14, 3, '2014-04-21 23:29:09', 990, 0),
(15, 4, '2014-04-23 21:02:22', 730, 0),
(16, 4, '2014-04-23 22:47:23', 2630, 0);

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

--
-- Table structure for table `tinvoiceproduct`
--

CREATE TABLE IF NOT EXISTS `tinvoiceproduct` (
  `ip_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `invoice_id` int(11) NOT NULL,
  `proizvod_id` int(11) NOT NULL,
  `ip_quantity` int(11) NOT NULL,
  `ip_unit_price` int(11) NOT NULL,
  PRIMARY KEY (`ip_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=57 ;

--
-- Dumping data for table `tinvoiceproduct`
--

INSERT INTO `tinvoiceproduct` (`ip_id`, `invoice_id`, `proizvod_id`, `ip_quantity`, `ip_unit_price`) VALUES
(25, 8, 23, 1, 990),
(26, 8, 31, 1, 250),
(27, 8, 24, 2, 249),
(28, 8, 35, 1, 350),
(29, 9, 34, 1, 260),
(30, 9, 26, 1, 150),
(31, 9, 37, 1, 150),
(32, 9, 38, 1, 990),
(33, 9, 22, 2, 950),
(34, 9, 35, 1, 350),
(35, 9, 36, 1, 350),
(36, 9, 33, 2, 650),
(37, 10, 27, 1, 730),
(38, 10, 25, 1, 270),
(39, 11, 22, 3, 950),
(40, 11, 23, 1, 990),
(41, 11, 27, 1, 730),
(42, 11, 33, 1, 650),
(43, 11, 38, 2, 990),
(44, 12, 29, 1, 220),
(45, 13, 23, 1, 990),
(46, 13, 27, 2, 730),
(47, 13, 25, 1, 270),
(48, 13, 31, 1, 250),
(49, 13, 37, 1, 150),
(50, 13, 30, 1, 250),
(51, 13, 26, 1, 150),
(52, 14, 23, 1, 990),
(53, 15, 27, 1, 730),
(54, 16, 27, 2, 730),
(55, 16, 22, 1, 950),
(56, 16, 29, 1, 220);

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

--
-- Table structure for table `tkatalog`
--

CREATE TABLE IF NOT EXISTS `tkatalog` (
  `katalog_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `katalog_ime` varchar(255) NOT NULL,
  `katalog_status` tinyint(4) NOT NULL,
  `katalog_header` tinyint(4) NOT NULL,
  PRIMARY KEY (`katalog_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `tkatalog`
--

INSERT INTO `tkatalog` (`katalog_id`, `katalog_ime`, `katalog_status`, `katalog_header`) VALUES
(1, 'Јануари 2014', 1, 1),
(2, 'Фебруари 2014', 1, 1);

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

--
-- Table structure for table `tkategorija`
--

CREATE TABLE IF NOT EXISTS `tkategorija` (
  `kategorija_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kategorija_order` int(11) NOT NULL,
  `kategorija_name` varchar(255) NOT NULL,
  `kategorija_opis` text NOT NULL,
  `kategorija_status` int(11) NOT NULL DEFAULT '0',
  `kategorija_header` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kategorija_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `tkategorija`
--

INSERT INTO `tkategorija` (`kategorija_id`, `kategorija_order`, `kategorija_name`, `kategorija_opis`, `kategorija_status`, `kategorija_header`) VALUES
(1, 1, 'Парфеми', 'Машки и женски', 1, 1),
(2, 3, 'Креми', 'За раце, лице и тело', 1, 1),
(3, 4, 'Препарати за коса', 'Шампон,серум,балсам', 1, 1),
(4, 2, 'Шминка', 'Креони,маскари и кармини', 1, 1);

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

--
-- Table structure for table `tproizvod`
--

CREATE TABLE IF NOT EXISTS `tproizvod` (
  `proizvod_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kategorija_id` int(11) NOT NULL,
  `katalog_id` int(11) NOT NULL,
  `proizvod_order` int(11) NOT NULL DEFAULT '0',
  `proizvod_ime` varchar(255) NOT NULL,
  `proizvod_opis` text NOT NULL,
  `proizvod_lager` int(11) NOT NULL,
  `proizvod_cena` float NOT NULL,
  `proizvod_slika` varchar(255) NOT NULL,
  `proizvod_akcija` mediumint(9) NOT NULL DEFAULT '0',
  `proizvod_status` int(11) NOT NULL DEFAULT '0',
  `proizvod_home` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`proizvod_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=39 ;

--
-- Dumping data for table `tproizvod`
--

INSERT INTO `tproizvod` (`proizvod_id`, `kategorija_id`, `katalog_id`, `proizvod_order`, `proizvod_ime`, `proizvod_opis`, `proizvod_lager`, `proizvod_cena`, `proizvod_slika`, `proizvod_akcija`, `proizvod_status`, `proizvod_home`) VALUES
(21, 2, 1, 0, 'Avon Care Family', 'Крема за тело', 10, 250, 'krema-telo.jpg', 0, 0, 1),
(22, 1, 1, 0, 'Pure', 'Машки парфем', 10, 950, 'pure.jpg', 0, 0, 1),
(23, 1, 1, 0, 'Outspoken intense', 'Женски парфем', 33, 990, 'parfem_z.png', 0, 0, 0),
(24, 3, 1, 0, 'Palmolive', 'Шампон за сите видови коса', 33, 249, 'Palmolive.jpg', 10, 0, 1),
(25, 2, 1, 0, 'Sun Magic Tan', 'Крема за самопотемнување', 23, 270, 'magic tan.jpg', 0, 0, 0),
(26, 4, 1, 0, 'Lasting Smile', 'Кармин- го има во различни бои', 10, 150, 'karmin.jpg', 0, 0, 1),
(27, 1, 2, 0, 'Little Black Dress', 'Женски парфем', 55, 730, 'parfem.jpg', 0, 0, 1),
(28, 2, 2, 0, 'Vitale', 'Ноќна крема за лице', 25, 330, 'krema lice.jpg', 0, 0, 0),
(29, 3, 2, 0, 'Hello Kitty', 'Балсам за коса', 36, 220, 'hello kitty.jpg', 0, 0, 0),
(30, 4, 1, 0, 'Super Shock', 'Маскара', 14, 250, 'supershock.jpg', 20, 0, 1),
(31, 2, 1, 0, 'Silk Beauty', 'Крема за раце', 57, 250, 'silkbeauty.png', 0, 0, 0),
(32, 3, 1, 0, 'Daily Shine', 'Спреј за посјајна коса со мароканско ароганово масло', 2, 290, 'dailyshine.jpg', 0, 0, 0),
(33, 1, 2, 0, 'X- series', 'Машки парфем', 29, 650, 'x-series.jpg', 0, 0, 0),
(34, 4, 1, 0, 'Extend', 'Маскара за издолжување на трепки', 16, 260, 'extend.jpg', 0, 0, 0),
(35, 3, 1, 0, 'Advance Techniques', 'Шампон и балсам против првут', 6, 350, 'sampon-balsam.jpg', 0, 0, 0),
(36, 2, 1, 0, 'Anew reversalist', 'Дневна крема за лице', 30, 350, 'krema-lice.jpg', 0, 0, 0),
(37, 4, 1, 0, 'Luxe', 'Креон за очи во различни бои', 27, 150, 'kreon.JPG', 0, 0, 0),
(38, 1, 2, 0, 'Burberry', 'Женски парфем', 13, 990, 'burberry.jpg', 0, 0, 0);

