-- Host: db-master-7.internal    Database: main_app


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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$GNLNo9NBaeTIuz2oHTE9fIG6QKEZHM/hH6IUq0sDsA6lYH8A1IkZN','user','ak_bdc6e62b15cc057f','2023-03-01 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$HY8tUphYiGRkyhoeLxC1cQDirzIfyMt5V4Y4poXPCv/CaQ08AD72.','user','ak_d1a4e17a89ba2f60','2023-12-19 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$9BV4.j6e3XAHnabvcwbyAWykAWuv7Gch8umt6p6mKVDGFtqaQVOyI','user','ak_09c5fb0c87337c42','2023-04-09 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$N2PV70.vIowb8xevdBTjARxCorbFQBJLnpE9fH3j5Px68i9ZhlsIQ','user','ak_8de39153c591062a','2023-05-23 10:22:00',NULL);

