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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$33qy2onPgBX3PmhjKXDqVEl.DoCYJ40ZenyAuEe1YQ9cvJA9DSkq/','admin','ak_0653cff543d25bc8','2023-02-14 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$krbTAvueGeoTiQKYwNtZclSWs54HVWnzmltcWOahB8MEPRRdp/0Xk','admin','ak_851f937bf891d48e','2023-07-17 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$iX3DRdtdXKUTBxGMLj3l6lIxW1EMD4UK0FneCRmS60zpP6EScRubT','user','ak_a6c81790a3e06cfa','2023-07-16 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$TCbU7qzWHeevQXyzSx083IzMyMnmM6RU71DzPNbC4WjdpsbC1SKK3','user','ak_1cfccc666eb45fd7','2023-08-15 10:04: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=48385;

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


