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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$pn6iPAcGVN8mQerjiQQqq8Z6vf/NeEfJagQq0eqqZ0EBKoUyA9YXm','admin','ak_4ba9da3ee79589d4','2023-01-19 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$uQW4ayV4Ied0S7PED5Ji.LNWAmtB.uQgsKNqEfAfS1FtSQdBR34T1','admin','ak_6a2b2ac525a9f958','2023-06-04 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$TNFgh6C6tSG9G2vhGmWONo1FgbcQjtUzzPJeH8TlDzNIvvPsObQZq','user','ak_27a580228706ab60','2023-01-09 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$.CJ6I1HXFUxvhDNurBKls.hOYDbit.hoWtxsPHyknsYLmm8aTPAbz','user','ak_565845ff5eeb0d13','2023-05-08 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$welSxrXc1lpjqEeY9wUgzcKBCRXAVPKZcUK.j/Rmf8ROJwc7q7Qny','user','ak_2c9b2bd4570d4d38','2023-08-08 10:17: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=3508;

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

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


