Ticket #20: dbshop.sql

File dbshop.sql, 9.3 KB (added by 13243, 10 years ago)
Line 
1-- phpMyAdmin SQL Dump
2-- version 4.0.4
3-- http://www.phpmyadmin.net
4--
5-- Host: localhost
6-- Generation Time: Apr 24, 2014 at 02:57 PM
7-- Server version: 5.6.12-log
8-- PHP Version: 5.4.16
9
10SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11SET time_zone = "+00:00";
12
13
14/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17/*!40101 SET NAMES utf8 */;
18
19--
20-- Database: `dbshop`
21--
22CREATE DATABASE IF NOT EXISTS `dbshop` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
23USE `dbshop`;
24
25-- --------------------------------------------------------
26
27--
28--Table structure for table `tdistributer`
29 --
30
31CREATE TABLE IF NOT EXISTS `tdistributer` (
32 `distributer_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
33 `distributer_ime` varchar(255) NOT NULL,
34 `distributer_titula` varchar(255) NOT NULL,
35 PRIMARY KEY (`distributer_id`)
36) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
37
38--
39-- Dumping data for table `tdistributer`
40--
41
42INSERT INTO `tdistributer` (`distributer_id`, `distributer_ime`, `distributer_titula`) VALUES
43(1, 'Martina Stojanovska', 'VIP'),
44(2, 'Natalija Ilievska', 'Standard'),
45(3, 'Stefanija Stefkovska', 'Pocetnik'),
46(4, 'Stefan Dimitrov', 'Standard'),
47(5, 'Elena Mitreva', 'Pocetnik');
48
49-- --------------------------------------------------------
50
51--
52-- Table structure for table `tinvoice`
53--
54
55CREATE TABLE IF NOT EXISTS `tinvoice` (
56 `invoice_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
57 `user_id` int(11) NOT NULL,
58 `invoice_create_ts` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
59 `invoice_total` float NOT NULL,
60 `invoice_status` smallint(6) NOT NULL DEFAULT '0',
61 PRIMARY KEY (`invoice_id`)
62) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
63
64--
65-- Dumping data for table `tinvoice`
66--
67
68INSERT INTO `tinvoice` (`invoice_id`, `user_id`, `invoice_create_ts`, `invoice_total`, `invoice_status`) VALUES
69(8, 1, '2014-04-21 23:07:41', 2088, 0),
70(9, 2, '2014-04-21 23:10:46', 5450, 1),
71(10, 2, '2014-04-21 23:11:07', 1000, 0),
72(11, 3, '2014-04-21 23:12:05', 7200, 0),
73(12, 4, '2014-04-21 23:13:05', 220, 0),
74(13, 5, '2014-04-21 23:14:06', 3520, 0),
75(14, 3, '2014-04-21 23:29:09', 990, 0),
76(15, 4, '2014-04-23 21:02:22', 730, 0),
77(16, 4, '2014-04-23 22:47:23', 2630, 0);
78
79-- --------------------------------------------------------
80
81--
82-- Table structure for table `tinvoiceproduct`
83--
84
85CREATE TABLE IF NOT EXISTS `tinvoiceproduct` (
86 `ip_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
87 `invoice_id` int(11) NOT NULL,
88 `proizvod_id` int(11) NOT NULL,
89 `ip_quantity` int(11) NOT NULL,
90 `ip_unit_price` int(11) NOT NULL,
91 PRIMARY KEY (`ip_id`)
92) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=57 ;
93
94--
95-- Dumping data for table `tinvoiceproduct`
96--
97
98INSERT INTO `tinvoiceproduct` (`ip_id`, `invoice_id`, `proizvod_id`, `ip_quantity`, `ip_unit_price`) VALUES
99(25, 8, 23, 1, 990),
100(26, 8, 31, 1, 250),
101(27, 8, 24, 2, 249),
102(28, 8, 35, 1, 350),
103(29, 9, 34, 1, 260),
104(30, 9, 26, 1, 150),
105(31, 9, 37, 1, 150),
106(32, 9, 38, 1, 990),
107(33, 9, 22, 2, 950),
108(34, 9, 35, 1, 350),
109(35, 9, 36, 1, 350),
110(36, 9, 33, 2, 650),
111(37, 10, 27, 1, 730),
112(38, 10, 25, 1, 270),
113(39, 11, 22, 3, 950),
114(40, 11, 23, 1, 990),
115(41, 11, 27, 1, 730),
116(42, 11, 33, 1, 650),
117(43, 11, 38, 2, 990),
118(44, 12, 29, 1, 220),
119(45, 13, 23, 1, 990),
120(46, 13, 27, 2, 730),
121(47, 13, 25, 1, 270),
122(48, 13, 31, 1, 250),
123(49, 13, 37, 1, 150),
124(50, 13, 30, 1, 250),
125(51, 13, 26, 1, 150),
126(52, 14, 23, 1, 990),
127(53, 15, 27, 1, 730),
128(54, 16, 27, 2, 730),
129(55, 16, 22, 1, 950),
130(56, 16, 29, 1, 220);
131
132-- --------------------------------------------------------
133
134--
135-- Table structure for table `tkatalog`
136--
137
138CREATE TABLE IF NOT EXISTS `tkatalog` (
139 `katalog_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
140 `katalog_ime` varchar(255) NOT NULL,
141 `katalog_status` tinyint(4) NOT NULL,
142 `katalog_header` tinyint(4) NOT NULL,
143 PRIMARY KEY (`katalog_id`)
144) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
145
146--
147-- Dumping data for table `tkatalog`
148--
149
150INSERT INTO `tkatalog` (`katalog_id`, `katalog_ime`, `katalog_status`, `katalog_header`) VALUES
151(1, 'Јануари 2014', 1, 1),
152(2, 'Фебруари 2014', 1, 1);
153
154-- --------------------------------------------------------
155
156--
157-- Table structure for table `tkategorija`
158--
159
160CREATE TABLE IF NOT EXISTS `tkategorija` (
161 `kategorija_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
162 `kategorija_order` int(11) NOT NULL,
163 `kategorija_name` varchar(255) NOT NULL,
164 `kategorija_opis` text NOT NULL,
165 `kategorija_status` int(11) NOT NULL DEFAULT '0',
166 `kategorija_header` int(11) NOT NULL DEFAULT '0',
167 PRIMARY KEY (`kategorija_id`)
168) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
169
170--
171-- Dumping data for table `tkategorija`
172--
173
174INSERT INTO `tkategorija` (`kategorija_id`, `kategorija_order`, `kategorija_name`, `kategorija_opis`, `kategorija_status`, `kategorija_header`) VALUES
175(1, 1, 'Парфеми', 'Машки и женски', 1, 1),
176(2, 3, 'Креми', 'За раце, лице и тело', 1, 1),
177(3, 4, 'Препарати за коса', 'Шампон,серум,балсам', 1, 1),
178(4, 2, 'Шминка', 'Креони,маскари и кармини', 1, 1);
179
180-- --------------------------------------------------------
181
182--
183-- Table structure for table `tproizvod`
184--
185
186CREATE TABLE IF NOT EXISTS `tproizvod` (
187 `proizvod_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
188 `kategorija_id` int(11) NOT NULL,
189 `katalog_id` int(11) NOT NULL,
190 `proizvod_order` int(11) NOT NULL DEFAULT '0',
191 `proizvod_ime` varchar(255) NOT NULL,
192 `proizvod_opis` text NOT NULL,
193 `proizvod_lager` int(11) NOT NULL,
194 `proizvod_cena` float NOT NULL,
195 `proizvod_slika` varchar(255) NOT NULL,
196 `proizvod_akcija` mediumint(9) NOT NULL DEFAULT '0',
197 `proizvod_status` int(11) NOT NULL DEFAULT '0',
198 `proizvod_home` int(11) NOT NULL DEFAULT '0',
199 PRIMARY KEY (`proizvod_id`)
200) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=39 ;
201
202--
203-- Dumping data for table `tproizvod`
204--
205
206INSERT 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
207(21, 2, 1, 0, 'Avon Care Family', 'Крема за тело', 10, 250, 'krema-telo.jpg', 0, 0, 1),
208(22, 1, 1, 0, 'Pure', 'Машки парфем', 10, 950, 'pure.jpg', 0, 0, 1),
209(23, 1, 1, 0, 'Outspoken intense', 'Женски парфем', 33, 990, 'parfem_z.png', 0, 0, 0),
210(24, 3, 1, 0, 'Palmolive', 'Шампон за сите видови коса', 33, 249, 'Palmolive.jpg', 10, 0, 1),
211(25, 2, 1, 0, 'Sun Magic Tan', 'Крема за самопотемнување', 23, 270, 'magic tan.jpg', 0, 0, 0),
212(26, 4, 1, 0, 'Lasting Smile', 'Кармин- го има во различни бои', 10, 150, 'karmin.jpg', 0, 0, 1),
213(27, 1, 2, 0, 'Little Black Dress', 'Женски парфем', 55, 730, 'parfem.jpg', 0, 0, 1),
214(28, 2, 2, 0, 'Vitale', 'Ноќна крема за лице', 25, 330, 'krema lice.jpg', 0, 0, 0),
215(29, 3, 2, 0, 'Hello Kitty', 'Балсам за коса', 36, 220, 'hello kitty.jpg', 0, 0, 0),
216(30, 4, 1, 0, 'Super Shock', 'Маскара', 14, 250, 'supershock.jpg', 20, 0, 1),
217(31, 2, 1, 0, 'Silk Beauty', 'Крема за раце', 57, 250, 'silkbeauty.png', 0, 0, 0),
218(32, 3, 1, 0, 'Daily Shine', 'Спреј за посјајна коса со мароканско ароганово масло', 2, 290, 'dailyshine.jpg', 0, 0, 0),
219(33, 1, 2, 0, 'X- series', 'Машки парфем', 29, 650, 'x-series.jpg', 0, 0, 0),
220(34, 4, 1, 0, 'Extend', 'Маскара за издолжување на трепки', 16, 260, 'extend.jpg', 0, 0, 0),
221(35, 3, 1, 0, 'Advance Techniques', 'Шампон и балсам против првут', 6, 350, 'sampon-balsam.jpg', 0, 0, 0),
222(36, 2, 1, 0, 'Anew reversalist', 'Дневна крема за лице', 30, 350, 'krema-lice.jpg', 0, 0, 0),
223(37, 4, 1, 0, 'Luxe', 'Креон за очи во различни бои', 27, 150, 'kreon.JPG', 0, 0, 0),
224(38, 1, 2, 0, 'Burberry', 'Женски парфем', 13, 990, 'burberry.jpg', 0, 0, 0);
225
226-- --------------------------------------------------------
227
228--
229-- Table structure for table `tuser`
230--
231
232CREATE TABLE IF NOT EXISTS `tuser` (
233 `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
234 `distributer_id` int(11) NOT NULL,
235 `user_email` varchar(255) NOT NULL,
236 `user_password` varchar(255) NOT NULL,
237 `user_firstname` varchar(255) NOT NULL,
238 `user_lastname` varchar(255) NOT NULL,
239 `user_type` int(11) NOT NULL DEFAULT '0',
240 PRIMARY KEY (`user_id`)
241) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
242
243--
244-- Dumping data for table `tuser`
245--
246
247INSERT INTO `tuser` (`user_id`, `distributer_id`, `user_email`, `user_password`, `user_firstname`, `user_lastname`, `user_type`) VALUES
248(1, 2, 'magi_magi@yahoo.com', 'ecf99e68289325d0025b030522f06d11', 'Magdalena ', 'Stosik', 7),
249(2, 1, 'admin', '21232f297a57a5a743894a0e4a801fc3', '', '', 0),
250(3, 3, 'kompanija@kompanija.com', 'ecf99e68289325d0025b030522f06d11', '', '', 0),
251(4, 4, 'magi_s@magi.com', 'ecf99e68289325d0025b030522f06d11', '', '', 0),
252(5, 5, 'magi_stosik@magi.com', 'ecf99e68289325d0025b030522f06d11', 'Magi', 'Stosik', 0);
253
254/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
255/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
256/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;