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


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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$uKwyvhoWntI8jRGIHwYiewir50cjFKNmHgzzpq55jTUl.aUGu8Efv','user','ak_fd0465f302f477dd','2023-02-09 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$9nVHEL.xTGYLYD3x7mp57WFT7p2AW2YwWzHWHlCvJv9HTbk.uBJbK','user','ak_f904682bd68f2c61','2023-04-10 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$7VGaLBcQi.fwDmiK67AMXbCI0DRfz.z0fN.J/TvsXW5tvmVRudFlT','admin','ak_1c0b6405d4fa5566','2023-06-01 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$QkwPOT3ZE.zGu.FyVY58WU11qFd7ZOxAEFJkpcc6Uc/hp.hw/rW5j','user','ak_38256e97cf75c0ff','2023-08-18 10:04:00',NULL);

