-- Host: db-master-7.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$rXzVWuQveI90hf9dvgKprHutaDVWejc7nkppJiafunKG0QjLBBYXG','admin','ak_9618851493cfe83a','2023-03-17 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$Rz8lJaKa8JnaehXf4ue3OgCPjSHaexuFNkHkbxCqKgGxAH1GG.s6D','user','ak_884710b3a99f394c','2023-06-28 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$/91NgHuo8SFkE4aWpJzJ/2.Y7kESP/ebCOrs7erOvHpg/hkJSxhX5','admin','ak_42dcf075539b820c','2023-04-28 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$BiSvHmE2TjcppjFkuFNtoZKedACTG0RQN53aM8Ygj17euk2.zmx/W','admin','ak_31de9c14e6b79821','2023-01-06 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$65smZYeQInAmEJIzg.XDVMZqoz9Sa7wmDOMdUX3lkBI9GF7iLoRRk','admin','ak_521f5bc9c06d57cd','2023-03-12 10:01: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=24295;

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


