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


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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$snvTxPmqYrBgCNToPRkswq.eclXppnYh2zUI/2THl.yCPdPWUOxaJ','user','ak_510252c6212f67b3','2023-11-20 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$iHGJxHMGS.sxKwD6Vm9Aa6x9HjDSyGR/AHhw1AILlt5Ad5GXQkJPQ','user','ak_effe7406af612c71','2023-10-02 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$QyMObA8b2l6aLY4FKYocy4528BMgzlGWhyFmXfeb9P1DtxpQPmGN1','user','ak_a674aa471ef28c79','2023-03-28 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$v/CZqJSMXa6rc2P03w41ncOx2d16izSOkUuf2JN2.0X70Qbw2JxXE','user','ak_98c65cd292ea716c','2023-02-19 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$yup5TelPwA9AwtiBzVRLaZ7yHySYpBQrzfUHxvGGCXvu3wfeC3w9H','user','ak_b943c348214356d2','2023-03-21 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@company.com','$2b$12$V5R94gRiVy1sdFmgSDyDc8nbM4HI8xYMkvFcfilMp2o5kYHJKq.XU','admin','ak_24faae3b925bbe89','2023-06-18 10:02:00',NULL);

