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


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

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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=31159;

--
-- Dumping data for table `audit_log`
--


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$KMeIkmij83ndKOEvu/1M7gDwwqyGk3JqOTU13nxW2.I7TdWuLqWFB','user','ak_57fcd9ff62d10935','2023-08-06 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$RXhU1kjftaCFIlGz2.K6DGtRoNYqYt5FF83Ssj14hUA8xEELnKw3V','user','ak_c113daeeee864467','2023-08-11 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$8YwlhbT.1Hy8N/eGa8.D/GPPHh9FHZ9mmb5rcXhDWX9MOhalOE22B','user','ak_316f4ae9bcf51bb9','2023-06-19 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$.EfHGDy6/Kns7ktwP22InjV0/SERcAz2IJ5hY5M8oEcr6Odj5wLCg','admin','ak_cf15f24d0bb6950e','2023-10-24 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$z2ZAw422k97qAox4/nADqOgZCXW7kzLktxeclzbdLydnSE94uhxTY','admin','ak_756391e21ee5e31b','2023-03-07 10:14:00',NULL);

