Advertisement
Guest User

Untitled

a guest
Oct 6th, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.01 KB | None | 0 0
  1. -- phpMyAdmin SQL Dump
  2. -- version 4.1.14
  3. -- http://www.phpmyadmin.net
  4. --
  5. -- Host: 127.0.0.1
  6. -- Generation Time: Oct 06, 2016 at 06:08 PM
  7. -- Server version: 5.6.17
  8. -- PHP Version: 5.5.12
  9.  
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. SET 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: `prehrana`
  21. --
  22.  
  23. -- --------------------------------------------------------
  24.  
  25. --
  26. -- Table structure for table `akcija`
  27. --
  28.  
  29. CREATE TABLE IF NOT EXISTS `akcija` (
  30. `id` int(11) NOT NULL AUTO_INCREMENT,
  31. `kupon` text COLLATE utf8_slovenian_ci,
  32. `procent` double DEFAULT '-1',
  33. `cena` double DEFAULT '-1',
  34. `fk_lokal_id` bigint(20) NOT NULL,
  35. `aktivno` tinyint(1) NOT NULL DEFAULT '1',
  36. `spletno` tinyint(1) NOT NULL DEFAULT '0',
  37. `datum_vnosa` datetime NOT NULL,
  38. `naziv` text COLLATE utf8_slovenian_ci NOT NULL,
  39. PRIMARY KEY (`id`),
  40. KEY `fk_lokal_id` (`fk_lokal_id`)
  41. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci AUTO_INCREMENT=3 ;
  42.  
  43. --
  44. -- Dumping data for table `akcija`
  45. --
  46.  
  47. INSERT INTO `akcija` (`id`, `kupon`, `procent`, `cena`, `fk_lokal_id`, `aktivno`, `spletno`, `datum_vnosa`, `naziv`) VALUES
  48. (1, '', 12, -1, 21061265696, 1, 1, '2016-09-26 17:55:00', '123'),
  49. (2, 'qwe', -1, 24, 21061265696, 0, 0, '2016-09-26 17:56:00', 'cena');
  50.  
  51. -- --------------------------------------------------------
  52.  
  53. --
  54. -- Table structure for table `feedback`
  55. --
  56.  
  57. CREATE TABLE IF NOT EXISTS `feedback` (
  58. `id` int(11) NOT NULL AUTO_INCREMENT,
  59. `text` text CHARACTER SET latin1 NOT NULL,
  60. `fk_uporabnik_id` bigint(20) DEFAULT NULL,
  61. `fk_lokal_id` bigint(20) DEFAULT NULL,
  62. `datum` datetime NOT NULL,
  63. PRIMARY KEY (`id`),
  64. KEY `fk_uporabnik_id` (`fk_uporabnik_id`),
  65. KEY `fk_lokal_id` (`fk_lokal_id`)
  66. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci AUTO_INCREMENT=27 ;
  67.  
  68. --
  69. -- Dumping data for table `feedback`
  70. --
  71.  
  72. INSERT INTO `feedback` (`id`, `text`, `fk_uporabnik_id`, `fk_lokal_id`, `datum`) VALUES
  73. (1, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  74. (2, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  75. (3, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  76. (4, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  77. (5, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  78. (6, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  79. (7, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  80. (8, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  81. (9, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  82. (10, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  83. (11, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  84. (12, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  85. (13, 'zrtzr', NULL, 82386710868, '2016-09-20 16:33:00'),
  86. (14, 'werwer', 86891762479, NULL, '2016-09-20 16:34:00'),
  87. (15, 'rtzertz', 86891762479, NULL, '2016-09-20 16:37:00'),
  88. (16, 'rtzertz', 86891762479, NULL, '2016-09-20 16:37:00'),
  89. (17, 'rtzertz', 86891762479, NULL, '2016-09-20 16:37:00'),
  90. (18, 'rtzertz', 86891762479, NULL, '2016-09-20 16:37:00'),
  91. (19, 'rtuzrtz', 86891762479, NULL, '2016-09-20 16:38:00'),
  92. (20, '78', NULL, 82386710868, '2016-09-20 17:14:00'),
  93. (21, 'iopsdjt', 86891762479, NULL, '2016-09-20 23:58:00'),
  94. (22, '123', 86891762479, NULL, '2016-09-23 15:28:00'),
  95. (23, '123', 86891762479, NULL, '2016-09-23 23:21:00'),
  96. (24, '99o', 86891762479, NULL, '2016-09-24 08:48:00'),
  97. (25, 'erwr', NULL, 21061265696, '2016-09-26 12:54:00'),
  98. (26, 'qwe', 86891762479, NULL, '2016-09-30 23:19:00');
  99.  
  100. -- --------------------------------------------------------
  101.  
  102. --
  103. -- Table structure for table `jedilnik`
  104. --
  105.  
  106. CREATE TABLE IF NOT EXISTS `jedilnik` (
  107. `id` bigint(20) NOT NULL,
  108. `fk_lokal_id` bigint(20) NOT NULL,
  109. `memo` varchar(64) COLLATE utf8_slovenian_ci NOT NULL,
  110. `datum_vnosa` datetime NOT NULL,
  111. `active` tinyint(1) NOT NULL DEFAULT '0',
  112. `tip` tinyint(1) NOT NULL DEFAULT '0',
  113. PRIMARY KEY (`id`),
  114. KEY `fk_lokal_id` (`fk_lokal_id`)
  115. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci;
  116.  
  117. --
  118. -- Dumping data for table `jedilnik`
  119. --
  120.  
  121. INSERT INTO `jedilnik` (`id`, `fk_lokal_id`, `memo`, `datum_vnosa`, `active`, `tip`) VALUES
  122. (123123, 82386710868, 'def', '2016-09-23 14:09:00', 1, 0),
  123. (8166883286, 88620957473, 'Privzeto', '2016-10-06 15:02:00', 0, 0),
  124. (36107969630, 15244476491, 'Privzeto', '2016-10-06 15:07:00', 0, 0),
  125. (48027043618, 15244476491, 'Študentski', '2016-10-06 15:07:00', 0, 1),
  126. (48090639821, 88620957473, 'Študentski', '2016-10-06 15:02:00', 0, 1),
  127. (48869006086, 88928449308, 'Študentski', '2016-10-06 15:05:00', 0, 1),
  128. (57866498998, 86989713026, 'Študentski', '2016-10-06 15:14:00', 0, 1),
  129. (60602130512, 35358669632, 'Privzeto', '2016-09-24 09:52:00', 0, 0),
  130. (81631866800, 26403806087, 'Študentski', '2016-10-06 15:06:00', 0, 1),
  131. (85229441881, 88928449308, 'Privzeto', '2016-10-06 15:05:00', 0, 0),
  132. (89380512299, 21061265696, 'Privzeto', '2016-09-23 14:09:00', 1, 0),
  133. (92880619443, 26403806087, 'Privzeto', '2016-10-06 15:06:00', 0, 0),
  134. (94885245845, 86989713026, 'Privzeto', '2016-10-06 15:14:00', 0, 0);
  135.  
  136. -- --------------------------------------------------------
  137.  
  138. --
  139. -- Table structure for table `jedilnik_meni`
  140. --
  141.  
  142. CREATE TABLE IF NOT EXISTS `jedilnik_meni` (
  143. `id` int(11) NOT NULL AUTO_INCREMENT,
  144. `naziv` varchar(64) COLLATE utf8_slovenian_ci DEFAULT NULL,
  145. `fk_jedilnik_id` bigint(20) NOT NULL,
  146. `fk_jedilnik_tip` int(11) DEFAULT NULL,
  147. `jedilnik` mediumtext COLLATE utf8_slovenian_ci NOT NULL,
  148. `cena` double DEFAULT '-1',
  149. `bon` tinyint(1) NOT NULL DEFAULT '0',
  150. PRIMARY KEY (`id`),
  151. KEY `fk_meni_id` (`fk_jedilnik_id`),
  152. KEY `fk_jedilnik_tip` (`fk_jedilnik_tip`),
  153. KEY `fk_meni_id_2` (`fk_jedilnik_id`),
  154. KEY `fk_jedilnik_tip_2` (`fk_jedilnik_tip`),
  155. KEY `fk_jedilnik_id` (`fk_jedilnik_id`)
  156. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci AUTO_INCREMENT=193 ;
  157.  
  158. --
  159. -- Dumping data for table `jedilnik_meni`
  160. --
  161.  
  162. INSERT INTO `jedilnik_meni` (`id`, `naziv`, `fk_jedilnik_id`, `fk_jedilnik_tip`, `jedilnik`, `cena`, `bon`) VALUES
  163. (174, 'Kosilo 11', 89380512299, 2, 'OCVRTI MEDALJONI,NJOKI S PARMEZANOMm', 3.66, 1),
  164. (175, 'Kosilo 2', 89380512299, 2, 'KORENČKOVA JUHA::SOLATNI KROŽNIK S POPEČENO ZELENJAVO,HLEBČEK IZ KRUŠNE PEČI::ZELENA,PAPRADIŽNIK,KORUZA,FIŽOL::JABOLKO', 3.6, 0),
  165. (176, 'Kosilo 3', 89380512299, 2, 'KORENČKOVA JUHA::LOSOS NA ŽARU,BLITVA S KROMPIRJEM::SEZONSKA SOLATA::JABOLKO', 3.6, 0),
  166. (177, 'Kosilo 1', 60602130512, 1, 'POHORSKI LONEC, ČOKOLADICA::SESTAVLJENA SOLATA::SADJE', 2, 0),
  167. (178, 'Kosilo 2', 60602130512, 1, 'GOVEJI ZREZEK V LOVSKI OMAKI, TESTENINE::SESTAVLJENA SOLATA::SADJE', 2, 0),
  168. (179, 'Kosilo 23', 60602130512, 1, 'MESNI SIR NA ŽARU, RIŽ S KORENČKOM::SESTAVLJENA SOLATA::SADJE', 2, 0),
  169. (180, 'Kosilo bon', 60602130512, 3, '123', 12, 1),
  170. (181, 'Kosilo 4', 89380512299, 1, '123', 34, 1),
  171. (182, 'qwe', 60602130512, 3, '23', 12, 1),
  172. (183, '123', 89380512299, 3, '23', 12, 1),
  173. (184, '12333', 89380512299, 3, '123', 12, 1),
  174. (185, '123', 89380512299, 3, '23', 123, 1),
  175. (186, '123', 89380512299, 3, '23', 123, 1),
  176. (187, '123', 89380512299, 3, '23', 123, 1),
  177. (188, '123', 89380512299, 3, '23', 123, 1),
  178. (189, '123', 89380512299, 4, '123', 213, 1),
  179. (190, '33', 89380512299, 4, '3', 3, 1),
  180. (191, '123', 89380512299, 4, '23', 213, 1),
  181. (192, 'wqe', 89380512299, 3, '123', 123, 1);
  182.  
  183. -- --------------------------------------------------------
  184.  
  185. --
  186. -- Table structure for table `jedilnik_tip`
  187. --
  188.  
  189. CREATE TABLE IF NOT EXISTS `jedilnik_tip` (
  190. `id` int(11) NOT NULL,
  191. `naziv` varchar(32) NOT NULL,
  192. PRIMARY KEY (`id`)
  193. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  194.  
  195. --
  196. -- Dumping data for table `jedilnik_tip`
  197. --
  198.  
  199. INSERT INTO `jedilnik_tip` (`id`, `naziv`) VALUES
  200. (1, 'Mesni'),
  201. (2, 'Vege'),
  202. (3, 'Ribe'),
  203. (4, 'Hitra hrana'),
  204. (5, 'Pizza'),
  205. (6, 'Testenine');
  206.  
  207. -- --------------------------------------------------------
  208.  
  209. --
  210. -- Table structure for table `lokal`
  211. --
  212.  
  213. CREATE TABLE IF NOT EXISTS `lokal` (
  214. `id` bigint(11) NOT NULL,
  215. `active` tinyint(1) NOT NULL DEFAULT '1',
  216. `naziv` varchar(32) COLLATE utf16_slovenian_ci NOT NULL,
  217. `lastnik` varchar(32) COLLATE utf16_slovenian_ci NOT NULL,
  218. `naslov` varchar(48) COLLATE utf16_slovenian_ci NOT NULL,
  219. `coord` text COLLATE utf16_slovenian_ci NOT NULL,
  220. `kraj` varchar(20) COLLATE utf16_slovenian_ci NOT NULL,
  221. `telefon` varchar(14) CHARACTER SET latin1 NOT NULL,
  222. `email` varchar(32) CHARACTER SET latin1 DEFAULT NULL,
  223. `geslo` text CHARACTER SET utf32 COLLATE utf32_slovenian_ci NOT NULL,
  224. `salt` text CHARACTER SET latin1 NOT NULL,
  225. `odprto_teden_zacetek` varchar(8) CHARACTER SET latin1 NOT NULL,
  226. `odprto_teden_konec` varchar(8) CHARACTER SET latin1 NOT NULL,
  227. `odprto_sobota_zacetek` varchar(8) CHARACTER SET latin1 NOT NULL,
  228. `odprto_sobota_konec` varchar(8) CHARACTER SET latin1 NOT NULL,
  229. `odprto_nedelja_zacetek` varchar(8) CHARACTER SET latin1 NOT NULL,
  230. `odprto_nedelja_konec` varchar(8) CHARACTER SET latin1 NOT NULL,
  231. `datum_registracije` datetime NOT NULL,
  232. `dostava` tinyint(1) NOT NULL,
  233. `boni` tinyint(1) NOT NULL,
  234. `dostava_vikend` tinyint(1) NOT NULL,
  235. `vege` tinyint(1) NOT NULL,
  236. `kosila` tinyint(1) NOT NULL,
  237. `img` varchar(128) COLLATE utf16_slovenian_ci DEFAULT NULL,
  238. `placilo_gotovina` tinyint(1) NOT NULL,
  239. `placilo_kartica` tinyint(1) NOT NULL,
  240. `placilo_moneta` tinyint(1) NOT NULL,
  241. PRIMARY KEY (`id`)
  242. ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_slovenian_ci;
  243.  
  244. --
  245. -- Dumping data for table `lokal`
  246. --
  247.  
  248. INSERT INTO `lokal` (`id`, `active`, `naziv`, `lastnik`, `naslov`, `coord`, `kraj`, `telefon`, `email`, `geslo`, `salt`, `odprto_teden_zacetek`, `odprto_teden_konec`, `odprto_sobota_zacetek`, `odprto_sobota_konec`, `odprto_nedelja_zacetek`, `odprto_nedelja_konec`, `datum_registracije`, `dostava`, `boni`, `dostava_vikend`, `vege`, `kosila`, `img`, `placilo_gotovina`, `placilo_kartica`, `placilo_moneta`) VALUES
  249. (15244476491, 1, 'tilen', 'tilen', 'tilen', '', 'tilen', '031000000', 'tilen@gmail.com', 'debd503ba7799b8e23b9c362a144233e86b6c114addcaf455c9ed083887842e5', '85488723355988968', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-10-06 15:07:00', 1, 1, 1, 1, 1, NULL, 1, 1, 1),
  250. (18936454639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', '46.16110560000001,14.5701338', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  251. (20934442485, 1, 'Astoria City Cusine', 'null', 'Slovenska ulica 2', '46.56182708029149,15.6492523802915', 'Maribor', '026211700', 'null@gmail.com', '9f02abb69b0cc1386c3c42e914d003ecea548d690d8a1cbaeabc24f3b29c3943', '79788284005675642', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:23:21', 0, 1, 1, 1, 0, NULL, 0, 0, 0),
  252. (21061265696, 1, 'Taverna Sicilia', 'Taverna Sicilia', 'Ulica Heroja Nandeta 31', '46.5340070802915,15.6746749802915', 'Maribor', '024260315', 'taverna@gmail.com', 'ada74449655cc03710ed3e0f6ae2b70570c608806e0c8e29f7b61f5037cc1601', '95349182653758480', '00:00', '24:00', '00:00', '24:00', '00:00', '24:00', '2016-09-23 14:09:00', 1, 1, 1, 1, 1, NULL, 1, 1, 1),
  253. (26403806087, 1, 'qweqwe12', 'qweqwe', 'Zagrebška cesta 92', '', 'maribor', '031000000', 'erwo@gmail.com', '6ced7338765da4de63a1d15eba1f8ab8b3a284806522387dcbb4ddbac165773e', '61784845582192083', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-10-06 15:06:00', 1, 0, 0, 0, 0, NULL, 1, 0, 0),
  254. (35358669632, 1, 'Gurmanski hram', 'Gurmanski hram', 'Zagrebška cesta 92', '46.5264909,15.6688336', 'Maribor', '031467088', 'gurmanski@gmail.com', 'c056c6544d63f8809711acbc7de018bb4e9e77ce92e4be3abeb1fbf33656c9b2', '54609880451878850', '10:10', '16:00', '00:00', '00:00', '00:00', '00:00', '2016-09-24 09:52:00', 1, 1, 0, 1, 1, NULL, 1, 0, 0),
  255. (52927503148, 1, 'Apači', 'Apači', 'Pohorska cesta 17b', '46.5396075802915,15.6074563802915', 'Slovenj Gradec', '028831784', 'apaci@gmail.com', '923b10184d21542f7a487f9300df1acab272269c9e41edf80d49934e73f0a370', '88528993183838781', '01:00', '23:00', '12:00', '01:00', '12:00', '22:00', '2016-09-08 14:29:57', 0, 1, 0, 1, 0, NULL, 0, 0, 0),
  256. (66328866021, 1, 'AROMA, restavracija in pizzerija', 'null', 'Ribji trg 2', '', 'Ljubljana', '031000000', 'noemail@gmail.com', '7ad3ed8d42f79c9e03a11102c3ca33c517d4ec0f923e99043982019f0c1daea4', '82067569399867435', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:21:48', 0, 0, 1, 1, 0, NULL, 0, 0, 0),
  257. (82386710868, 1, 'AL Pachino', 'AL Pachino', 'Gosposvetska cesta 87', '46.5637327,15.6253737', 'Maribor', '041566373', 'alpachino@gmail.com', '58dfa4991ba96e60caaad2728dc89ab89552a107e714d54c0dbe8b2103c5e60e', '78306335072898800', '10:00', '20:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 14:27:24', 1, 1, 1, 0, 0, NULL, 0, 0, 0),
  258. (84189335439, 1, 'Bohor d.o.o.', 'Bohor d.o.o.', 'Kidričeva ulica 23', '', 'Rogaška Slatina', '031000000', 'null@gmail.com', '5dba49c1fc147a6cc814fae84bc3f29405c222f4dc9ddafc547cd3b0e862d66c', '33987949451383398', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:27:47', 0, 0, 1, 1, 0, NULL, 0, 0, 0),
  259. (86989713026, 1, 'qwekop', 'qweopk', 'Zagrebška cesta 92', '46.5264909,15.6688336', 'maribor', '031000000', 'tilen@gmail.com', 'bb85d6a20a0c7fb5863ea71cfd82d9ff6737a3e42c520872117a5657fbfa2fb7', '12845521090007362', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-10-06 15:14:00', 0, 1, 1, 0, 0, NULL, 0, 1, 0),
  260. (88620957473, 1, 'qweqwe', 'qweqwe', 'Zagrebška cesta 92', '', 'maribor', '031000000', 'erwo@gmail.com', '6697ceddfcde818081103144a8a82ae7ca30ea255576ccbe3be1930cc6c9b634', '82784148537856977', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-10-06 15:02:00', 1, 0, 0, 0, 0, NULL, 1, 0, 0),
  261. (88928449308, 1, 'qweqwe1', 'qweqwe', 'Zagrebška cesta 92', '', 'maribor', '031000000', 'erwo@gmail.com', 'b32b7b9b196fcbd8a3f6ea04f8077a5688e12b0ecc1d39fbcba0ed6fa851c9db', '21113983066186684', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-10-06 15:05:00', 1, 0, 0, 0, 0, NULL, 1, 0, 0);
  262.  
  263. -- --------------------------------------------------------
  264.  
  265. --
  266. -- Table structure for table `lokal_nagrada`
  267. --
  268.  
  269. CREATE TABLE IF NOT EXISTS `lokal_nagrada` (
  270. `id` int(11) NOT NULL AUTO_INCREMENT,
  271. `fk_lokal_id` bigint(20) NOT NULL,
  272. `fk_nagrada_id` int(11) NOT NULL,
  273. `datum_prejema` datetime NOT NULL,
  274. PRIMARY KEY (`id`),
  275. KEY `fk_lokal_id` (`fk_lokal_id`,`fk_nagrada_id`),
  276. KEY `fk_lokal_id_2` (`fk_lokal_id`),
  277. KEY `fk_nagrada_id` (`fk_nagrada_id`)
  278. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
  279.  
  280. --
  281. -- Dumping data for table `lokal_nagrada`
  282. --
  283.  
  284. INSERT INTO `lokal_nagrada` (`id`, `fk_lokal_id`, `fk_nagrada_id`, `datum_prejema`) VALUES
  285. (1, 21061265696, 2, '2016-10-01 14:18:00'),
  286. (2, 21061265696, 3, '2016-10-01 14:40:00');
  287.  
  288. -- --------------------------------------------------------
  289.  
  290. --
  291. -- Table structure for table `nacin_placila`
  292. --
  293.  
  294. CREATE TABLE IF NOT EXISTS `nacin_placila` (
  295. `id` int(11) NOT NULL AUTO_INCREMENT,
  296. `naziv` varchar(32) NOT NULL,
  297. PRIMARY KEY (`id`)
  298. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
  299.  
  300. --
  301. -- Dumping data for table `nacin_placila`
  302. --
  303.  
  304. INSERT INTO `nacin_placila` (`id`, `naziv`) VALUES
  305. (1, 'Gotovina'),
  306. (2, 'Kartica'),
  307. (3, 'Moneta');
  308.  
  309. -- --------------------------------------------------------
  310.  
  311. --
  312. -- Table structure for table `nagrada`
  313. --
  314.  
  315. CREATE TABLE IF NOT EXISTS `nagrada` (
  316. `id` int(11) NOT NULL AUTO_INCREMENT,
  317. `naziv` varchar(64) COLLATE utf8_slovenian_ci NOT NULL,
  318. `ico` varchar(64) COLLATE utf8_slovenian_ci DEFAULT NULL,
  319. PRIMARY KEY (`id`)
  320. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci AUTO_INCREMENT=6 ;
  321.  
  322. --
  323. -- Dumping data for table `nagrada`
  324. --
  325.  
  326. INSERT INTO `nagrada` (`id`, `naziv`, `ico`) VALUES
  327. (1, 'Prvo naročilo', '179250'),
  328. (2, 'Pet naročil', '179251'),
  329. (3, 'Deset naročil', '179249'),
  330. (4, 'Sto naročil', '214282'),
  331. (5, 'Tisoč naročil', '214321');
  332.  
  333. -- --------------------------------------------------------
  334.  
  335. --
  336. -- Table structure for table `narocilo`
  337. --
  338.  
  339. CREATE TABLE IF NOT EXISTS `narocilo` (
  340. `id` bigint(20) NOT NULL,
  341. `fk_uporabnik_id` bigint(20) NOT NULL,
  342. `fk_jedilnik_meni_id` int(11) DEFAULT NULL,
  343. `fk_lokal_id` bigint(20) NOT NULL,
  344. `bon` tinyint(1) NOT NULL,
  345. `naslov` varchar(64) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  346. `kraj` varchar(64) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  347. `telefon` varchar(64) NOT NULL,
  348. `cena` double NOT NULL,
  349. `komentar` text CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  350. `datum_narocila` datetime NOT NULL,
  351. `datum_sprejema` datetime DEFAULT NULL,
  352. `koncano` tinyint(1) NOT NULL DEFAULT '0',
  353. `predviden_cas_dostave` int(11) DEFAULT NULL,
  354. `fk_nacin_placila` int(11) DEFAULT '1',
  355. `zavrnjeno` tinyint(1) NOT NULL DEFAULT '0',
  356. PRIMARY KEY (`id`),
  357. KEY `fk_uporabnik_id` (`fk_uporabnik_id`),
  358. KEY `fk_lokal_id` (`fk_lokal_id`),
  359. KEY `fk_jedilnik_meni_id` (`fk_jedilnik_meni_id`),
  360. KEY `fk_nacin_placila` (`fk_nacin_placila`)
  361. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  362.  
  363. --
  364. -- Dumping data for table `narocilo`
  365. --
  366.  
  367. INSERT INTO `narocilo` (`id`, `fk_uporabnik_id`, `fk_jedilnik_meni_id`, `fk_lokal_id`, `bon`, `naslov`, `kraj`, `telefon`, `cena`, `komentar`, `datum_narocila`, `datum_sprejema`, `koncano`, `predviden_cas_dostave`, `fk_nacin_placila`, `zavrnjeno`) VALUES
  368. (3532700036, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 21:35:00', NULL, 0, NULL, 1, 0),
  369. (3731491554, 86891762479, 174, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 14:38:00', NULL, 0, NULL, 1, 0),
  370. (8083825507, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 21:34:00', NULL, 0, NULL, 1, 0),
  371. (10705745610, 86891762479, 183, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  372. (11874175296, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-02 18:51:00', '2016-10-02 22:40:00', 1, NULL, 1, 0),
  373. (12907634997, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 14:40:00', NULL, 0, NULL, 1, 0),
  374. (19898273093, 86891762479, 176, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-02 18:44:00', NULL, 0, NULL, 1, 0),
  375. (20764065564, 86891762479, 184, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', NULL, 0, NULL, 1, 0),
  376. (34243714175, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-02 14:52:00', '2016-10-02 15:00:00', 1, NULL, 1, 0),
  377. (37357076972, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 14:18:00', NULL, 0, NULL, 1, 0),
  378. (37630838143, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 14:40:00', NULL, 0, NULL, 1, 0),
  379. (37715508931, 86891762479, 181, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  380. (38626989198, 86891762479, 187, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', NULL, 0, NULL, 1, 0),
  381. (42064666101, 86891762479, 192, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  382. (43572457320, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-02 18:51:00', '2016-10-02 22:40:00', 1, NULL, 1, 0),
  383. (47471609413, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 21:29:00', NULL, 0, NULL, 1, 0),
  384. (47842139032, 86891762479, 181, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 14:38:00', NULL, 0, NULL, 1, 0),
  385. (48598376356, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 21:55:00', '2016-10-01 22:36:00', 1, NULL, 1, 0),
  386. (48823427674, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-09-26 13:36:00', NULL, 0, NULL, 1, 0),
  387. (50057610143, 86891762479, 188, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  388. (50427207039, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-02 14:55:00', NULL, 0, NULL, 1, 0),
  389. (50580618518, 86891762479, 191, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', '2016-10-02 17:35:00', 1, NULL, 1, 0),
  390. (51814240804, 86891762479, 186, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  391. (53258599783, 86891762479, 174, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', '2016-10-02 16:17:00', 1, NULL, 1, 0),
  392. (54809108263, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 14:38:00', NULL, 0, NULL, 1, 0),
  393. (54926129444, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 18:09:00', NULL, 0, NULL, 1, 0),
  394. (56142478840, 86891762479, 186, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', NULL, 0, NULL, 1, 0),
  395. (56267334194, 86891762479, 184, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  396. (57079355894, 86891762479, 176, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-09-26 13:36:00', NULL, 0, NULL, 1, 0),
  397. (59162995582, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-02 14:47:00', NULL, 0, NULL, 1, 0),
  398. (59850730864, 86891762479, 189, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  399. (60592010770, 86891762479, 181, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 18:10:00', NULL, 0, NULL, 1, 0),
  400. (61741983278, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 14:39:00', NULL, 0, NULL, 1, 0),
  401. (63259454303, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-09-26 14:53:00', NULL, 0, NULL, 1, 0),
  402. (63488998588, 86891762479, 176, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-02 14:55:00', NULL, 0, NULL, 1, 0),
  403. (64266728248, 86891762479, 185, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  404. (66335587347, 86891762479, 185, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', NULL, 1, NULL, 1, 1),
  405. (68260553202, 60644838130, 181, 21061265696, 1, 'Wqweokp', 'Qweopk', '031000000', 3.66, '', '2016-10-03 19:47:00', NULL, 0, NULL, 1, 0),
  406. (68425580184, 86891762479, 187, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  407. (68838786798, 86891762479, 188, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', NULL, 0, NULL, 1, 0),
  408. (68839875259, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 21:34:00', NULL, 0, NULL, 1, 0),
  409. (68848949384, 86891762479, 174, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 12:21:00', NULL, 0, NULL, 1, 0),
  410. (70852178859, 86891762479, 176, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-02 14:47:00', NULL, 0, NULL, 1, 0),
  411. (70863331434, 86891762479, 190, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', NULL, 0, NULL, 1, 0),
  412. (74584008685, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-02 18:44:00', NULL, 0, NULL, 1, 0),
  413. (80505641138, 86891762479, 183, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', NULL, 0, NULL, 1, 0),
  414. (81169241600, 86891762479, 190, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  415. (81303587464, 60644838130, 174, 21061265696, 1, 'Wqweokp', 'Qweopk', '031000000', 3.66, '', '2016-10-03 19:47:00', NULL, 0, NULL, 1, 0),
  416. (83246618353, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-06 16:59:00', NULL, 0, NULL, 1, 0),
  417. (84045438295, 86891762479, 192, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', NULL, 0, NULL, 1, 0),
  418. (84853657227, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-02 18:50:00', NULL, 0, NULL, 1, 0),
  419. (87003872871, 86891762479, 174, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 18:10:00', NULL, 0, NULL, 1, 0),
  420. (88098887488, 86891762479, 176, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-02 14:52:00', NULL, 0, NULL, 1, 0),
  421. (88208872958, 86891762479, 191, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  422. (88538012641, 86891762479, 181, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', NULL, 0, NULL, 1, 0),
  423. (88628267878, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 21:36:00', NULL, 0, NULL, 1, 0),
  424. (89105189737, 86891762479, 175, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-01 21:54:00', '2016-10-02 12:56:00', 1, NULL, 1, 0),
  425. (89358261806, 86891762479, 176, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.6, '', '2016-10-06 16:59:00', NULL, 0, NULL, 1, 0),
  426. (90606606867, 86891762479, 174, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 15:12:00', NULL, 0, NULL, 1, 0),
  427. (90778191479, 86891762479, 189, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-02 14:58:00', NULL, 0, NULL, 1, 0),
  428. (91206023470, 86891762479, 183, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 18:10:00', NULL, 0, NULL, 1, 0),
  429. (94431163756, 86891762479, 184, 21061265696, 1, 'Naslov 12', 'Maribor', '031000000', 3.66, '', '2016-10-01 18:10:00', NULL, 0, NULL, 1, 0);
  430.  
  431. -- --------------------------------------------------------
  432.  
  433. --
  434. -- Table structure for table `narocilo_feedback`
  435. --
  436.  
  437. CREATE TABLE IF NOT EXISTS `narocilo_feedback` (
  438. `id` int(11) NOT NULL AUTO_INCREMENT,
  439. `fk_uporabnik_id` bigint(20) NOT NULL,
  440. `fk_narocilo_id` bigint(20) DEFAULT NULL,
  441. `fk_lokal_id` bigint(20) NOT NULL,
  442. `ocena` int(11) NOT NULL,
  443. `mnenje` text NOT NULL,
  444. PRIMARY KEY (`id`),
  445. KEY `fk_lokal_id` (`fk_lokal_id`),
  446. KEY `fk_uporabnik_id` (`fk_uporabnik_id`),
  447. KEY `fk_narocilo_id` (`fk_narocilo_id`)
  448. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ;
  449.  
  450. --
  451. -- Dumping data for table `narocilo_feedback`
  452. --
  453.  
  454. INSERT INTO `narocilo_feedback` (`id`, `fk_uporabnik_id`, `fk_narocilo_id`, `fk_lokal_id`, `ocena`, `mnenje`) VALUES
  455. (16, 86891762479, NULL, 82386710868, 4, '123'),
  456. (17, 86891762479, NULL, 21061265696, 5, 'dobro'),
  457. (18, 86891762479, NULL, 21061265696, 5, 'ok'),
  458. (19, 86891762479, NULL, 21061265696, 5, '');
  459.  
  460. -- --------------------------------------------------------
  461.  
  462. --
  463. -- Table structure for table `notification`
  464. --
  465.  
  466. CREATE TABLE IF NOT EXISTS `notification` (
  467. `id` int(11) NOT NULL AUTO_INCREMENT,
  468. `fk_uporabnik_id` bigint(20) DEFAULT NULL,
  469. `fk_lokal_id` bigint(20) DEFAULT NULL,
  470. `fk_notification_id` int(11) NOT NULL DEFAULT '1',
  471. `text` text COLLATE utf8_slovenian_ci NOT NULL,
  472. `prebrano` tinyint(1) NOT NULL DEFAULT '0',
  473. `datum` datetime NOT NULL,
  474. PRIMARY KEY (`id`),
  475. KEY `fk_uporabnik_id` (`fk_uporabnik_id`,`fk_notification_id`),
  476. KEY `fk_lokal_id` (`fk_lokal_id`),
  477. KEY `fk_notification_id` (`fk_notification_id`)
  478. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci AUTO_INCREMENT=47 ;
  479.  
  480. --
  481. -- Dumping data for table `notification`
  482. --
  483.  
  484. INSERT INTO `notification` (`id`, `fk_uporabnik_id`, `fk_lokal_id`, `fk_notification_id`, `text`, `prebrano`, `datum`) VALUES
  485. (8, 86891762479, NULL, 1, 'Naročilo je bilo potrjeno! [[lokal:21061265696,narocilo:89105189737]]', 1, '2016-10-02 12:56:00'),
  486. (16, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:80505641138]]', 1, '2016-10-02 14:58:00'),
  487. (17, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:20764065564]]', 1, '2016-10-02 14:58:00'),
  488. (20, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:38626989198]]', 1, '2016-10-02 14:58:00'),
  489. (26, 86891762479, NULL, 1, 'Naročilo je bilo potrjeno! [[lokal:21061265696,narocilo:34243714175]]', 1, '2016-10-02 15:00:00'),
  490. (27, 86891762479, NULL, 1, 'Naročilo je bilo zavrnjeno! [[lokal:21061265696,narocilo:66335587347]]', 1, '2016-10-02 15:01:00'),
  491. (28, 86891762479, NULL, 1, 'Naročilo je bilo potrjeno! [[lokal:21061265696,narocilo:53258599783]]', 1, '2016-10-02 16:17:00'),
  492. (29, 86891762479, NULL, 1, 'Naročilo je bilo potrjeno! [[lokal:21061265696,narocilo:50580618518]]', 1, '2016-10-02 17:35:00'),
  493. (30, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:74584008685]]', 0, '2016-10-02 18:44:00'),
  494. (31, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:19898273093]]', 0, '2016-10-02 18:44:00'),
  495. (32, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:84853657227]]', 0, '2016-10-02 18:50:00'),
  496. (33, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:11874175296]]', 0, '2016-10-02 18:51:00'),
  497. (34, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:43572457320]]', 0, '2016-10-02 18:51:00'),
  498. (35, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:68146521681]]', 0, '2016-10-02 18:52:00'),
  499. (36, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:18770331036]]', 0, '2016-10-02 18:52:00'),
  500. (37, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:08823732167]]', 0, '2016-10-02 18:52:00'),
  501. (38, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:59876134750]]', 0, '2016-10-02 18:53:00'),
  502. (39, 86891762479, NULL, 1, 'Naročilo je bilo potrjeno! [[lokal:21061265696,narocilo:11874175296]]', 1, '2016-10-02 22:40:00'),
  503. (40, 86891762479, NULL, 1, 'Naročilo je bilo potrjeno! [[lokal:21061265696,narocilo:43572457320]]', 1, '2016-10-02 22:40:00'),
  504. (41, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:06984388336]]', 0, '2016-10-03 00:07:00'),
  505. (42, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:21853617921]]', 0, '2016-10-03 15:43:00'),
  506. (43, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:81303587464]]', 0, '2016-10-03 19:47:00'),
  507. (44, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:68260553202]]', 0, '2016-10-03 19:47:00'),
  508. (45, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:83246618353]]', 0, '2016-10-06 16:59:00'),
  509. (46, NULL, 21061265696, 1, 'Novo naročilo! - Odpri za ogled [[narocilo:89358261806]]', 0, '2016-10-06 16:59:00');
  510.  
  511. -- --------------------------------------------------------
  512.  
  513. --
  514. -- Table structure for table `notification_tip`
  515. --
  516.  
  517. CREATE TABLE IF NOT EXISTS `notification_tip` (
  518. `id` int(11) NOT NULL AUTO_INCREMENT,
  519. `naziv` varchar(64) COLLATE utf8_slovenian_ci NOT NULL,
  520. PRIMARY KEY (`id`)
  521. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci AUTO_INCREMENT=2 ;
  522.  
  523. --
  524. -- Dumping data for table `notification_tip`
  525. --
  526.  
  527. INSERT INTO `notification_tip` (`id`, `naziv`) VALUES
  528. (1, 'Obvestilo');
  529.  
  530. -- --------------------------------------------------------
  531.  
  532. --
  533. -- Table structure for table `ocena`
  534. --
  535.  
  536. CREATE TABLE IF NOT EXISTS `ocena` (
  537. `id` int(11) NOT NULL AUTO_INCREMENT,
  538. `fk_lokal_id` bigint(11) NOT NULL,
  539. `fk_uporabnik_id` bigint(11) NOT NULL,
  540. `ocena` int(11) NOT NULL,
  541. PRIMARY KEY (`id`),
  542. KEY `fk_uporabnik_id` (`fk_uporabnik_id`),
  543. KEY `fk_lokal_id` (`fk_lokal_id`)
  544. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
  545.  
  546. --
  547. -- Dumping data for table `ocena`
  548. --
  549.  
  550. INSERT INTO `ocena` (`id`, `fk_lokal_id`, `fk_uporabnik_id`, `ocena`) VALUES
  551. (12, 82386710868, 86891762479, 5),
  552. (13, 52927503148, 86891762479, 3),
  553. (15, 21061265696, 86891762479, 5);
  554.  
  555. -- --------------------------------------------------------
  556.  
  557. --
  558. -- Table structure for table `priljubljeno`
  559. --
  560.  
  561. CREATE TABLE IF NOT EXISTS `priljubljeno` (
  562. `id` int(11) NOT NULL AUTO_INCREMENT,
  563. `fk_uporabnik_id` bigint(20) NOT NULL,
  564. `fk_lokal_id` bigint(20) NOT NULL,
  565. PRIMARY KEY (`id`),
  566. KEY `fk_uporabnik_id` (`fk_uporabnik_id`,`fk_lokal_id`),
  567. KEY `fk_lokal_id` (`fk_lokal_id`)
  568. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=40 ;
  569.  
  570. --
  571. -- Dumping data for table `priljubljeno`
  572. --
  573.  
  574. INSERT INTO `priljubljeno` (`id`, `fk_uporabnik_id`, `fk_lokal_id`) VALUES
  575. (39, 60644838130, 82386710868),
  576. (38, 86891762479, 21061265696),
  577. (19, 86891762479, 52927503148),
  578. (33, 86891762479, 82386710868);
  579.  
  580. -- --------------------------------------------------------
  581.  
  582. --
  583. -- Table structure for table `uporabnik`
  584. --
  585.  
  586. CREATE TABLE IF NOT EXISTS `uporabnik` (
  587. `id` bigint(11) NOT NULL,
  588. `email` varchar(32) NOT NULL,
  589. `ime` varchar(14) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  590. `priimek` varchar(20) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  591. `telefon` varchar(14) NOT NULL,
  592. `naslov` varchar(40) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  593. `kraj` varchar(20) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  594. `geslo` text CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  595. `salt` text NOT NULL,
  596. `ip` varchar(20) NOT NULL,
  597. `datum_registracije` datetime NOT NULL,
  598. `bon` tinyint(1) NOT NULL,
  599. `last_login` datetime NOT NULL,
  600. `narocilo_default_naslov` tinyint(1) NOT NULL DEFAULT '0',
  601. PRIMARY KEY (`id`)
  602. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  603.  
  604. --
  605. -- Dumping data for table `uporabnik`
  606. --
  607.  
  608. INSERT INTO `uporabnik` (`id`, `email`, `ime`, `priimek`, `telefon`, `naslov`, `kraj`, `geslo`, `salt`, `ip`, `datum_registracije`, `bon`, `last_login`, `narocilo_default_naslov`) VALUES
  609. (39419784779, 'poqwek@gmail.com', 'qpwoek', 'qwpoek', '031000000', 'qpwoek', 'qwepok', '984c063ea00984de73129ef5f21aae8ee8b6cc6ea84e1f870b48cb2c09026756', '99688739803629536', '::1', '2016-09-10 12:26:00', 1, '2016-09-10 12:26:00', 0),
  610. (59588628968, 'topkek@gmail.com', 'weiorj', 'qweopk', '031000000', 'qwekowoek', 'qwopek', 'c8af6fbd53a217c783881c02f8e1d78aaf5129bd229e04d890b8c95bb9610f81', '81289829638870888', '::1', '2016-09-24 09:27:00', 1, '2016-09-24 09:27:00', 0),
  611. (60644838130, 'wepqwe@gmail.com', 'weopjr', 'asoijd', '031000000', 'wqweokp', 'qweopk', '70a2f9d3e15e2610f1cad7068a03c70fe4cba94563e6739f66ccd1334ff894ee', '04425336146648702', '::1', '2016-10-03 19:45:00', 1, '2016-10-03 19:45:00', 0),
  612. (78285812078, 'woekew@gmail.com', 'jaz', 'sem', '031000000', 'novak', 'wleowe', 'ac816e3b39c0d11aa1648be05e008ae78a0d65594dad410830c5f95ed471de8c', '95682518407447908', '::1', '2016-10-03 19:45:00', 0, '2016-10-03 19:45:00', 0),
  613. (86891762479, 'tilen1@gmail.com', 'Tilen', 'Priimek', '031000000', 'Naslov 12', 'Maribor', '2bac383336519df7129ca77575dad272bfe86ff8547a6841dc1f8e648086654c', '80509632030640054', '::1', '2016-09-10 14:18:00', 1, '2016-10-06 16:59:00', 0);
  614.  
  615. -- --------------------------------------------------------
  616.  
  617. --
  618. -- Table structure for table `uporabnik_nagrada`
  619. --
  620.  
  621. CREATE TABLE IF NOT EXISTS `uporabnik_nagrada` (
  622. `id` int(11) NOT NULL AUTO_INCREMENT,
  623. `fk_uporabnik_id` bigint(20) NOT NULL,
  624. `fk_nagrada_id` int(11) NOT NULL,
  625. `datum_prejema` datetime NOT NULL,
  626. PRIMARY KEY (`id`),
  627. KEY `fk_uporabnik_id` (`fk_uporabnik_id`,`fk_nagrada_id`),
  628. KEY `fk_uporabnik_id_2` (`fk_uporabnik_id`),
  629. KEY `fk_nagrada_id` (`fk_nagrada_id`)
  630. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci AUTO_INCREMENT=4 ;
  631.  
  632. --
  633. -- Dumping data for table `uporabnik_nagrada`
  634. --
  635.  
  636. INSERT INTO `uporabnik_nagrada` (`id`, `fk_uporabnik_id`, `fk_nagrada_id`, `datum_prejema`) VALUES
  637. (2, 86891762479, 3, '2016-10-01 14:40:00'),
  638. (3, 60644838130, 1, '2016-10-03 19:47:00');
  639.  
  640. --
  641. -- Constraints for dumped tables
  642. --
  643.  
  644. --
  645. -- Constraints for table `akcija`
  646. --
  647. ALTER TABLE `akcija`
  648. ADD CONSTRAINT `akcija_ibfk_1` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  649.  
  650. --
  651. -- Constraints for table `feedback`
  652. --
  653. ALTER TABLE `feedback`
  654. ADD CONSTRAINT `feedback_ibfk_1` FOREIGN KEY (`fk_uporabnik_id`) REFERENCES `uporabnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  655. ADD CONSTRAINT `feedback_ibfk_2` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  656.  
  657. --
  658. -- Constraints for table `jedilnik`
  659. --
  660. ALTER TABLE `jedilnik`
  661. ADD CONSTRAINT `jedilnik_ibfk_1` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  662.  
  663. --
  664. -- Constraints for table `jedilnik_meni`
  665. --
  666. ALTER TABLE `jedilnik_meni`
  667. ADD CONSTRAINT `jedilnik_meni_ibfk_1` FOREIGN KEY (`fk_jedilnik_id`) REFERENCES `jedilnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  668. ADD CONSTRAINT `jedilnik_meni_ibfk_2` FOREIGN KEY (`fk_jedilnik_tip`) REFERENCES `jedilnik_tip` (`id`) ON DELETE SET NULL ON UPDATE SET NULL;
  669.  
  670. --
  671. -- Constraints for table `lokal_nagrada`
  672. --
  673. ALTER TABLE `lokal_nagrada`
  674. ADD CONSTRAINT `lokal_nagrada_ibfk_1` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  675. ADD CONSTRAINT `lokal_nagrada_ibfk_2` FOREIGN KEY (`fk_nagrada_id`) REFERENCES `nagrada` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  676.  
  677. --
  678. -- Constraints for table `narocilo`
  679. --
  680. ALTER TABLE `narocilo`
  681. ADD CONSTRAINT `narocilo_ibfk_1` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  682. ADD CONSTRAINT `narocilo_ibfk_2` FOREIGN KEY (`fk_uporabnik_id`) REFERENCES `uporabnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  683. ADD CONSTRAINT `narocilo_ibfk_3` FOREIGN KEY (`fk_jedilnik_meni_id`) REFERENCES `jedilnik_meni` (`id`) ON DELETE SET NULL ON UPDATE SET NULL,
  684. ADD CONSTRAINT `narocilo_ibfk_4` FOREIGN KEY (`fk_nacin_placila`) REFERENCES `nacin_placila` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  685.  
  686. --
  687. -- Constraints for table `narocilo_feedback`
  688. --
  689. ALTER TABLE `narocilo_feedback`
  690. ADD CONSTRAINT `narocilo_feedback_ibfk_1` FOREIGN KEY (`fk_uporabnik_id`) REFERENCES `uporabnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  691. ADD CONSTRAINT `narocilo_feedback_ibfk_2` FOREIGN KEY (`fk_narocilo_id`) REFERENCES `narocilo` (`id`) ON DELETE SET NULL ON UPDATE SET NULL,
  692. ADD CONSTRAINT `narocilo_feedback_ibfk_3` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  693.  
  694. --
  695. -- Constraints for table `notification`
  696. --
  697. ALTER TABLE `notification`
  698. ADD CONSTRAINT `notification_ibfk_1` FOREIGN KEY (`fk_uporabnik_id`) REFERENCES `uporabnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  699. ADD CONSTRAINT `notification_ibfk_2` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  700. ADD CONSTRAINT `notification_ibfk_3` FOREIGN KEY (`fk_notification_id`) REFERENCES `notification_tip` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  701.  
  702. --
  703. -- Constraints for table `ocena`
  704. --
  705. ALTER TABLE `ocena`
  706. ADD CONSTRAINT `ocena_ibfk_1` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  707. ADD CONSTRAINT `ocena_ibfk_2` FOREIGN KEY (`fk_uporabnik_id`) REFERENCES `uporabnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  708.  
  709. --
  710. -- Constraints for table `priljubljeno`
  711. --
  712. ALTER TABLE `priljubljeno`
  713. ADD CONSTRAINT `priljubljeno_ibfk_1` FOREIGN KEY (`fk_uporabnik_id`) REFERENCES `uporabnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  714. ADD CONSTRAINT `priljubljeno_ibfk_2` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  715.  
  716. --
  717. -- Constraints for table `uporabnik_nagrada`
  718. --
  719. ALTER TABLE `uporabnik_nagrada`
  720. ADD CONSTRAINT `uporabnik_nagrada_ibfk_1` FOREIGN KEY (`fk_uporabnik_id`) REFERENCES `uporabnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  721. ADD CONSTRAINT `uporabnik_nagrada_ibfk_2` FOREIGN KEY (`fk_nagrada_id`) REFERENCES `nagrada` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  722.  
  723. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  724. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  725. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement