-- Host: db-master-8.internal    Database: webapp_db


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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$cJ/zYNMr.8FN06PH6iBNQy15NqfYu1C6Qbb99t5antA/lCMOEMlRQ','user','ak_51b0b2376efb9e08','2023-09-14 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$n5qjEaR8kLCh64wFfX6OjZA1FKsX/CcfRVhThiwDgXhT/DobL6R9t','admin','ak_7792f3205e849c23','2023-10-15 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$M8s4ao5sx.CP/IwYyoJ/e3DIpNPEWhOkD8XI6uexEa6pQpezaybS.','admin','ak_68dbf271e486f2ff','2023-11-18 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$4Aa0T6mL2/rry10iTtR6uEGVtVaH9xumyJzs39Nbn0FCZme9n6J8h','user','ak_dc65af07d740562f','2023-09-06 10:00:00',NULL);

