-- Host: db-master-1.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=40494;

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$mNCyJ2QneBxCijH5l5Ee18kKS7dVAGMQ3.M9KgB.j4XPN.9Ekwt.z','user','ak_a9ba7ffda2cec780','2023-03-06 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$YbA4OtGFVbz/WHL/PJhx9eqgOh1fJHBTmFrg6fFYVZG8WPgERS63l','user','ak_c477cd56f5f44358','2023-07-18 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$mJrgSa9kLr3yjJERxVbxhWMUweMwkjrhBktJumq1gJBeG1pIYrm31','user','ak_e1c43b69e637162f','2023-03-14 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$GXNLIoPJ6Jey.ecYRlE3WFSKco0cg3C5PfkGDO5pjlq52K6SHQ014','user','ak_9f138ac551dd2a63','2023-11-18 10:07:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=5556;

--
-- Dumping data for table `products`
--


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

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


