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


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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$wU9rtpDRv7jliAWZ8/oXbQBrrHjs26610i8BxUZ8rCt7w7FDq2Pdb','user','ak_baba78e589a23b20','2023-10-20 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$xcKKU3qUGXOrfySOOvHK0xuMsi8MwjGic.siDlJk39DUGqlghGy9h','user','ak_c068d6bad854a314','2023-05-22 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$r/.QPvU.Nym/99FUV8JeiWtMkjfQAKcLg4VhT0c.CRR/dJsR1krki','user','ak_e89700157fa16354','2023-08-19 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$RMNnJJLRw9c.LuRf5KZGMSD0xJCMdpOuHWTYxcGX4SL0y0PATp31s','admin','ak_1da3cccdf3b12f6d','2023-04-11 10:13:00',NULL);

