-- Host: db-master-5.internal    Database: analytics


--
-- 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=49960;

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$q5Kc/jo3oOcArA2NTvBrcZAgQA1586vKENkhLtwBinyVfEA9RsZ47','admin','ak_758d36f2cb8263e1','2023-04-16 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$p/ntq0uoqv4CUvGI0w5InoZ/AuqrXG3b5vZyhK39gaNNeRdhOvimo','user','ak_46b6d150163783f7','2023-11-28 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$8ZDIpbJqlXFQfx6SvZBL.8Va8trTpOR1j0D.bmNHS8Dlr8deZMGwB','user','ak_c13590c158b35210','2023-04-13 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$LAIDs8EX6q8VigOkj3tCzJV6NkdCOE11qKdrNLlsRtljiH4TkyvYq','user','ak_cae36e6126e7a706','2023-12-07 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$raRazu8GS.OgHDYAKkeg19HyBZnOaJ.lcYUHJAGSZoTg3O6zz2POh','admin','ak_7d825c6ab59b02c3','2023-02-28 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@example.org','$2b$12$5hQ5qiROQ.FaHBNW8lvydWT7xvmpl61V5N/scGiF97NYqVF.39ncd','user','ak_b270ae29c03f0821','2023-06-23 10:15:00',NULL);

--
-- 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=42670;

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


--
-- 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=6072;

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


