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


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

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


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$Yfk6awxGHakqgl/8Jv7MPjLD.shrSKfxQA7RuMVzAcSLtIPf/0osd','admin','ak_f8b3b8f9e849d20c','2023-06-05 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$5Urpz8clPgw7DradCnUaViH22Pu7BkAsSI1iIqxYk2/MSIeBIDUBu','admin','ak_fb93ef6a60125300','2023-01-25 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$N37Pk8CZ8j8qqGUx3LTbYxC3qBSpjGc4ClK4XMrOyXlco/lxV787o','user','ak_cedaa7365456eeea','2023-03-20 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$ZdVMDSZp3FWGEcS5d0GmA/b9PofoNd16xjIt/nIbOrhogYBB3Tgqm','admin','ak_9fdec883e32604a0','2023-08-01 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$j7N4kcKTtb4jNKOAgPxwkN1JxLeRE8q2RYkFgmXQtK2t4Ik/.V4hy','user','ak_9a99baa589adad06','2023-04-23 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@example.org','$2b$12$z4sQ4juggBI857Tugh/SDHiFzpC7Wi/c0heGsZ9.GqUcebjr7GwWb','user','ak_880b78d1d23c0639','2023-02-04 10:06: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=38120;

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


