-- Host: db-master-1.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=11926;

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$bclwe4ZEe1tsshPz.loQZyecPqBBOM9PP2gvoUtMhRISC2greMUul','user','ak_a0ad2cf7b64ae12f','2023-07-13 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$RAJgqQFAPCjCmn0pRHVsQuzDu4hYavVDBaMl.8v7o6FcNP82eYYkq','user','ak_0808ecf64004cd26','2023-01-08 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$BWFx7T4r/39syVzvY.Bi47j9GeFrPx6udtFIETRDlwqEHDNV0MF1K','user','ak_e921f35049f32d4a','2023-04-18 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$EqeuTM.tOr2d8EBqtueEYLn5tl8iEcLzKdODE1ijNCVjIwDXVUpue','user','ak_75f3ab9708da3671','2023-10-03 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$arXS6wZbAUqjlOTM3iboLzPHIHFoLoYDKChWGgmaT7eTuvkIywsOE','user','ak_76d453629b4d6bcf','2023-08-20 10:22: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=33261;

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


