-- Host: db-master-2.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=4072;

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$tdYXJOPabDZoevNB4U5tg1S7/tlNVMyr9AEjB0X95Ngv/LeDHhP1R','user','ak_7e93adc0caf113c7','2023-06-08 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$pgt6CVV3/Fq3H2/0wr2E1roJ3APbDbc2ABlDfBT8cmEDvj8XVTaUJ','admin','ak_04b4e85441a5a8a1','2023-01-22 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$WwFYo2PjEIBLpxLzLSda/D7tPHc1s9lJ7g7J8EB4UJfBzwTdFwmAR','admin','ak_59fcc7ad435769f4','2023-08-06 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$RAslO9IwAcPqbGgCHvlezXKWUFl/R61z4ckDHthmWdKOaxdmpMbn/','user','ak_5b248f1ee3ddc9d5','2023-05-14 10:00: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=32838;

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

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


