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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$/.UVYkq52ZNSEcIOdCn9V4ZLLWNLwUVpzdLMOBDgDUAySnyNDJ3cd','admin','ak_a11c73b5f8c67e6b','2023-05-06 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$NQ1vk0hLttZQxngxjiY3zIfi89ItS3GrvPW1jRQLrhiL.TQNdwbtu','user','ak_b6606954293928b6','2023-04-06 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$yvPZV/fkGyOcm2JanB8A7kQxS4fhbODIItzZxXqRp7O4JwoTwjRsb','user','ak_7287038cc7406d06','2023-07-19 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$pASu1bspNdPmaWNkJZruXYmUm03Tt0bwU/18lm.PHwW.5REmZBgSq','user','ak_14185d833d6af02e','2023-05-28 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$74OiEPfiO3.MBPivCIy83ymXoB1eo/w9pIYPD8lixQu2KB/YimRak','user','ak_7f583759db3b6680','2023-08-27 10:11: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=35361;

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


