-- Host: db-master-5.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=50029;

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$NMMaBFOx7uqSdbtHBAMV1neyEQoQr2HRUBuzVlOAgcDtG3fOYJHA4','admin','ak_f0af5dced6e38019','2023-04-07 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$R6COg7Jbr9S03YAEAHf60pHKHSCLT15XdifVD55Ddk1LfggVppeKI','admin','ak_df5a8c3d8cda1a70','2023-02-21 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$3eAPXJnpWklION/xsuNHnuz/9FdDk1TKel8gofXuEoHjjWSm.3CX7','user','ak_2dcea2749601d4cb','2023-04-10 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$0FZ16.UGGJfqRDSokc44FqcfKAr6b.w5KXVbyzOrivgvV.jpTQreD','user','ak_4eb64c91a138a4a3','2023-04-23 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$brq/TpnRk7UvkWQg4twiaXqVJ43Jje0DMyQV2AtzbremF8Eko0E/y','user','ak_dc1c28f181bcace6','2023-11-16 10:12: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=44785;

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

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


