-- Host: db-master-4.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=50209;

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$kVc51XiBbuTzOH4A.W3/QR8fA9oKS8lmFs4cfP2m3g1EthNbCojN0','user','ak_6688d4a770ca2b97','2023-11-28 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$fJKXBczNK.naQu57SG4RRdoap1QUV9EDUUtH.NBl8N6MsJnwFwYmv','admin','ak_d11ec3b1d9c1a677','2023-05-18 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$LjPXly5cViC1mbWd62MgWzzr2UKG1SE3A/61pVAtxkLrieEsFiNPx','admin','ak_5b13758731e6970f','2023-09-27 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$uobuDnyhF.diRq/kA52uZVeJeiZX8yXMdY/1gASXCi7mDruFtCHNB','user','ak_de1c85bdf73e7de6','2023-12-22 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$FxPHlROq0M6XVYgquwpZurcV0TqD2SSSYcMWHN9KgUEByMkWlF9iX','user','ak_50f6d90642a812c4','2023-04-10 10:15: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=48215;

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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=42918;

--
-- Dumping data for table `payments`
--


