-- Host: db-master-2.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=39573;

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$x4ZURLO1ZV6vE9WHXzJMWMlYBo2d73rArn.ZnMtGlSZvA4aroRFwA','user','ak_d07639837846c50a','2023-11-28 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$2n2Yyro9ZWyI7JZNOCf5HPSdFTxJYIqRa2Rz0wI4Nc8Gbw4wxYIbs','user','ak_d0ebf6cab69f893d','2023-04-01 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$KFvQ11vWA9nMVT3.n7nLNsjaHNpfcRqeIqz0gM7jDEFDPTp22Gpek','admin','ak_6e4affa3fa68c943','2023-02-28 10:18: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=12455;

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


