-- Host: db-master-8.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=30321;

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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$kIYOXjD1Wl8/44iGI5Ff/Upoy4G3JsQo3kRF5Dz8T38IgeTbjt1er','admin','ak_6dd0d195d3543185','2023-06-20 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$Lh/np4soF4x9dTgpwW8Rmk9Q.q.Dp/pK2NFCHD/rKQaL6W/zf12Oe','user','ak_67d86d23f060c809','2023-05-24 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$A1ZRL74j26f5yRLit61OguXUOVSCTQ.0jNEnTn2aZdrvNiRl1bq1T','admin','ak_39f9920b43102c6d','2023-04-10 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$QYIdCQ8a3TmDTEBQ5F3lFoKznQ8ETIDDr9DAwrnBEjZlSJSP6HtYj','user','ak_f006217306c41712','2023-03-07 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$2FBwcKQqfY3SY9oHGRMKL9TBPFYxISf7lrGbEH9V8OW9wyDEasw3C','user','ak_aa81acbaf1fd9e8a','2023-12-11 10:07:00',NULL);

