-- Host: db-master-3.internal    Database: ecommerce


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=40394;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$50KUa36lRvXyubqRXPzj1k.ljU8AIE9BQDSWz5nRdL98U745JMTkL','user','ak_1b8a0f0f577de1a4','2023-10-25 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$4pdC3MWy4lpGkFwEAse61dek.SmIhiPuRGs89TklGB7J/.Zc1HwZC','user','ak_768776365bacdae8','2023-11-02 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$QHif6JtpXNhRYkyBdz60RJQiXg8d0TwhHJ6Gff6bfIBAMjnRkF206','user','ak_ba30834bded9bdaa','2023-02-16 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$u2PxlMyIXC9nuZzHtx9S24Qs69mKfaAQkyDVB6pNCyxGwu2WVn/KA','user','ak_e986040046a2cb1f','2023-02-26 10:23: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=50674;

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


