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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$Nh0HTtbt36QRZrjvvyEFbzBhGITST/0uU7X4ioox/DxXddpJKv9ve','user','ak_7b70cf7166207376','2023-02-28 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$VaNjWspjJ0HbwlNFFwzlQETGH3MpploDZBecLTMAfuXZpLPtP8MEE','user','ak_90980030c2853a6d','2023-07-08 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$Lu/nkeJbEaKNemp302ukW9yYqivHOPaVbVeGo4X4cWDfiVwFHPAWr','user','ak_1d257c8d2b49ff11','2023-08-23 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$VrBx.q2mrS5P0sEDE5cPUpnpBnBRAuEe4ia1hP2m.Oq.7UGPZkoMc','admin','ak_8c8913c86a4f6b59','2023-07-07 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$BScKENfiSGMTGPLCf3XPD1SewXaCrUa2kBDyp0N6vzTjrVIWxdd7B','user','ak_a7453e9ef98d1f47','2023-01-27 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@internal.io','$2b$12$IstuDk.REfqSu4Em8m5nS/bHh.kWpMPl8JgCd8GC0UQ5EDfcxFmfg','user','ak_1aa54a7f3d44a4c4','2023-07-02 10:06:00',NULL);

