-- Host: db-master-4.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=29646;

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$hPKuvRso79MYLmZCUbu6CfxBIybE/L.h7OvnfieFjpxsJYCPa0mku','user','ak_caaffaf8aa89dec4','2023-02-22 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$6wAEibUvHJ0QhR74xDCHA5oAX0ovpNZbb5bhbES2KA7OyxXGVlzxm','admin','ak_778648b1602c9438','2023-12-16 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$xdnNvPBXudpMhZFA5HXcXfBlDB0gN6W.HK6H27Kqp9ymXHKXP8/24','user','ak_9dbddd5bcf424f87','2023-02-04 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$hOOQt7Vcs3Kak4Q2G9EHv/OdKJWGPRM/0yXhRgajHUMEANdMQKxqW','admin','ak_87b8b266f35b9b3e','2023-04-02 10:12: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=47951;

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

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


