-- Host: db-master-9.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=4998;

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$3RBKhEHM7lBWP84Xi2/vuORmeO44oXMTtPH0JSXOLnHOVCaUxkPZ9','user','ak_389be2944e682af7','2023-11-04 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$iMcVJgm/Eee7mmi/HxnSGPInzCvqidKjJr/4k3dVfbplO3HDd2BPg','user','ak_2a784614225a762d','2023-08-02 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$TDAufzZEp2iw3WNO6EC4N.MCeydUKlwiSukl/b2nKRn7x912Wr49y','admin','ak_5cc913ca67b70ad8','2023-01-14 10:03: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=4616;

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


