-- Host: db-master-6.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=42052;

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$VUBGjJRjxBM/8Z1DazwQuDe8oRvWHXo.pF.KB7R6Fow4vNZ12qh6p','admin','ak_a19971638cdf39fb','2023-05-11 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$BHHLVoePbcQ4mn9pvgQrR5AOmhBdfi48KOJ7XjrF.rGXPOuRI7zSK','user','ak_4aca74941e7fa398','2023-04-04 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$YWO5O3DicnehgQKHZtg6rx6a9Pei8hTa2c3p6/ATqpOew2waYxnu5','user','ak_163c41c13b5afd32','2023-12-03 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$D.P6eZfM8tzF/3kSE.QaqSAkCxhjIbE/3j84N0N14K6c42uYT2LEx','admin','ak_721ca9505e9ee127','2023-03-26 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$1HMwtTIsI0oYgWNrgN/EGFVa08CzHWMsfnEwf77/bxJXQqSMckXJB','user','ak_5580ba436a8ca9d6','2023-07-11 10:15:00',NULL);

