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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$UNtr.4tZmkWXn9gM1KXN43LxbG5Pz3hh5j4bg60A7qCdbrzOJc1bS','user','ak_5ac6382237a895a5','2023-11-08 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$W8wj4OhwMLO9XfZJT5BAmSbl00WMS/BrsDD/n8L9BN/WapBo8u8Bf','user','ak_dd790d74fb35ae2b','2023-09-27 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$jUp5t/8.iUsOh2vuyRU.iBpO7G7uf5/Y0niiKeq/1HpwPRSmcPe/5','user','ak_d832100f66e4f18f','2023-11-22 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$KsboWDRGWrIGc6IQngzp1ZvCZkqtBOsU8MBCuf0HL1dTZblu90pDb','user','ak_8783c1404cda8d7b','2023-10-04 10:09: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=35432;

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

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


