-- Host: db-master-4.internal    Database: customers


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=46246;

--
-- Dumping data for table `orders`
--


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$hsOkprYukCPLoaXac2FaiA7yuRe7Zi3k9AVADC178ZDcxG4l7enFS','user','ak_1d959fa20ad827c1','2023-03-09 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$b0GvMR9jD54YaNWXE9YcnnJ65VIbfsU/2b1Fx3cUhoXwtv4xCcGrY','user','ak_9d2f9223f7a7509a','2023-05-05 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$FMJvbbMQJXf04LfPpsFCuP0AKnJEfyflHbbGhOyv3U8cs413WOf50','user','ak_9d77f7c5eea883c5','2023-04-06 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$CJmyndKSxfNr6JB1Html7lx9dNc85BtoR/mxoVH3n2JrLQ0c0/IYN','user','ak_dd3c919c4f0622be','2023-08-10 10:15:00',NULL);

