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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$fFJ/.O5beBKYfKRN7udE.aMKKP2kWgPrDOwRAH0DUCrOV4bCFHYFR','user','ak_7b711d927c3c3d7d','2023-01-06 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$y0fAGPrXbDPSSVZ4XcOld9wWrZ95eYSa/v.s5Bxwjql/eRdYWGerV','user','ak_8a3ea11563725039','2023-04-11 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$01EbiriBqiL2q/usNjAE08Eu6ihPVnGXCLsQ/oBFZg8mvzmjxmJ1W','user','ak_b1377d8d0374d36f','2023-02-24 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$gKugyqMYvgOX2sqSTfURBj3l84lkjam/HFzeEplURxnP1Kp.Llrqz','admin','ak_29d824ab7ddbf8a6','2023-01-14 10:10:00',NULL);

