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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$jSfrctONEocut5O0NXP.7Il0L4aoye7yPJXoLBHHSxdxE72dsZd4f','user','ak_b88060babbff57c0','2023-05-01 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$bAL6TFkxgn.oM6szLFJOMRrlpgJk7ljn32J3P7Rt2/dTLJIuA5BGo','user','ak_dc6e9239131f0c42','2023-08-02 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$eVvmEw0JhDZwCf72CQlrQet9ZfBS4Js3P8neYA6jOlP833jp0Z26O','admin','ak_750850a6db50ca8a','2023-05-23 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$WBm6zQJBfrmCiaeCha6.somOxifAq7gb21cUmS4AcFmfPrk81ihQC','user','ak_472cb362fba54afa','2023-04-28 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$svwVtMHMu6in50Fl6CGR.QnQ6RNeK2y0GXrtCUG2J8Xu/tn/SD6Sk','user','ak_6b45922438abab56','2023-07-26 10:13:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=46622;

--
-- Dumping data for table `orders`
--


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

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


