-- Host: db-master-6.internal    Database: ecommerce


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$hsE6ueiYtZQ9AJQYvrHZRG9km9pKrFoNF4uGflk7XpV5YrIqaOpgM','admin','ak_d6763db2b2d78038','2023-03-10 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$nb8jW2iMxgU2QGjM9w6A9paKlev7wygPh7Ksh9jsn2wDy6ydsumNT','user','ak_90890b3fe499133d','2023-01-25 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$qy.Ld70XG86JyOTZ7CEx/LQrIwYlTTdHdAJkjzSFEokQyJnxyffnd','user','ak_614c3bbed5b68192','2023-04-27 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$1i0qs/W86PmYkvRA6fPh4PIlb5NrxSJMz6rtYioDc75eQ4IpWReiW','user','ak_eae7bda1e5221b87','2023-08-19 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$TRm7T7dlZYQ3YJwlEDdBhuTJAHkDuhOsJQ5Q66iLNUFwAIyDmbC25','admin','ak_a42aa370b2a86782','2023-01-16 10:14: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=34734;

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


