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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$Cm37aXP6n3QvnDNTroR1SYinZt0r/g0SN6CGvW8G0Z1jvIxoOnAQR','user','ak_97ff7f0338f1b503','2023-10-21 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$NMpYfLhXWi8b2vwnz/Eh59HqvIC5QOUncmR6OeTicgtbXnS12vJV4','user','ak_bfb869250cbc86ab','2023-08-27 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$ohq/U9rbBi1aLdihD6U9Wjg.ziU7x1KbHBIlb.Xsd89uSXYVZOqNE','user','ak_cec45470e33483b1','2023-09-04 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$QnN.K3/SK3EIH9IXrrLfYFq4JPX2u0zWxRReG2tJr1r5iZcA/sTr/','user','ak_78286c177105cee7','2023-08-06 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$K.atDm4p./GPgeFQVTmBCj8tuls5zf4WTsHr63ADQ.hw60IdQU8sM','user','ak_5b11a07c7acb9447','2023-06-09 10:05:00',NULL);

