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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$Ywgcx/v/U4M7fYLQM5NQV5rtxAIz/xx9RZzagwfLQi9VxtvBhVpFo','user','ak_5b3346fc219a4855','2023-01-14 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$aRuSxsVKK6QrZdyoMcW8wp7rsHynjcUsr9HKVlzOfD44DhM3w420x','user','ak_2d6f89bf57502970','2023-08-14 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$iR17UzeC3jMuavjGFNJLy9XoKbdHG60y7NibXNBZbyPqJ57328sh9','user','ak_f813bab62f2d14b8','2023-01-20 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$tQEALV3Nwe/FGW5ehWeVgRKTtdbQZ76G.Enr7IA0fXvn2gX7XwRAO','user','ak_33dd5ae550924b7f','2023-02-12 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$hzVerohppO9WCIqoEEdl9vxLD.PNrbDH2RcuqVR7OMjJ/LLk1oKw4','user','ak_2cf1a6c4cb52b5a9','2023-08-23 10:12:00',NULL);

