-- Host: db-master-4.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=36289;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$QdVVp/pO1zvbjWL2ZNsdzBFg4mDTPyOpH8aIvPItvWuP85zsTh/on','user','ak_2361ad5ddd306e1b','2023-10-23 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$ENu/1EYrAnhUzVfNBD5olgkTwXVHGJ/LfAeoSZphMjO6sn3QLRJLh','user','ak_d06e69fcc51f82fd','2023-12-17 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$xdBureWJ0TZyRW.9b9rfST.aO44udMZKXxRxQUWoTb7PBvGmRw0NH','user','ak_9cd5de2cceb86a03','2023-11-17 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$KGa7jthqKJoQifld3WjEjfudQ27u4rEWEc02fJRpcLBlK6MySM4Ba','user','ak_7f19dce59da0c74f','2023-09-08 10:05:00',NULL);

