-- Host: db-master-3.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=30564;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$64h/oJVa.EjmdsCb6BVmgagj5cZ6OxcGgNuZ3qEiWddxSptO9nYvZ','user','ak_7c766a82fcd46a3a','2023-08-20 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$WNE8MuWTcx2r/NQNusjcHtAgVc/LgTWtuVduOrXf53MBOhplFimyL','user','ak_00fd04cc11021b29','2023-02-08 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$PhGBPC56AsVOcxwY4RT9xKee3y8oA8LBA1ExhP.Be4H5qMN9/avjL','user','ak_80a4ad2501c61bec','2023-03-18 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$5Tl54ephQMALOVROUoswClkj5RAyr7QJWZN.XCYcWg5/foaEi3Rpr','admin','ak_ad595eda1a171be1','2023-11-05 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$Vq6NLy6IUeK/.xi0f3cvllNKigsHyVFvxXaFzURIADschTzE5fpcp','user','ak_fb0d7f10144c117a','2023-02-23 10:16:00',NULL);

