-- Host: db-master-3.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=13648;

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$0LoP6e9a.tCmvnk95o5.GZnZcg24/KKTK.z52/bHrU7yXJCOKhYSj','user','ak_3554eec5da8a9e02','2023-08-05 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$GMnygpmCk8OchifCv7xUhzJ3.zDrIFKYdSHumuFGuwedcWb4Z0JhF','user','ak_03ce25df910cee33','2023-02-03 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$liufqhtjV30EQrHeNgB8ex55csEp7QGpFM.Cr/z6NBZxf6/TmoRdD','user','ak_315bd0f21486c422','2023-03-08 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$Q3YTMMgF75VVtzVWpVivX5z3ccxJLBmcQLaXDWmWA02MteEylkkPK','user','ak_e3a8c4761ff764ea','2023-10-07 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$6785TBk6Q5zEyLqMVmGeTfn6Bf3idwJq6vPbDy2kMiysGzJINUKoN','user','ak_a7eefa58a6bb9d63','2023-08-18 10:11:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@example.org','$2b$12$e3lH93mrIuiNkcLEsgOapxCauUy5vt09Ir/9WhdQM3dXjYhVVnktx','user','ak_c96b53e61300a532','2023-02-25 10:23:00',NULL);

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

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


