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

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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=5631;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$W6uaqxQQ9geeWG6nkSAQpThY7hPUE4.1RurQcN.tfEEnB2P5Elapz','user','ak_06dd3800d9875e59','2023-08-04 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$yxeUQ.iZWxLdlAim.hMfBfDwJjDlWFd2tM2p2XGEz1pUsHGJYyl2j','admin','ak_051c5dc82a1cba5f','2023-12-18 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$KsXINsrdHfteA55ScXCuq5vzVqBp17OTxcuKLqIgjEodR75MYOGgR','user','ak_082ecd4e0f2fb13f','2023-08-10 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$RcNL0k58x4IKGzvDSDCxLbIjfBJPMWP4KVWF0.2lgcx2UVE0tXmKX','admin','ak_c6ac641fdfba4b3e','2023-12-09 10:12:00',NULL);

