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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$TVMrV.AqBRNqafRRigrZkVQqQa/r1GLaXEu3qEHIhMyZD7ENRyBfw','user','ak_218d8c8a350e8ebe','2023-04-22 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$IbJKXvIrjfvxCnn46x/aORQcYiTjGSvwNTdhpjWSbjbCf3.Y4udgJ','user','ak_bf28c6cceb556eb4','2023-04-14 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$B9W6EEXC5P5R0NtkNDgySWoGUgqVdqwS8aKTpx0JZbOf9Oi8nS7sc','user','ak_67bbab0ed68496b0','2023-05-22 10:09:00',NULL);

