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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$dH/sCEGUaHAwRAkIJdDmHyLueC9p5naQ0W5p8k4ccXOz3rRTq6ugv','user','ak_256512a3b8673556','2023-06-06 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$NhDP3lUwQcKsiJHtv/c3OnWAJy7/4F93uaR7FfpA1UOe4CYnlREAe','user','ak_8d9058f178b651d2','2023-04-11 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$T7a7/z7v496ib9lKa495iABcXfyPgFnDNezeqRQFgztGM3ADnp264','admin','ak_485297e492373c6d','2023-06-03 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$rlMNpSyeppee0/pC2ZsQkobbDJsaU2POMEL7Jqb1TesvA4ZxFmkJT','user','ak_87205b408d91169f','2023-11-21 10:22: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=37676;

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

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


