-- Host: db-master-3.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=42941;

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$KRbj5W1EOeAcK4KwrFXPziCJPeMFtw4wNmzx0DC0cwbOXuhpHs.XS','user','ak_f5ec4a9b8012d277','2023-08-25 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$cn0cA5J3WPyCMG0pfWp7G7Bykx2XwzdXG0Wo8oUpBKWFxLmg4GXeQ','admin','ak_20d9239d7bd4426f','2023-04-02 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$y71LbG8Gy6hdJcQVVrJK4MrpR1dXLY5sRx33eF6FX4QTsCOzAosbx','admin','ak_ca1d5561abf1667e','2023-01-23 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$C9fIBYtTCOIZG/pvjPll3m17DAiEYUCPGIk94i3Ya.UtOPJVOXJJf','user','ak_c2c0dead60c448f5','2023-11-14 10:11:00',NULL);

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

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

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


