-- Host: db-master-3.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=42017;

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$UHUYGiTobLOeYaNXwMkWNCSfKaMm5Kt/.ExnLwaVs86Mr0ThPWInZ','admin','ak_42c99165632471b8','2023-07-04 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$c.9JWNxarpfMt5/C98gaeB4iCmyboSD9jBTQh2DxXGIthG79hLyXk','user','ak_5f6cd0bf03ee018e','2023-02-15 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$gADSGK9CnXo2KGmZYG/zRvv/HSxBfVAFEadRgs32RRigX74vWbw0i','user','ak_6db2367e737c18b5','2023-06-11 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$9nVDm6VIUDBVgq0UcEXWVBhmZhUQvRrJKQU9BhKWMfwRfuANj69Ex','user','ak_4e670f4af547f365','2023-03-08 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$pZY27xp95pdcispF9kwMcmKKGLwiL29dvw9ZiAWw47apsRibWkXZ1','user','ak_fc905f212c75f533','2023-01-18 10:00:00',NULL);

