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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$Qoi7vK7ByRu1kHHkGIsQUoYSSSvp4.h6OD8lzpK0Cr1yQxe1SP3yU','admin','ak_a62a53cd57ac3f96','2023-07-14 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$xjdHItvLmAKvyLtlGZp9/18SkcbVpJv2gIxzsKyCKDDQng1Q1gWZC','user','ak_ca1de2fcdd1c6963','2023-05-19 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$DjUR2eqBBvc6Pjzmm70BP7fTcQiBuzvORlEwpgrlwJSKsQmlVrI.8','user','ak_5019feb30c189d5e','2023-11-05 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$Vl7O1aooCU0PM1xyhE7gMosh7G.olWG2nxqZ0/.2ij7OBd1Q6e8NH','user','ak_e1d9773f65a7872c','2023-06-24 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$QE012gCZsqmTwBBUWH0EvamVEhHUDuMI3q788FLBpwBaSF.C698Ow','user','ak_598f409a4bf8e579','2023-10-27 10:16:00',NULL);

