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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$Lc.Hyo9sVSjNQkG/5ZKKMcsNXgKnAVjOc5EuYNWAFYwaLZiRN.X4w','user','ak_aa8eeac7fd8d4a0e','2023-03-19 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$/E.nVsgtBowbbQjXYZu6xx2VQnCrvqwOgLwk8HgeIh7/beiJQOcBw','user','ak_8d01f5b21a7acafb','2023-02-04 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$UJ.wqyvo.UwnCW7W.YbjfH8U0OBUhVSHBBpnRTi7U9f/ZANgg4JFw','admin','ak_82f9e3d2322addd9','2023-02-02 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$qn/iyBeWn3oTIKbqE8ofGTAhaVqsrHw2WiQOegdW6mmtYcvYmHHG3','user','ak_a11c03e522bcbc5c','2023-08-20 10:13: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=47724;

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


