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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$rxCJMZ6tpPmm2KUWbjxqQUzG/QbI5aZRNvOQdN8B7oMppBAm32wsP','user','ak_dcd80370b48437ac','2023-08-28 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$IXYzzXdPEXQEtCwmrnpL2i2VUHc.QzZ4.j51m9i2q6As4/CvpQEfc','admin','ak_e59df46abc5c3674','2023-09-06 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$xsUKex1GwXXloNrzs23s3mVjy8JrHyhUnGagIS3bRo7Nc9sr2zK7b','user','ak_bd27748af287648b','2023-02-17 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$PobWtGynpcFJMIDySFs2vVnWZnMlVeXGBMG/Frbj4Ch/sAo//9Y/L','user','ak_dc3a015e495d39d3','2023-03-24 10:04:00',NULL);

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

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


