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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$ZVecPINuMJ8kyLzED2kdapNVFdraX71wdgJOKlpgNQIFByqBImqqa','user','ak_89a5d5978ac3f5b2','2023-02-19 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$GrwuaoCtBuBGBTKKXEP/7zeLO53KYK6HeSV682/9cU7WKIRRG6ECq','user','ak_d34a428bf20b541a','2023-02-21 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$XKq7z6Tcb/Fd14BBNj1/rbKCJH1NmpL/a9vD55RCvMewo8v/nRew2','admin','ak_311288f1abf05fc5','2023-01-24 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$qHHA2WgYgTI53WzZBJX0w2vYe9j5lC92OuvFjghnnw7qwXbJnvc6F','user','ak_13d5903a430928ea','2023-03-14 10:13:00',NULL);

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

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


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

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


