/*
SQLyog Community v9.60 Beta1
MySQL - 5.0.51a-24+lenny5-log : Database - storelocator-devel
*********************************************************************
*/




CREATE DATABASE /*!32312 IF NOT EXISTS*/`storelocator-devel` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `storelocator-devel`;

/*Table structure for table `files` */


CREATE TABLE `files` (
  `idfile` int(11) NOT NULL auto_increment,
  `data` text,
  PRIMARY KEY  (`idfile`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

/*Data for the table `files` */

insert  into `files`(`idfile`,`data`) values (1,'{\"name\":\"453ad572868f.JPG\",\"original_name\":\"453ad572868f.JPG\",\"urlencoded_name\":\"453ad572868f.JPG\",\"size\":128872,\"type\":\"image/jpeg\",\"url\":\"http://ideotoolbox-devel.idep.us/storelocator/backend-trunk/webroot/files/453ad572868f.JPG\",\"mediumUrl\":\"http://ideotoolbox-devel.idep.us/storelocator/backend-trunk/webroot/files/medium/453ad572868f.JPG\",\"thumbnailUrl\":\"http://ideotoolbox-devel.idep.us/storelocator/backend-trunk/webroot/files/thumbnail/453ad572868f.JPG\",\"deleteUrl\":\"http://ideotoolbox-devel.idep.us/storelocator/backend-trunk/webroot/?file=453ad572868f.JPG\",\"deleteType\":\"DELETE\"}'),(2,'{\"name\":\"453ad572868f (1).JPG\",\"original_name\":\"453ad572868f.JPG\",\"urlencoded_name\":\"453ad572868f%20%281%29.JPG\",\"size\":128872,\"type\":\"image/jpeg\",\"url\":\"http://ideotoolbox-devel.idep.us/storelocator/backend-trunk/webroot/files/453ad572868f%20%281%29.JPG\",\"mediumUrl\":\"http://ideotoolbox-devel.idep.us/storelocator/backend-trunk/webroot/files/medium/453ad572868f%20%281%29.JPG\",\"thumbnailUrl\":\"http://ideotoolbox-devel.idep.us/storelocator/backend-trunk/webroot/files/thumbnail/453ad572868f%20%281%29.JPG\",\"deleteUrl\":\"http://ideotoolbox-devel.idep.us/storelocator/backend-trunk/webroot/?file=453ad572868f%20%281%29.JPG\",\"deleteType\":\"DELETE\"}');

/*Table structure for table `offers` */


CREATE TABLE `offers` (
  `id` int(11) NOT NULL auto_increment,
  `title` text,
  `description` text,
  `fromDate` int(11) default '0',
  `toDate` int(11) default '0',
  `user_id` int(11) default '0',
  `dateLastEdition` int(11) default '0',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

/*Data for the table `offers` */

insert  into `offers`(`id`,`title`,`description`,`fromDate`,`toDate`,`user_id`,`dateLastEdition`) values (1,'test','test',1418169600,1418774400,1,0);

/*Table structure for table `offers_files` */


CREATE TABLE `offers_files` (
  `idfile` int(11) NOT NULL,
  `id` int(11) NOT NULL,
  PRIMARY KEY  (`idfile`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `offers_files` */

insert  into `offers_files`(`idfile`,`id`) values (2,1);

/*Table structure for table `offers_to_stores` */


CREATE TABLE `offers_to_stores` (
  `offer_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `dateCreation` int(11) default '0',
  `dateLastEdition` int(11) default '0',
  `ignored` tinyint(1) default '0',
  PRIMARY KEY  (`offer_id`,`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*Data for the table `offers_to_stores` */

insert  into `offers_to_stores`(`offer_id`,`store_id`,`dateCreation`,`dateLastEdition`,`ignored`) values (1,1,1418229469,0,0);

/*Table structure for table `openings` */


CREATE TABLE `openings` (
  `id` int(11) NOT NULL auto_increment,
  `store_id` int(11) default '0',
  `day` tinyint(1) default '0',
  `fromTime` time default NULL,
  `toTime` time default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;

/*Data for the table `openings` */

insert  into `openings`(`id`,`store_id`,`day`,`fromTime`,`toTime`) values (20,1,4,'09:00:00','18:00:00'),(19,1,3,'09:00:00','18:00:00'),(18,1,2,'09:00:00','18:00:00'),(17,1,1,'09:00:00','18:00:00'),(16,1,0,'09:00:00','18:00:00');

/*Table structure for table `push` */


CREATE TABLE `push` (
  `id` int(11) NOT NULL auto_increment,
  `offer_id` int(11) default NULL,
  `text` varchar(250) default NULL,
  `user_id` int(11) default NULL,
  `appId` varchar(20) default NULL,
  `dateCreation` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `sent` tinyint(1) default '0',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

/*Data for the table `push` */

insert  into `push`(`id`,`offer_id`,`text`,`user_id`,`appId`,`dateCreation`,`sent`) values (1,1,'Hello again !',1,'CLICKCONTA6IFF','2014-12-10 16:41:33',0);

/*Table structure for table `stores` */


CREATE TABLE `stores` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(96) default NULL,
  `description` text,
  `address` varchar(96) default NULL,
  `zipcode` varchar(10) default NULL,
  `city` varchar(20) default NULL,
  `state` varchar(50) default NULL,
  `country` varchar(50) default NULL,
  `phone` varchar(20) default NULL,
  `fax` varchar(20) default NULL,
  `email` varchar(96) default NULL,
  `facebook` varchar(96) default NULL,
  `twitter` varchar(96) default NULL,
  `googleplus` varchar(96) default NULL,
  `www` varchar(96) default NULL,
  `manager_id` int(11) default '0',
  `latitude` float default '0',
  `longitude` float default '0',
  `specialOpening` text,
  `dateCreation` int(11) default '0',
  `dateLastEdition` int(11) default '0',
  `active` tinyint(1) default '0',
  `deleted` tinyint(1) default '0',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

/*Data for the table `stores` */

insert  into `stores`(`id`,`name`,`description`,`address`,`zipcode`,`city`,`state`,`country`,`phone`,`fax`,`email`,`facebook`,`twitter`,`googleplus`,`www`,`manager_id`,`latitude`,`longitude`,`specialOpening`,`dateCreation`,`dateLastEdition`,`active`,`deleted`) values (1,'L\'un des Sens','','25 Rue Robert Schumann','34430','SAINT JEAN DE VEDAS',NULL,NULL,'',NULL,'restaurantlundessens@orange.fr','','','','',1,43.5678,3.83912,'',1418230676,0,1,0);

/*Table structure for table `stores_files` */


CREATE TABLE `stores_files` (
  `idfile` int(11) NOT NULL,
  `id` int(11) NOT NULL,
  PRIMARY KEY  (`idfile`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `stores_files` */

insert  into `stores_files`(`idfile`,`id`) values (1,1);

/*Table structure for table `users_files` */


CREATE TABLE `users_files` (
  `idfile` int(11) NOT NULL,
  `id` int(11) NOT NULL,
  PRIMARY KEY  (`idfile`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

