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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$LrEHBwirdnbVYp9mjF227PIUyJ0fW94Ntp6Ad.pA/4NT9LTbe1aK2','admin','ak_5599886bab026036','2023-03-22 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$ajC2T7qgGpIXw2uoZQF9pvz66GA1rnjHyCSOzLzqNnpN3BBe2ju5T','user','ak_8d8dfb40cf18e75a','2023-04-06 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$Yapt3tuQGrUBk933T/1Ney5GBFdQ9z8B8SqfLfCIm.JfU2N91eroZ','user','ak_5bc824ba4199934a','2023-04-25 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$v/mCpSzpvcxhystmNfCDSRDKg83/ARQISmbGxFmjSHA6/wr8bYZnL','admin','ak_a8f7a900095e294f','2023-12-11 10:15: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=5188;

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

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


