-- Host: db-master-1.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=33447;

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$iXowp9tVNNnTFBkbKmGwQowxS3Eqmn01vPcwiIzi4YPpZt2KtRAdI','user','ak_4690725c1e15c4d6','2023-09-02 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$i0FRG8616pwVNpAdvXxjyAmgcAbgfjq2kXuncGWqW4JKFqtVqNOJV','admin','ak_411ea57a1f32449a','2023-10-24 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$G8JpZDGhfs4Eh0YTF2MI55nD7/HsMD8nIsW2NQGbCPE2fZS7GeYvT','user','ak_ebba6607da97ff50','2023-08-13 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$oYCPSEMq1R0dcAiAJWvHcwLuG5Rm.mdiaXt/.widE.jghDsNVdUNg','admin','ak_80ee53739fabc850','2023-04-09 10:00:00',NULL);

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

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


