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


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

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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$5F4Gguibs8fs3k3CpatJhVDMtbKvHdtqKjCD0Z3dPUycJiv1Kd2Ca','user','ak_53638023c94bb3d4','2023-03-19 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$qGwK/s2lSqwZUnj58ZSuA2v/teF1dsH0ueSYGS8OJBm4dk0SY54xx','user','ak_9dbc5526e8139bec','2023-12-28 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$GbtGbBGcMo/P6WEaiczZAuqFMZ73gqx2EKG/njtoo5EM4FwgPuT/Z','user','ak_b814185658346fd9','2023-10-18 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$xuYbhcZjLa/T6LrQBzj7r9wF7/o.ZjuVifKlArdQ19Hkj4RFD3wIN','user','ak_31aaa6377b149ff1','2023-11-02 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$HdSRRcy7IImZSoPV799yaUHXuD9YlT2oXKPux.ApJDCXRqy8zC9aH','user','ak_04e3c6a626f549b1','2023-07-11 10:19:00',NULL);

