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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$v4LKZZees/HAYHkkv1X2doi9vk.LrrEbrq1AGzjz.X7uqX2AhT1pE','admin','ak_0b09294f865ec98b','2023-05-03 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$U8WggaPYFU/tOMAs7c834cEveU.LAie31WcEVKV8SofSVxthvmWeM','user','ak_f8958408972c38c5','2023-01-03 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$R2QREySUW19q5xB8SIw5eF5j5GHOtW2HiMydX6BR.Ob0Lhz6/ifVb','admin','ak_10ee7396c9f6cd5b','2023-03-28 10:06:00',NULL);

