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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$n1x4rpgQ9pec6DHDIYXmPAy4MbDSyaINAPTHfSq5stztdCfJLg0y0','user','ak_b06c561cc9776b4f','2023-09-13 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$I7AvpG41ZoW14ke0X4XnWkbZeA4KF85jYcYLKUwyTxknKnVUEi/op','user','ak_811d1d5007cf9eb6','2023-09-04 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$YvmbLZ2didn1n8vZ45YdKr603uxgXTGhNnL0zulHeNe.wybhoVYND','user','ak_b4d8d14d204fb128','2023-04-02 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$kCBjcTY8vikT9vqGx7Q0GAKSsS2hzvcBNqSJFOdx/TMVK6a6BRAGF','user','ak_21c94845489862d7','2023-01-18 10:16:00',NULL);

