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

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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=45217;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$LvEIlFiQPd8u1opLgUQzyGYDhr97lkQnJmwE1i7iQHI01Ij//ijXi','user','ak_021ebb4ec957a56b','2023-08-22 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$xJMTbint9oHBmxTW4AkDD2dN2neIqrWntajOfF/JNSm.iPsn/iLvv','admin','ak_d0bc28b71656aadd','2023-08-24 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$7O9xvit5VqOzzBLa26V8LXjh/U22DhYdLPV68wmsE6YBlfEgM4jOZ','admin','ak_54f030a4ff8a458f','2023-12-02 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$iRCYWINTS.GKq4Ij29BQH7HDFAjIrMsjJDglPr6sMlargAlTmfNFG','admin','ak_272cfa9e8915a432','2023-03-17 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$9Lu9wwEfmXibGpqantKnAaZ5t3b2CEgsslFDVWLHZw6xGFhaoqwGM','admin','ak_bd77a9f84c2a15e0','2023-11-23 10:06:00',NULL);

