-- PhD Center Database Backup script
-- Powered by mysqldump-php https://github.com/ifsnop/mysqldump-php
--
-- Host: localhost	Database: phdcenter
-- ------------------------------------------------------
-- MySQL Server version: 	5.5.38-0ubuntu0.14.04.1
-- Backup from: Wed, 17 Dec 2014 09:16:45 +0200

--
-- Table structure for table `accounts`
--

CREATE TABLE `accounts` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  `name` text NOT NULL,
  `contactperson` text NOT NULL,
  `notes` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `accounts`
--

INSERT INTO `accounts` VALUES (1,4,1418576657,'asd','Ivan','nqma zabelejki');
--
-- Table structure for table `accounts_data`
--

CREATE TABLE `accounts_data` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `account_id` bigint(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `service_id` int(11) NOT NULL,
  `service_text` text NOT NULL,
  `quantity` int(11) NOT NULL,
  `price` float NOT NULL,
  `discard` int(11) NOT NULL,
  `timestamp` bigint(20) NOT NULL,
  `person_name` text NOT NULL,
  `notes` text NOT NULL,
  `document` int(11) NOT NULL DEFAULT '0',
  `deleted` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `accounts_data`
--

INSERT INTO `accounts_data` VALUES (1,1,4,1,'',50,'0.1',0,1418576698,'Dragan','',0,1),(2,1,4,1,'',50,'0.1',0,1418576836,'Dragan','',1,0);
--
-- Table structure for table `documents`
--

CREATE TABLE `documents` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `account_id` bigint(20) NOT NULL,
  `person` varchar(255) NOT NULL,
  `user` bigint(20) NOT NULL,
  `timestamp` bigint(20) NOT NULL,
  `notes` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `documents`
--

INSERT INTO `documents` VALUES (1,1,'Ivan',4,1418576950,'');
--
-- Table structure for table `keys`
--

CREATE TABLE `keys` (
  `user` bigint(20) NOT NULL,
  `value` varchar(255) NOT NULL,
  `expiration` bigint(20) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `keys`
--

--
-- Table structure for table `log_data`
--

CREATE TABLE `log_data` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `service_id` int(11) NOT NULL,
  `service_text` text NOT NULL,
  `quantity` int(11) NOT NULL,
  `price` float NOT NULL,
  `discard` int(11) NOT NULL,
  `timestamp` bigint(20) NOT NULL,
  `notes` text NOT NULL,
  `price_type` int(11) NOT NULL DEFAULT '0',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `log_data`
--

INSERT INTO `log_data` VALUES (1,1,1,'Печат А4','-500','0.1',0,1418576046,'',0,1),(2,4,1,'Печат А4','-50','0.1',0,1418576449,'',0,1),(3,4,3,'Запис CD/DVD с носител','-100',1,0,1418577163,'',0,1),(4,5,3,'Запис CD/DVD с носител','-500',1,0,1418627861,'',0,1);
--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `timestamp` bigint(20) NOT NULL,
  `user` int(11) NOT NULL,
  `subject` varchar(255) NOT NULL DEFAULT '(none)',
  `message` text NOT NULL,
  `flag_important` int(11) NOT NULL,
  `response_to` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `messages`
--

INSERT INTO `messages` VALUES (1,1418577211,4,'Test','TEst tEst TEST tst',1,0),(2,1418577369,4,'Test2','[size=18][color=red][b]test[/b][/color=red][/size=18]',0,0),(3,1418577489,4,'Test3','[size=18][color=red][b]Test[/b][/color][/size]',0,0),(4,1418627719,5,'test','&lt;div style= \\\'heigth: 100px; background-color: red;\\\'&gt;awidaih&lt;/div&gt;',0,3);
--
-- Table structure for table `notes`
--

CREATE TABLE `notes` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `owner` int(11) NOT NULL,
  `content` text NOT NULL,
  `color` varchar(255) NOT NULL,
  `timestamp` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `notes`
--

--
-- Table structure for table `pricelist`
--

CREATE TABLE `pricelist` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `description` text NOT NULL,
  `baseprice` double NOT NULL,
  `measure` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `pricelist`
--

INSERT INTO `pricelist` VALUES (1,'Печат А4','0.08','страница'),(2,'Копиране А4','0.05','страница'),(3,'Запис CD/DVD с носител','0.83','брой');
--
-- Table structure for table `usergroups`
--

CREATE TABLE `usergroups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `access_admin` int(11) NOT NULL DEFAULT '0',
  `access_pricelist` int(11) NOT NULL DEFAULT '0',
  `access_pricelist_add` int(11) NOT NULL DEFAULT '0' COMMENT 'Whether or not a user can add new items to the price list.',
  `access_rec` int(11) NOT NULL DEFAULT '0',
  `access_rec_add` int(11) NOT NULL DEFAULT '0',
  `access_users` int(11) NOT NULL DEFAULT '0',
  `access_users_create` int(11) NOT NULL DEFAULT '0',
  `access_accounts` int(11) NOT NULL DEFAULT '0',
  `access_accounts_new` int(11) NOT NULL DEFAULT '0',
  `access_accounts_addentries` int(11) NOT NULL DEFAULT '0',
  `access_accounts_delentries` int(11) NOT NULL DEFAULT '0',
  `access_documents_create` int(11) NOT NULL DEFAULT '0',
  `access_documents_edit` int(11) NOT NULL DEFAULT '0',
  `access_documents_delete` int(11) NOT NULL DEFAULT '0',
  `access_log_delete` int(11) NOT NULL DEFAULT '0' COMMENT 'Grants access to delete records in the log.',
  `access_log_restore` int(11) NOT NULL DEFAULT '0' COMMENT 'Grants access to restore deleted records in the log.',
  `access_backups` int(11) NOT NULL DEFAULT '0' COMMENT 'Grants access to the backup page.',
  `access_backups_create` int(11) NOT NULL DEFAULT '0' COMMENT 'Allows a user to backup the system.',
  `access_usergroups` int(11) NOT NULL DEFAULT '0',
  `access_usergroups_create` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `usergroups`
--

INSERT INTO `usergroups` VALUES (1,'Администратори',1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),(2,'Оператори',1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,0,1,0),(3,'Външни потребители',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(4,'Деактивирани',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
