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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$ae8PAe6Sr9FHtGJ61NGWaNXwAL7WbeFPHYjfE00c.7csKAofEUnd0','admin','ak_9866f51672a4d868','2023-03-13 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$50rIPx9ONiGapfvRKp.XiuPgkT2lphteNq8.w63DXkRCbHluNrMHx','admin','ak_de9620e0ee5ba594','2023-02-12 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$DqWJIOdGOGfiYXJpcJxu/GI8aHV857.xpvqhFT90nMFwNIBxwottt','admin','ak_18dc0d6d7a4856d7','2023-05-26 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$J2BO5Z6zxlF.2sBh/SnyCOGFd8twSAF8CsfNCKP973G/9CYYg6eFD','admin','ak_df7b10c2a77f5334','2023-12-24 10:02: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=41236;

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


