--
-- iCanteen 2.2.09 offline
-- 

--
-- Table structure for table `dodavatel`
--

CREATE TABLE `dodavatel` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `nazev` varchar(150) default NULL,
  `zkraceny_nazev` varchar(20) default NULL,
  `ulice` varchar(50) default NULL,
  `obec` varchar(50) default NULL,
  `psc` varchar(10) default NULL,
  `ico` varchar(30) default NULL,
  `dico` varchar(30) default NULL,
  `cislo_uctu` varchar(30) default NULL,
  `kod_banky` varchar(10) default NULL,
  `nazev_banky` varchar(50) default NULL,
  `pracovnik` varchar(30) default NULL,
  `telefon` varchar(20) default NULL,
  `fax` varchar(20) default NULL,
  `vsymb` varchar(20) default NULL,
  `ksymb` varchar(20) default NULL,
  `ssymb` varchar(20) default NULL,
  `email` varchar(50) default NULL,
  `ss` tinyint(1) unsigned NOT NULL default '0',
  `provozovna` tinyint(4) NOT NULL default '0',
  `zapis` varchar(255) default NULL,
  `poznamka` varchar(100) default NULL,
  `Platce` tinyint(1) unsigned NOT NULL default '0',
  `zahlavi` text,
  `zapati` text,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `idents`
--

CREATE TABLE `idents` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `ident` varchar(100) NOT NULL default '',
  `modd` date default '2005-01-01',
  `modt` time default '01:01:01',
  `fmdd` date default '2005-01-01',
  `fmdt` time default '01:01:01',
  `rc` int(10) unsigned NOT NULL default '1',
  `rrc` int(10) unsigned NOT NULL default '1',
  `conf` varchar(100) default '',
  `hibyte` varchar(200) NOT NULL default '',
  `lobyte` varchar(200) NOT NULL default '',
  `loword` varchar(200) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `jidlo`
--

