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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$oGcEprpKNoMeZgVmHW4tI6uveBjrUMs88.BOfF3xypFwzTOukI9Zc','user','ak_b07273c3bfdf109b','2023-02-24 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$crSPgiiD2fyk5dMfzpXeiInE9zVPYs6IeyDPgSO0fKO.F9qmwgxYH','admin','ak_cb05be1e31f1872d','2023-06-23 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$96/4al3c3eXqBGzye8C5iRg/LwS8ffgEKcxQW1T8eZJNB9dMBZe8j','user','ak_c6b1bb93d30348d7','2023-07-25 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$D8OaTFf8m1biwoB91CkHyKrfrzu5fSWLJh58Volnvf1VBMG/WKAdb','admin','ak_1c9704d14140a840','2023-05-16 10:13:00',NULL);

