--
-- Host: localhost    Database: test_db
-- ------------------------------------------------------


--
-- Table structure for table `usersroles`
--

CREATE TABLE `usersroles` (
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `userId` int(11) NOT NULL,
  `roleId` int(11) NOT NULL,
  PRIMARY KEY (`userId`,`roleId`),
  KEY `roleId` (`roleId`),
  CONSTRAINT `usersroles_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `usersroles_ibfk_2` FOREIGN KEY (`roleId`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `usersroles`
--

INSERT INTO `usersroles` VALUES ('2019-04-05 11:10:00','2019-04-05 11:10:00',1,1),('2019-04-05 12:10:30','2019-04-05 12:10:30',1,2),('2019-04-05 12:10:36','2019-04-05 12:10:36',1,3),('2019-04-05 14:14:59','2019-04-05 14:14:59',2,1);

--
-- Table structure for table `families`
--

CREATE TABLE `families` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order` int(11) DEFAULT NULL,
  `imageUrl` varchar(255) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `families`
--

INSERT INTO `families` VALUES (1,1,'/uploads/families/image1.png','Family one','family.one@themail.com','2019-03-06 09:40:13','2019-03-06 09:40:13'),(2,2,'/uploads/families/image2.png','Family two','family.two@themail.com','2019-03-06 09:40:13','2019-03-06 09:40:13');

--
-- Table structure for table `images`
--

CREATE TABLE `images` (
  `id` bigint(20) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `main` tinyint(1) NOT NULL DEFAULT '0',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `ProductId` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `images_ibfk_1` (`ProductId`),
  CONSTRAINT `images_ibfk_1` FOREIGN KEY (`ProductId`) REFERENCES `products` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `images`
--

INSERT INTO `images` VALUES (48071809908,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',30),(48071810766,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',30),(48071811314,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',30),(48072310894,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',27),(48072311449,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',27),(48072362663,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',28),(48072409322,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',29),(48072707210,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',32),(48072708428,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',32),(48072709909,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',32),(48258121497,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',34),(48258262148,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',33),(48258263103,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',33),(48258312836,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',31),(48258313728,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',31),(48258413523,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',11),(48258414439,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',11),(48398109282,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',29),(48398110356,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',29),(48398192565,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',28),(48398193241,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',28),(48398292329,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',26),(48398292897,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',26),(48398293891,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',26),(48431464599,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',24),(48431465778,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',24),(48431466744,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',24),(48431583783,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',19),(48431584211,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',19),(48431585464,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',19),(48431666421,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',18),(48431666951,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',18),(48431667551,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',18),(48431711792,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',13),(48431711949,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',13),(48431713286,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',13),(48433130957,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',20),(48433131404,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',20),(48433132737,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',20),(48433224560,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',21),(48433225164,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',21),(48433581680,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',14),(48433582434,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',14),(48433583574,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',14),(48433838285,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',15),(48433839504,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',15),(48433839741,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',15),(48433962476,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',25),(48433962686,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',25),(48433963960,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',25),(48434098215,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',22),(48434099201,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',22),(48434100614,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',22),(48434138723,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',23),(48434138825,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',23),(48434139591,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',23),(48434223918,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',16),(48434224844,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',16),(48434225365,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',16),(48434262494,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',17),(48434263509,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',17),(48434264434,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',17),(48434390655,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',12),(48434391131,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',12),(48434392984,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',12),(48434471327,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',9),(48434472467,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',9),(48434474169,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',9),(48434527897,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',10),(48434528457,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',10),(48434529211,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',10),(48504682186,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',5),(48504682572,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',5),(48504683662,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',5),(48504733989,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',6),(48504734469,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',6),(48504734985,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',6),(48517156810,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',2),(48517157744,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',2),(48517157922,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',2),(48517205406,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',1),(48517206142,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',1),(48517206968,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1),(48517321400,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',7),(48517322432,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',7),(48517323987,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',7),(48517362293,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',8),(48517362357,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',8),(48517363317,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',8),(48517415367,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',3),(48517416681,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',3),(48517417707,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',3),(48517449794,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',4),(48517450267,'mainImage',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',4),(48517451441,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',4),(49103634646,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',27),(49104518273,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',34),(49104518411,'image3d',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',34),(52975673186,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',11),(52975699173,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',21),(52975731488,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',31),(52975745226,'image360',0,'2019-04-05 13:52:02','2019-04-05 13:52:02',33);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `color` varchar(255) DEFAULT NULL,
  `type` smallint(5) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `FamilyId` int(11) DEFAULT NULL,
  `active` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FamilyId` (`FamilyId`),
  CONSTRAINT `products_ibfk_1` FOREIGN KEY (`FamilyId`) REFERENCES `families` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `products`
--

INSERT INTO `products` VALUES (1,'name1','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,1),(2,'name2','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,1),(3,'name3','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,1),(4,'name4','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,1),(5,'name5','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,1),(6,'name6','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,1),(7,'name7','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,1),(8,'name8','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,1),(9,'name9','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,1),(10,'name10','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,1),(11,'name11','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,0),(12,'name12','Blue',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,0),(13,'name13','Blue',2,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,0),(14,'name14','Blue',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',1,0),(15,'name15','Blue',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,0),(16,'name16','Blue',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,0),(17,'name17','Blue',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(18,'name18','Blue',2,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(19,'name19','Blue',2,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(20,'name20','Red',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(21,'name21','Red',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(22,'name22','Red',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(23,'name23','Red',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(24,'name24','Red',2,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(25,'name25','Red',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(26,'name26','Red',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(27,'name27','Red',2,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(28,'name28','Red',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(29,'name29','Red',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(30,'name30','Red',3,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(31,'name31','Red',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(32,'name32','Red',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(33,'name33','Yellow',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,1),(34,'name34','Red',1,'2019-04-05 13:52:02','2019-04-05 13:52:02',2,0);

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` VALUES (1,'aunthenticated','2019-04-05 11:09:42','2019-04-05 11:09:42'),(2,'member','2019-04-05 12:10:12','2019-04-05 12:10:12'),(3,'admin','2019-04-05 12:10:21','2019-04-05 12:10:21');