CREATE TABLE `jidlo` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `id_misto` int(10) unsigned default '0',
  `datum` date NOT NULL default '2005-01-01',
  `chod` varchar(20) default NULL,
  `cid` int(11) unsigned NOT NULL default '0',
  `str` mediumtext,
  `skut` int(11) unsigned default '0',
  `r0` int(10) unsigned default '0',
  `r1` int(10) unsigned default '0',
  `r2` int(10) unsigned default '0',
  `r3` int(10) unsigned default '0',
  `r4` int(10) unsigned default '0',
  `r5` int(10) unsigned default '0',
  `r6` int(10) unsigned default '0',
  `r7` int(10) unsigned default '0',
  `den` int(10) unsigned default '0',
  `volny` int(10) unsigned default '0',
  `poradi` int(10) unsigned default '0',
  `schvaleno` tinyint(4) NOT NULL default '0',
  `jidel_max` int(10) unsigned NOT NULL default '0',
  `DruhChodu` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `jid_r0` (`r0`),
  KEY `jid_r1` (`r1`),
  KEY `jid_r2` (`r2`),
  KEY `jid_r3` (`r3`),
  KEY `jid_r4` (`r4`),
  KEY `jid_r5` (`r5`),
  KEY `jid_r6` (`r6`),
  KEY `jid_r7` (`r7`),
  KEY `jid_den` (`schvaleno`,`datum`,`id_misto`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `pavdata`
--

CREATE TABLE `pavdata` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `dta` longblob,
  `datum` date default '0000-00-00',
  `datum_end` date default '0000-00-00',
  `cas` time default '00:00:00',
  `cas_end` time default '00:00:00',
  `hotovo` tinyint(4) NOT NULL default '0',
  `soubor` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `pavinfo`
--

CREATE TABLE `pavinfo` (
  `id` int(11) NOT NULL auto_increment,
  `W1` datetime default '2005-01-01 00:00:00',
  `W2` datetime default '2005-01-01 00:00:00',
  `Mesic` int(11) NOT NULL default '0',
  `Hvezdy` int(11) NOT NULL default '0',
  `Datax` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `pavtest`
--

CREATE TABLE `pavtest` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `nazev` varchar(100) NOT NULL default '',
  `data1` text,
  `data2` text,
  `data3` text,
  `data4` text,
  `data5` text,
  `data6` text,
  `strav` int(11) NOT NULL default '0',
  `kateg` int(11) NOT NULL default '0',
  `celkem` int(11) NOT NULL default '0',
  `datum` date NOT NULL default '2005-01-01',
  `cas` time NOT NULL default '00:00:01',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `pocty_jidel`
--

CREATE TABLE `pocty_jidel` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `k_id` int(10) unsigned NOT NULL default '0',
  `c_id` int(10) unsigned NOT NULL default '0',
  `jidlo` int(10) unsigned NOT NULL default '0',
  `cnt` int(10) NOT NULL default '0',
  `id_gold5` int(10) unsigned NOT NULL default '0',
  `vydejka` int(10) unsigned NOT NULL default '0',
  `id_norm` int(10) unsigned NOT NULL default '0',
  `datum` date NOT NULL default '2005-01-01',
  `id_stredisko` int(10) unsigned NOT NULL default '0',
  `koef_ksk` double NOT NULL default '0',
  `norm` double NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `rtr_sablony`
--

CREATE TABLE `rtr_sablony` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `id_misto` int(10) unsigned default '0',
  `vydejOd` datetime default '2005-01-01 01:01:01',
  `vydejDo` datetime default '2005-01-01 01:01:01',
  `id_kategorie` int(10) unsigned NOT NULL default '0',
  `hromadne` tinyint(11) NOT NULL default '0',
  `platiOd` date default '2005-01-01',
  `platiDo` date default '2005-01-01',
  `objednatdo` datetime default '2005-01-01 14:00:00',
  `zrusitdo` datetime default '2005-01-01 14:00:00',
  `jidel_min` int(11) default '1',
  `jidel_max` int(11) default '1',
  `limit_jidel` int(11) default '10',
  `DaysObjednat` int(11) default '1',
  `DaysZrusit` int(11) default '1',
  `Variant` int(11) default NULL,
  `Priority` int(11) default '1',
  `poradi_jid` int(11) default '1',
  `schvaleno` tinyint(4) NOT NULL default '0',
  `burzaOd` datetime default '2005-01-01 01:01:01',
  `burzaDo` datetime default '2005-01-01 01:01:01',
  `id_svatek` int(11) default '0',
  `sgrp` int(11) default '0',
  `relace_id` int(10) unsigned default '0',
  `absoluteLimitObjednat` int(1) default '0',
  `absoluteLimitZrusit` int(1) default '0',
  `zrusitDoDisplay` datetime default '2005-01-01 14:00:00',
  `objednatDoDisplay` datetime default '2005-01-01 14:00:00',
  PRIMARY KEY  (`id`),
  KEY `rtr_platnost` (`platiOd`,`platiDo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `rtr_setting`
--

CREATE TABLE `rtr_setting` (
  `setting_id` int(11) NOT NULL auto_increment,
  `settingKey` varchar(255) default NULL,
  `settingValue` int(11) default '0',
  `ID` int(11) unsigned NOT NULL default '1',
  `checkJidelnicek` int(11) NOT NULL default '1',
  `saturday_sunday` tinyint(1) NOT NULL default '1',
  `onlyOneMessPerDay` tinyint(1) NOT NULL default '0',
  `onlyOneMessPerMeal` tinyint(1) NOT NULL default '0',
  `useDonation` tinyint(1) NOT NULL default '0',
  `useRelations` tinyint(1) NOT NULL default '0',
  `useburza` tinyint(1) NOT NULL default '0',
  `watchTerminals` tinyint(1) NOT NULL default '0',
  `runMesses` tinyint(1) NOT NULL default '0',
  `soapWithMeal` int(11) default '0',
  `useValidity` int(11) default '0',
  `objednavkyAvailable` int(11) default '1',
  `mesicniAvailable` int(11) default '1',
  `tydenniAvailable` int(11) default '1',
  `denniAvailable` int(11) default '1',
  `platbyAvailable` int(11) default '1',
  `specialniPravidla` int(1) default '0',
  `spotrebaAvailable` int(1) default '1',
  `kreditAvailable` int(1) default '0',
  PRIMARY KEY  (`setting_id`),
  UNIQUE KEY `UniqueSettingKey` (`settingKey`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `rtr_statistics`
--

CREATE TABLE `rtr_statistics` (
  `statistic_id` bigint(20) NOT NULL auto_increment,
  `stravnik_id` bigint(20) default NULL,
  `type` int(3) default NULL,
  `count` int(11) default '1',
  `Date` datetime default NULL,
  PRIMARY KEY  (`statistic_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Statistiky praces s icanteen';

--
-- Table structure for table `rtr_status`
--

CREATE TABLE `rtr_status` (
  `status_id` bigint(20) NOT NULL auto_increment,
  `status` int(11) default '0',
  `kategorie_id` int(11) default '0',
  `vydejna_id` int(11) default '0',
  `TimeFrom` datetime default NULL,
  `TimeTo` datetime default NULL,
  PRIMARY KEY  (`status_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `tcenik`
--

CREATE TABLE `tcenik` (
  `Cenik_Id` int(11) unsigned NOT NULL auto_increment,
  `Jidelna_Id` tinyint(4) unsigned NOT NULL default '0',
  `Kategorie_Id` int(11) unsigned NOT NULL default '0',
  `DruhJidla_Id` tinyint(4) unsigned NOT NULL default '0',
  `Chod_Id` int(11) unsigned NOT NULL default '0',
  `DotChod` tinyint(1) unsigned NOT NULL default '0',
  `Cena1BezDPH` double(5,2) NOT NULL default '0.00',
  `Cena1DPH` tinyint(4) NOT NULL default '0',
  `Cena1SazbaDPH` double(5,2) NOT NULL default '0.00',
  `Cena1VcetneDPH` double(5,2) NOT NULL default '0.00',
  `PocetKusu` smallint(4) NOT NULL default '1',
  `PocetKusuDo` int(4) unsigned NOT NULL default '0',
  `MaxPocetDalsichKusu` tinyint(4) NOT NULL default '0',
  `Cena2BezDPH` double(5,2) NOT NULL default '0.00',
  `Cena2DPH` tinyint(4) NOT NULL default '0',
  `Cena2SazbaDPH` double(5,2) NOT NULL default '0.00',
  `Cena2VcetneDPH` double(5,2) NOT NULL default '0.00',
  `Prisp1BezDPH` double(5,2) NOT NULL default '0.00',
  `Prisp1DPH` tinyint(4) NOT NULL default '0',
  `Prisp1SazbaDPH` double(5,2) NOT NULL default '0.00',
  `Prisp1VcetneDPH` double(5,2) NOT NULL default '0.00',
  `Prisp2BezDPH` double(5,2) NOT NULL default '0.00',
  `Prisp2DPH` tinyint(4) NOT NULL default '0',
  `Prisp2SazbaDPH` double(5,2) NOT NULL default '0.00',
  `Prisp2VcetneDPH` double(5,2) NOT NULL default '0.00',
  `FNBezDPH` double(5,2) NOT NULL default '0.00',
  `FNDPH` tinyint(4) NOT NULL default '0',
  `FNSazbaDPH` double(5,2) NOT NULL default '0.00',
  `FNVcetneDPH` double(5,2) NOT NULL default '0.00',
  `MzdovaRezie` double(5,2) NOT NULL default '0.00',
  `ProvozniRezie` double(5,2) NOT NULL default '0.00',
  `VecneNaklady` double(5,2) NOT NULL default '0.00',
  `PlatnostCenyOd` date default NULL,
  `PlatnostCenyDo` date default NULL,
  `Stredisko_Id` int(10) unsigned NOT NULL default '0',
  `koef_ksk` double NOT NULL default '1',
  `KatSpotr` tinyint(1) NOT NULL default '4',
  `FirmaFN` int(10) unsigned default '0',
  `FirmaMR` int(10) unsigned default '0',
  `FirmaPR` int(10) unsigned default '0',
  `FirmaVN` int(10) unsigned default '0',
  `FirmaC1` int(10) unsigned default NULL,
  `FirmaC2` int(10) unsigned default NULL,
  `FirmaP1` int(10) unsigned default NULL,
  `FirmaP2` int(10) unsigned default NULL,
  `MxPocetTypu` tinyint(4) unsigned NOT NULL default '0',
  `Norm_id` int(10) unsigned NOT NULL default '1',
  `FKSP` double NOT NULL default '0',
  `FKSPSazbaDPH` double NOT NULL default '0',
  `FKSPDPH` int(11) NOT NULL default '0',
  `FKSPBezDPH` double NOT NULL default '0',
  PRIMARY KEY  (`Cenik_Id`),
  KEY `Cenik` (`Kategorie_Id`,`Chod_Id`,`Cena1BezDPH`,`Cena1SazbaDPH`,`Cena1VcetneDPH`,`Prisp1BezDPH`,`Prisp1SazbaDPH`,`Prisp1VcetneDPH`,`Prisp2VcetneDPH`,`FNSazbaDPH`,`PlatnostCenyOd`,`PlatnostCenyDo`,`Prisp2BezDPH`,`Prisp2SazbaDPH`),
  KEY `tcen_platnosti` (`PlatnostCenyOd`,`PlatnostCenyDo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cenik';

--
-- Table structure for table `tchody`
--

CREATE TABLE `tchody` (
  `Chod_Id` int(11) unsigned NOT NULL auto_increment,
  `ChodTxt` varchar(30) default NULL,
  `PoradiNaJidelnicku` int(10) unsigned NOT NULL default '0',
  `BarvaChodu` tinyint(4) default '0',
  `ZkratkaChodu` varchar(4) default NULL,
  `PoradiChodu` tinyint(4) NOT NULL default '0',
  `SymbolTerminalu` varchar(255) default NULL,
  `VybranySymbol` char(1) NOT NULL default '',
  `ZobrazitChod` tinyint(1) unsigned NOT NULL default '1',
  `CisloChodu` tinyint(1) default NULL,
  `TypChodu` tinyint(3) unsigned NOT NULL default '0',
  `DruhChodu` int(10) unsigned NOT NULL default '0',
  `TiskChodu` tinyint(4) unsigned NOT NULL default '0',
  `PrioritaC12` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`Chod_Id`),
  KEY `Chody` (`Chod_Id`,`ChodTxt`),
  KEY `Term` (`Chod_Id`,`SymbolTerminalu`,`ZkratkaChodu`,`PoradiChodu`,`VybranySymbol`),
  KEY `PriorChody` (`Chod_Id`,`PrioritaC12`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `tdruhplatby`
--

CREATE TABLE `tdruhplatby` (
  `DruhPlatby_Id` tinyint(4) NOT NULL auto_increment,
  `DruhPlatbyTxt` varchar(20) NOT NULL default '',
  `DruhPlatbyPopis` varchar(250) default NULL,
  `DruhPlatbyTyp` tinyint(4) unsigned NOT NULL default '0',
  `DruhPlatbyKonto` tinyint(2) unsigned NOT NULL default '0',
  PRIMARY KEY  (`DruhPlatby_Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='DruhPlatby';


--
-- Table structure for table `tkategorie`
--

CREATE TABLE `tkategorie` (
  `Kategorie_Id` int(11) unsigned NOT NULL auto_increment,
  `KategorieTxt` varchar(30) NOT NULL default '',
  `CisloKateg` int(4) unsigned NOT NULL default '0',
  `FirmaCipy_Id` int(10) unsigned NOT NULL default '0',
  `VelikostPorce` tinyint(1) unsigned default NULL,
  `PocetDot` tinyint(4) unsigned NOT NULL default '0',
  `DM` tinyint(3) unsigned NOT NULL default '0',
  `KategDo` varchar(11) default '',
  `vekod` int(10) unsigned NOT NULL default '0',
  `vekdo` int(10) unsigned NOT NULL default '0',
  `specialniPravidlo` int(1) default '1',
  PRIMARY KEY  (`Kategorie_Id`),
  KEY `Kategorie` (`Kategorie_Id`,`KategorieTxt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `tobjednavky`
--

CREATE TABLE `tobjednavky` (
  `Objednavka_Id` int(11) unsigned NOT NULL auto_increment,
  `Stravnik_Id` int(11) unsigned NOT NULL default '0',
  `Jidelna_Id` tinyint(4) unsigned default '0',
  `Vydejna_Id` int(11) unsigned default '0',
  `Datum` date NOT NULL default '0000-00-00',
  `Chod_Id` int(11) unsigned NOT NULL default '0',
  `NahradniChod_Id` tinyint(4) unsigned default '0',
  `Kusu` int(11) NOT NULL default '0',
  `VyslednaCena` double(5,2) default '0.00',
  `DatumObj` date default NULL,
  `CasObj` time default '00:00:00',
  `ZdrojObj_Id` tinyint(4) default '0',
  `ObjednavkaPrijata` tinyint(1) default '0',
  `VydejPrvniDatum` date default NULL,
  `VydejPrvniCas` time default '00:00:00',
  `VydejPosledniDatum` date default NULL,
  `VydejPosledniCas` time default '00:00:00',
  `VydanoKusu` int(11) default '0',
  `VydanoZdroj` int(11) default '0',
  `Vyuctovani` int(11) default '0',
  `Burza` tinyint(4) default '0',
  `Platne` int(4) NOT NULL default '1',
  `Archivace` int(11) default '0',
  `KusuC1` int(11) NOT NULL default '0',
  `KusuC2` int(11) NOT NULL default '0',
  `BurzaDatumCas` datetime default '0000-00-00 00:00:00',
  `VlastChodu_Id` int(11) unsigned default '1',
  `kategorie_id` tinyint(4) NOT NULL default '0',
  `druhjidla_id` tinyint(4) unsigned default '0',
  PRIMARY KEY  (`Objednavka_Id`),
  UNIQUE KEY `prim_klic` (`Stravnik_Id`,`Chod_Id`,`Datum`,`Vydejna_Id`,`Jidelna_Id`),
  KEY `Obj` (`Stravnik_Id`,`Chod_Id`,`Kusu`,`Datum`),
  KEY `tobj_chod_id` (`Chod_Id`),
  KEY `tobj_sum_chody` (`Chod_Id`,`Datum`,`Vydejna_Id`),
  KEY `tobj_den` (`Stravnik_Id`,`Datum`),
  KEY `tobj_kusu` (`Kusu`,`VydanoKusu`),
  KEY `i_has_objednavky` (`Datum`,`Stravnik_Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Objednavky';

--
-- Table structure for table `tplatby`
--

CREATE TABLE `tplatby` (
  `Pokladna_Id` int(11) unsigned NOT NULL default '0',
  `Stravnik_Id` int(11) unsigned NOT NULL default '0',
  `DatumPlatby` date default NULL,
  `ZpusobPlatby_Id` tinyint(4) NOT NULL default '0',
  `DruhPlatby_Id` tinyint(4) NOT NULL default '0',
  `Castka` double(8,2) NOT NULL default '0.00',
  `CisloDokladu` varchar(10) default '0',
  `Platba_Id` int(11) unsigned NOT NULL auto_increment,
  `StavKonta` double(7,2) NOT NULL default '0.00',
  `Faktura_Id` int(8) unsigned NOT NULL default '0',
  `Poznamka` varchar(250) default NULL,
  `ImportPlatby_Id` int(11) unsigned NOT NULL default '0',
  `DatumObjOd` date default '0000-00-00',
  `DatumObjDo` date default '0000-00-00',
  `DatumDPHOd` date default '0000-00-00',
  `DatumDPHDo` date default '0000-00-00',
  `PRN` int(5) unsigned NOT NULL default '0',
  `CZPL` time default NULL,
  `DZPL` date default NULL,
  `U_id` tinyint(4) unsigned NOT NULL default '0',
  `casplatby` time NOT NULL default '00:00:00',
  PRIMARY KEY  (`Platba_Id`),
  KEY `Platby` (`Stravnik_Id`,`DatumPlatby`,`ZpusobPlatby_Id`,`DruhPlatby_Id`,`Castka`),
  KEY `tplat_stravnik` (`Stravnik_Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Platby';

--
-- Table structure for table `tstravnici`
--

CREATE TABLE `tstravnici` (
  `Stravnici_Id` int(11) unsigned NOT NULL auto_increment,
  `Stravnik_Id` int(11) unsigned NOT NULL default '0',
  `StravnikCis` int(7) unsigned NOT NULL default '0',
  `EvCis` varchar(20) default NULL,
  `Hromadny` tinyint(4) unsigned NOT NULL default '0',
  `StravnikUliceCislo` varchar(35) default NULL,
  `StravnikMesto` varchar(35) default NULL,
  `StravnikPSC` varchar(6) default NULL,
  `StravnikCisloUctu` varchar(20) default NULL,
  `StravnikPredcisli` varchar(6) default NULL,
  `StravnikKodBanky` varchar(4) default NULL,
  `StravnikVarSymbol` varchar(20) default NULL,
  `StravnikSpecSymbol` varchar(10) default NULL,
  `StravnikGSM` varchar(30) default NULL,
  `StravnikEmail` varchar(20) default NULL,
  `PlatnostDo` date default NULL,
  `PlatnostOd` date default NULL,
  `Cip_Id` int(11) unsigned NOT NULL default '0',
  `Firma_Id` tinyint(4) NOT NULL default '0',
  `Kategorie_Id` int(11) unsigned NOT NULL default '0',
  `Skupina_Id` int(11) unsigned NOT NULL default '0',
  `Trida_Id` int(11) unsigned NOT NULL default '0',
  `ZpusobPlatbyMenu_Id` tinyint(4) unsigned NOT NULL default '0',
  `ZpusobPlatbyUbytovani_Id` tinyint(4) unsigned NOT NULL default '0',
  `SimulaceKr` tinyint(1) unsigned NOT NULL default '0',
  `ZpusobPlatbyBufet_Id` tinyint(4) unsigned NOT NULL default '0',
  `LimitKr` double NOT NULL default '0',
  PRIMARY KEY  (`Stravnici_Id`),
  KEY `Strav` (`Stravnik_Id`,`Kategorie_Id`,`Skupina_Id`,`PlatnostDo`,`PlatnostOd`,`Cip_Id`,`Trida_Id`,`ZpusobPlatbyMenu_Id`),
  KEY `i_stravnik_id` (`Stravnik_Id`),
  KEY `i_cip_id` (`Cip_Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Seznam stravniku';

--
-- Table structure for table `tstravnicistat`
--

CREATE TABLE `tstravnicistat` (
  `Stravnik_Id` int(11) unsigned NOT NULL auto_increment,
  `StravnikJmeno` varchar(25) default NULL,
  `StravnikPrijmeni` varchar(25) default NULL,
  `StravnikLoginName` varchar(30) default NULL,
  `StravnikPassword` varchar(30) default NULL,
  `StravnikOtazka_Id` tinyint(4) NOT NULL default '0',
  `StravnikOdpoved` varchar(30) default NULL,
  `RodCislo` varchar(20) default NULL,
  `DatumNarozeni` date default NULL,
  `roles` varchar(100) NOT NULL default 'user',
  `StravnikPoznamka` varchar(250) default NULL,
  `InkMax` double NOT NULL default '0',
  `defaultVydejna` int(11) NOT NULL default '1',
  `InkMin` double NOT NULL default '0',
  `zmenenyUdaje` tinyint(4) NOT NULL default '0',
  `lastKredit` datetime default NULL,
  `lastPotvrzeni` datetime default NULL,
  `lastJidelnicek` datetime default NULL,
  `kreditSend` double default '50',
  `jidelnicekSend` int(1) default '0',
  `potvrzeniSend` int(1) default '0',
  `saveVydejna` int(1) default '1',
  `FixVyd` tinyint(4) NOT NULL default '0',
  `DefVlastChodu_id` int(11) unsigned NOT NULL default '1',
  `Sluzba_Id` int(11) unsigned default NULL,
  `Sel` tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`Stravnik_Id`),
  KEY `TSS` (`Stravnik_Id`,`StravnikJmeno`,`StravnikPrijmeni`),
  KEY `DefVyd` (`defaultVydejna`),
  KEY `tstat_stravnik` (`Stravnik_Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Seznam stravniku - staticke udaje';

--
-- Table structure for table `tvydejny`
--

CREATE TABLE `tvydejny` (
  `Vydejna_Id` int(10) unsigned NOT NULL auto_increment,
  `VydejnaTxt` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`Vydejna_Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `tzdrojeobj`
--

CREATE TABLE `tzdrojeobj` (
  `ZdrojObj_Id` tinyint(4) NOT NULL auto_increment,
  `ZdrojObjTxt` varchar(20) NOT NULL default '',
  `popis` varchar(255) NOT NULL default '',
  `ZdrojColor` int(11) NOT NULL default '0',
  `active` tinyint(4) NOT NULL default '0',
  `symb` char(1) NOT NULL default '',
  `poradi` int(11) NOT NULL default '0',
  `Datum1` datetime default '2005-01-01 00:00:00',
  `Datum2` datetime default '2005-01-01 00:00:00',
  `failsave` varchar(255) NOT NULL default '',
  `mealset` varchar(255) NOT NULL default '',
  `gr` varchar(255) NOT NULL default '',
  `datavt` tinyint(4) NOT NULL default '0',
  `TOData` int(11) NOT NULL default '0',
  `TOCom` int(11) NOT NULL default '0',
  `TODataC` int(11) NOT NULL default '0',
  `TOComC` int(11) NOT NULL default '0',
  PRIMARY KEY  (`ZdrojObj_Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Zdroje objednavek';

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `jmeno` varchar(30) NOT NULL default '',
  `heslo` varchar(30) NOT NULL default '',
  `sklad` varchar(255) NOT NULL default '',
  `stravne` varchar(255) NOT NULL default '',
  `ss` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `verze`
--

CREATE TABLE `verze` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `verze` varchar(10) NOT NULL default '',
  `jid` varchar(10) NOT NULL default '',
  `buffet` varchar(10) NOT NULL default '',
  `pavouk` varchar(10) NOT NULL default '',
  `stravne` varchar(10) NOT NULL default '',
  `ur` varchar(10) NOT NULL default '',
  `iCanteen` varchar(10) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
--
--

INSERT INTO `rtr_setting` (settingKey,settingValue) VALUES ('mesicniAvailable', 1);
INSERT INTO `rtr_setting` (settingKey,settingValue) VALUES ('platbyAvailable',  0);
INSERT INTO `rtr_setting` (settingKey,settingValue) VALUES ('spotrebaAvailable',0);
INSERT INTO `rtr_setting` (settingKey,settingValue) VALUES ('kreditAvailable',  2);
INSERT INTO `rtr_setting` (settingKey,settingValue) VALUES ('usValidity',       1);

--
--
--

INSERT INTO `tdruhplatby` VALUES (1,'Stravné',NULL,1,1);

--
--
--
