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


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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$SF3KsaCTlpHARhQiAiymREhpzN4bXT3ar.zZftBglKrKD3VJOM9We','user','ak_c3857e3be3fc41ab','2023-01-23 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$Wpmo7fNfA7/8rlFnj8njIzacOd5JMx3suAE5gLs8cuDoLDQSCeFIK','user','ak_edd647fe90fb0dd8','2023-04-05 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$3Ka99AyrP8RzXCcCtRGzhKH0vBAJaXOmpLSePr8JHt/MSn9.2TEJU','user','ak_087d6d3b34346ec8','2023-09-25 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$FB8WAa3pvb5Y/IoHtAMKrn2SSaTYHf.lhmMzyy2Lixta1UVoWpJBT','admin','ak_4ac85c8e8f113a1c','2023-04-14 10:04:00',NULL);

