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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$vSmpY9GICWk/EUOEs4w3zi5eoyBWPo1KMFuxk8fi3dWIPNErRxp.d','user','ak_c375d5e97e06c6b0','2023-08-02 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$xPhARhyv1RPtgNGTEneKXGZi6QjnD/rWb7h6CplIqJ6P4fTFDN/eR','admin','ak_df45a5969825a2d8','2023-04-27 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$WNY13TgS6qKSucM3BrxmO2PPW4aZx8.LzFtDmhH4/4IzK0mClr/7d','user','ak_0e45f16ea5d4e4eb','2023-04-27 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$WJJLKMWoYraGX.oTAToghXT0j46kO/ZLO/nBVQlktS/DkZL5T2jeR','user','ak_ef7b656c8085b5d4','2023-05-26 10:23:00',NULL);

