-- Host: db-master-1.internal    Database: webapp_db


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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$0nw4e30sbRRxtCLLKHxTyoDgNDx6LFlo5O30HIq4pgN0s9CF9ZIKy','admin','ak_8afabdb06b092981','2023-02-25 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$iKnMNzApGY57EPD1UmqEstF/R9JGzfWU76otV1lwn422qd1i9eMrG','user','ak_353c15832732d1ab','2023-06-05 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$Q9Bf3DKF9ZempapDWKspI3gOSz83MQe3FKEoipCeI5zvQLmamcrPL','admin','ak_4bcceb9dcafc149f','2023-07-09 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$y/ob8wUYDpGr5tvVG6bIRJMJMLZHB4nLWWMnwd4tkLB9VBe/AwKDH','user','ak_57347b702be3a8f7','2023-07-07 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$07lso.9m/AMEgrES/nPT17J3jTLt629JXOZSRhDa8uQO8kaNnlV6y','admin','ak_3fa4e9b2d990513e','2023-07-04 10:17:00',NULL);

