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


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$o55AC8fdyz/vqRlveT54yaFoQ3e8ZJ6FKc7JUun2QoFYPYCx4Xp3A','user','ak_6afdd7f34b4f39cf','2023-10-27 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$pyVFwOvGS2xtoMtEKqcnRxJYPZrb.nXOEArov515ThPDyuLTsTLX9','admin','ak_4ec59bf6a888f4c7','2023-02-27 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$VphLbkvYLiDuZbhQGEx.D81OhyPsh/WYwSZy2hYq9EmBtreGkbd8K','user','ak_82ad42707c05d61f','2023-04-03 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$PtzN8hrE8ZzIpcKzNJSMGqzDuSj/ZISV6JgDRjdKKmErHmx54Ut1I','user','ak_180ea32eda5958ef','2023-09-08 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$7jj1Q1CCksmaM7VF/IHU9ewpmMoffSXkrDQyJNwEw.MRmaLyCTgxi','admin','ak_90a54c478be1cf9a','2023-10-24 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=12474;

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


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

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


