-- Host: db-master-5.internal    Database: analytics


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

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

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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$94QRR4axMqT1/DoO24oq0oti/w6as9nuN3pvmKtplvvBtH7i.OcCL','user','ak_d401b42e516bb103','2023-11-17 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$8kIC2DVIWPoN8uBnv/7HO12p1yimva8Lz/cpNr7bKAVwcqHiNoAEe','user','ak_a7bda2fda23c0b38','2023-05-13 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$ewsJsy5qxq7aYyTW2JcsEkytcbqj71sJwCL3vn8FwBthUe334xy/6','user','ak_66e9a48cd105d986','2023-10-17 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$51z1COWLVzFAd0EVvhsyxdOXRLZxEdimN6WhKnQ1y2j81mAIdsY/7','admin','ak_8109c77d75acd525','2023-05-28 10:16:00',NULL);

