-- Host: db-master-0.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=4452;

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$vt.QwHISmavx.k1IX//12N9jOb/d8eM5/bBr6OIfbM/6h/UHlFbTC','user','ak_0899a7288effc2fc','2023-05-03 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$nYMJFMXKKXYR2V9kXKi/Dc6Y5021zfT5QG7VDmaIbGurop9MLVky3','user','ak_67b27a156fcfbfbf','2023-09-25 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$1GnYCyVKhpNHSHZmRRWxYZwCEaLfKJn8vZyY4QlOArmKaWgk.il45','admin','ak_059e226beb4fc311','2023-03-24 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$rxJLNIOt5OjtT0Pw44cd0919VNPauIBaJoQw6zO98M2Zo/otOc.VD','user','ak_df77e06fe618a33a','2023-08-20 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$/cPW.yGcNCrqa7KB5KJqEIPGD6bY4sINNXu/OZo0sc7H4lBSnrpQz','admin','ak_63b1e0f87626e71f','2023-10-07 10:22:00',NULL);

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

--
-- Dumping data for table `products`
--


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

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


