-- Host: db-master-6.internal    Database: customers


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

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=43720;

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$/6Sqm/Gtxmy7RWVg.ltX4.D/CqPTHCZkDiBKUXnBcdQFsHVWHQk83','admin','ak_a276f130c68d6cf0','2023-04-13 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$F3MVhfOMr/hj8l5HzyheWucUyJGeq3mRi8IS/J41cv/0MECXY/P3C','user','ak_9f3d2ac6d810111a','2023-06-18 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$QYm2Q0sXcFeUJP6zWV3E/ZuaAJTEwDDrja2y32G30GCIBvg/JQgBy','user','ak_9ba105122f766828','2023-08-11 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$UpUaoHRj.3i.J3G6.dAjfMoBGKx1YBJiMi7g077UVjFm.mDHuNEE5','user','ak_8454b0e43636a50b','2023-07-24 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$zhd51xlXgtCxIQ8z1oEAIyu8MKIERgrRdvuM1chmR4g/Uzc.zIC9m','user','ak_549a17d7ccadafaf','2023-09-21 10:21:00',NULL);

