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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$MdRRMAPUYzw6gIEN63zchHAgJ..urlDG5yxQKigynRku6INIkrCoC','admin','ak_0a82102cf44910f1','2023-10-21 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$AskYv.E59GxdssdvfzSXTDoaE3rvIfnAFhU9MpMj2VonUY0I0xQeE','admin','ak_4fe16b262f481eca','2023-09-21 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$bKfuFzx5Lz.S6mTgzXcrjc0cQonXwGpeGhmX/Z5uiRRau2pcQZjbY','user','ak_e59fef86ce237c56','2023-12-02 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$beOwm8RxWpm60SrsBpWJfpNmdfD22G8iMt4rV4zsxGI.NgEN5NOX1','admin','ak_51f276be225d5a3f','2023-05-17 10:14:00',NULL);

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

--
-- Dumping data for table `payments`
--


