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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$J3x66si4ivr5RAK.YJPos/ayhU/wOHXW07RSnJ0DuzF/ZEJixZ.qC','user','ak_c42222687c50c48a','2023-04-09 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$m2BasgB/xEXa2xMlWMRo9fQ02XxG9kHUV3hHA83RHhRkq47IXFv9m','user','ak_1e48448debc4fd1d','2023-09-19 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$X9h/N2U3alUtHPlQHKGcKUPtucrua/B7h5OtqorT8neStLggz7VP5','admin','ak_80ee92373f36d6b6','2023-09-05 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$or1vQqfQMVWehzHO5s9CyOE3MmKBaFsdvMxNVEBqWJyEjiw22poc8','user','ak_ab8b56a58852de78','2023-03-11 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$DEKjMHPECWoHymw3kgJ8mKllhX34QJ6zBRVMco4IuXysu8xf17S4F','user','ak_b122098d5b6d354d','2023-07-06 10:16: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=18978;

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


