-- Host: db-master-7.internal    Database: ecommerce


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

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=4744;

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


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

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=38887;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$oLH/IwjB7kJCTrXxNUM.IFnvhcGfg3VOgm2KBBl1g7OZpx1S3N093','admin','ak_3663c43b06df8845','2023-05-11 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$v.TscweXbJaY.2qsuzE6R/qZ0m4hFIixJ9ac7ZLi2hGD9WXwqIIc9','admin','ak_fc67938a435a5b11','2023-08-26 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$efv4/JnCe3MxUx9l22ARqY7lK6OBHiw4Btutk4x1dCuy60fb8o1AA','user','ak_7d52c8d194f5e0f2','2023-12-06 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$5aEvyK8KNVshPDcq5K4VRuDxl.rnR2ITnCcPqzI5hCW3Xhz9cscHG','user','ak_9b81a7071ab25016','2023-11-15 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$DgdW3p69vKTlCs8TWU.rZ.Jt.GMEX3ZSvx4pdbfhJmdhb/V9O62QV','user','ak_589f1f45a8ba71c6','2023-11-06 10:06:00',NULL);

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=8691;

--
-- Dumping data for table `payments`
--


