-- Host: db-master-2.internal    Database: ecommerce


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$1bidVpbdWMZohaRT.7Y5Ao4b89sVslJ8LjEC8Y3SHt9S0iBNVt1g0','user','ak_be41df4f813ee1d4','2023-11-02 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$K8A49wSMa7iFhyfHSvTPs0hX4wpcTjAoMUsHqbdfDZaIeGY0eIMGc','user','ak_f2ac12a6b8be31b6','2023-09-05 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$z49e6E8hBBVGSSZ4o3fII5YGXbqVKzjdRHetbsUcj/mnRQNGs5DT3','admin','ak_c64c365e19d888da','2023-12-01 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$m5wV2AuvW1cGEDEf9XTBrcfKYtmv5Kd5B.brp3fdmxsfSTo5i6.U8','user','ak_f952994a1ede3668','2023-08-04 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$ZacqFg3qz.v2p5Ex1SIis8/d.3yw0GQqMlUo8f9qAm1qtiFanbLQ5','user','ak_2530db442bf76259','2023-11-20 10:20: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=17750;

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


