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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$OFezppLX.JDLssKcOENlhuP60q3XSjNBBwY49h773YtQtYp7FqGIT','admin','ak_1a09ffc8031fcb91','2023-12-19 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$nEvDhV5XLDmo2bQYE8fXnE5RYQm99hO9i0pHESGnIfMNsSE4VBYqP','admin','ak_64b9df30cce60418','2023-03-04 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$saQqeR6BlcgDZMtloc1O6zRmRavEHiqWAyNXxokcfXrm8ktTUGFjE','user','ak_9f8f6dc451983b9f','2023-08-04 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$ZwY5TaxrkxEr/v/c.yXwMHt4CpMynySw5IJzuzYWUS162LiSPgVgS','user','ak_d1d6896cce7660c8','2023-03-26 10:06: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=32448;

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


