-- Host: db-master-1.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=15032;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$0CiOoKHs0rl4gi9bUdIKBJOEAqmPz.FmZRP.W4pAMy5qRNA8LqG.e','user','ak_d72fc4b7136df92c','2023-12-13 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$irtU8tYiJMGb0nZshue.B/MqgMQnSWw2Tch6aCnOAEJfS18SQCDMh','user','ak_f9081b55ec81f5ef','2023-04-18 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$f4RqKINaAYY/qRswoY2mXrDIrpCMddiFlKSrjH2JTJGYexO8bhXu6','user','ak_06bbd055776d3e3b','2023-07-20 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$IDjrPhoLoGuB37SmaRRB/DFdYO1jCZYSALZVmIST873dnP3sqvHVT','user','ak_3fc56e72b3a9d324','2023-07-13 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$lv6JrzcBiEuq7N8JQ.XRnxT9YllzUwSQg5SxsTPmSavS9CKFxXfey','admin','ak_94616a44fa3f73d7','2023-02-06 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@corp.net','$2b$12$hj0vdY6ie9srE4B6IuuLRpCU8lVDLsGXzSWJ1NKRynaxfECSm5w24','admin','ak_62a7d3b1f1c168e8','2023-11-03 10:12:00',NULL);

