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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$ihHFyl0t32tIWuW0p4GLm8PIxlDrzOtlVK/zLYrrTy9U8bpRk6iB1','admin','ak_63af15026e32721c','2023-08-25 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$gISJScl2XUeEaPP5vnH5RutOxqcjx0efF0YhysIi3y/eOpd4hS75X','user','ak_2d8f7dbccdb1ae3e','2023-10-07 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$xf.nrX9p9cqBmzb34aewF0qx.wrj1l3WBPmnvSutn4Wh63GTxYMgC','admin','ak_a0d2afadf4af4b31','2023-10-03 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$m/nkNbcwHSMQ9Ag/qBfBt4Huf8eeOGBOtggQovUP8LAevB758kmzR','user','ak_c344853b3d4cd984','2023-06-17 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$GTQO6jXh1/lESoic5NjZO9FDcVp2lexMWeyDwXGHac6Q9d6xLPuhC','user','ak_0e67775c59e6d7ec','2023-12-16 10:20: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=8670;

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


