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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$1neXiASpzlfEnW5sZjtXwTRfAYk67W0xv3AUcdlJtDFNr7Y2PTvIq','user','ak_99bd50ad22fad164','2023-06-09 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$nwz/QQGmo4bp9TMw3YzU4U.xDZp514m5VMpIXbVXEpp6Ei/aUxl9y','user','ak_dc303aec1ace6f7a','2023-12-15 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$Lcbn7W4PuY55B7th1bjc/TzAXH0/5v0RfZ5QJFxDmxZbKPzDpOohq','admin','ak_653de8aee783a4a5','2023-05-16 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$vXDKDmZb704ZMRJCue7iPpTqlM.OqsJafDACVgCn3n/gvOLj6cnlw','admin','ak_14c83bfd6fb2efb2','2023-08-08 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$QTYIiuaKGLV/83dvQ7YeWFhPhudomA64z7lVNxkF11vJGHpSeC/6f','admin','ak_c876cfec367ff6b9','2023-07-17 10:02:00',NULL);

