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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$U9OuClnIXdQ59V2VD8m4/0If2pLdhM4braA6uFVQKMmOmYnMMThGQ','user','ak_ad9e7eb7dc2b6559','2023-05-15 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$PIgR9tQ7XpN37M.PQCjzx1vSy40/MbrnZalp/Z6N3AhTQg4nVEsdC','user','ak_454a27d4181ffe28','2023-02-11 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$DQcROJYlKZGbsxyDn1N7ManS.MQIYpbjFADPglvuL7ADs7/ei8ZX/','admin','ak_213f63e398eac9ca','2023-10-24 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$k9ms0qzwqHF9QaPwCsiG7FnUq2pjNHhyCyj7QHL9BkhPJoq1Bz4v/','user','ak_a7100fc5e4967d22','2023-11-18 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=47306;

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

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


