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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$tPtSsJ.0Z5iK52AVK9j3VqytgHC3bIhEwLXQmjKkcTv35j6i9ABaE','user','ak_936a1a3dbfe300aa','2023-01-24 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$UrZvBz4xnSR6RBt4LM1aevF7cl1QFW2OvbH1T4A5v7zj2qRKkv8e4','user','ak_3aab196dd64a318f','2023-09-28 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$j79i6P9.FWNY5GLlUEo1lPu/6uaHIsZiVaFNel8FJf4OP0ARTtXWG','user','ak_679a38233a3b97cb','2023-07-11 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$4BJYG48JKYuKM4MMQoKr4WyhiR/6jxoz5O730iWc/JXOENF.EVea6','user','ak_623dbe5be656d358','2023-07-04 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$hGTmyTxJD0CglTwj7dHhV5Zt/RLnkRsgyrXDtGHBkzsCGRmjAmcYU','user','ak_36a3154758c22465','2023-11-22 10:06:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@company.com','$2b$12$uxRC268I0QJZZM3SEvn8cIEWHGRbldc4.5qTRklolqTIVnF8Hwbeq','user','ak_593e5a8acdcbc8b5','2023-07-19 10:11: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=13687;

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

--
-- Dumping data for table `payments`
--


