-- Host: db-master-5.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$cgkYEqNupEOtE.fk.Etc.QCVnKwNoxeFo8ljS83XA1HEzLV911Y4t','user','ak_59c8e21ed35c941c','2023-04-14 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$CSJWeqUfKKSY4hs7qrFYZQ2snv6suxxfqaMVPv4TcO86rU3jJIBKS','user','ak_a13ed479b09d1a22','2023-05-01 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$2x8HJRLMm8W8BFKZ/eaYHVXRFWOXsiCtjEzfMfTY0UfmZwmMZwDOK','user','ak_a24dcb5b87b41905','2023-12-28 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$togN/r9J/EbeRSydRdKtOeB1gBo4LZ7l9MbMP4BVoIj2BWvx3ZUbG','admin','ak_e2db8f413ce7d851','2023-06-26 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$naF6Kl./kXHmqFQPgQQ3YyM3vn2xfaDeS54Lp0/cX7wU8T/cTrFby','user','ak_f054d25ae79b23cf','2023-03-28 10:10:00',NULL);

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

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


