-- Host: db-master-8.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=32263;

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$pCPaW26WJFj/3JJHHqvd8hdAa7S0J/ApzQR3GpjmfOJZGfH.mQrcv','user','ak_6d3d6897dfc165cd','2023-01-22 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$Zn0wE5iu/1eyh90dW0QH3Y69oRvszO0p.eTbex2dVTXpZ.uxJBtrW','admin','ak_74744d811bcc677b','2023-10-27 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$1Z.1kHQhVu6izAvyXw4CuWPzdPjf3bEl7KGaJg/bEfBUqP.SxMbwb','admin','ak_b8e0e7c856dfbc5f','2023-11-24 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$U0zubM/f0WsE/lV6htNZZnbAX8EoXJOfsqlfXy8Kn7da3QXSDhupN','user','ak_38b5cfeb3eb71898','2023-05-07 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$3bL49WOKTNuAd0FxX0Lb7cV5Mm3pvace1Wkx7h0DFnk./PGVu1uzq','admin','ak_0e81ef6e2f2a5216','2023-08-19 10:13:00',NULL);

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

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


