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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$.PMjVc260NKRxI1MtKhkqzyt8y9kX276g5A0NqlvVDOdzv8S4X.gZ','user','ak_c8d5d7d99d38de66','2023-12-15 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$icaJxFZh4ENyMCpomtj3P4nn1MNesh5GnZ3k02ijKGV19c8xM4cvm','admin','ak_458cfbacd8df51fe','2023-11-07 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$c2oR3QPXUfKOvrmYm3jWviZNq8KxtNTNzu.jYCo71QfrGlb1dXsnJ','user','ak_130d8c251ce15cb9','2023-03-26 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$lVu8/G/zgEQtfl6z3exRfHqfau/W33djaKNn/x4SSKUeerniyoRjG','admin','ak_073ecfa752d0f202','2023-11-02 10:00: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=5528;

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

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


