-- Host: db-master-9.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=44396;

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$QvHyiHgWjYWPmKm31kpBW/qofN0gcE6lgNt5yhjHPmjXOTpw46A17','admin','ak_61fcc21f6d33c23a','2023-12-06 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$cedgB4l0ruazKbKs8IDw/qjklCKD1tzBvA//Dqz64VioJPiJED.Of','user','ak_1ccee73b5062c487','2023-11-15 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$ZiONFNA/0MogXE/6w8MhG2H0JHWUrybCPIffax/zYCADxj9r.GAdU','admin','ak_1996b1158cf89bae','2023-11-26 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$SLhufE1PdpFBbLhWefWLS4FIkwHrS4fCqkssW8.h0D2SRQ3cPx2fD','user','ak_cc1ea3011fca707e','2023-09-20 10:12: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=21041;

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


