-- Host: db-master-6.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=34807;

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$drJrS.c77IVTQeSbyuAyT8zI6RBe/na7J2kMDX/yhkZF568jnsWUB','user','ak_94e69a83524db475','2023-03-16 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$qqhzqK65aataNs6VOFZrxwsyTwci8jB6g84B/Kx0u/TCxYi/KDPk7','admin','ak_4e1567fe678090a1','2023-08-18 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$TDcn2rkqRyh5vI0Y/p8lB69yDNY.7MZ7s6zufZZhuWuP80B47u2zS','user','ak_3b5a770d596df2e7','2023-06-03 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$.9N7UAsg9CwYWPYET2UOh2zCKpH/mU902K.1FBC9SHw/zMONTKiZ9','user','ak_6d22fd3b37e884e2','2023-10-18 10:21: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=41536;

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


