-- Host: db-master-5.internal    Database: customers


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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$SEB/twUZylQruCtWcWo9/ZMMmlkNfBrKzBPdyjOOfUK5OW5Fa/QW6','admin','ak_50350647b3920736','2023-05-16 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$6Bkhr1IlM2.XFJIVDefMcMJ2lzV07QBr2euHPg9kS1M.eW7NcYGW4','user','ak_1e4a94956dd0921f','2023-04-08 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$T6CNepGxRxQYWz5m9qyOFJcMizRXz5auujT.4gn1dO7qX/IY8cC5D','user','ak_90156841b00cda9a','2023-12-25 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$1wbjib8tDLSXHTIhmVqBwhcl1YrDSdLgNHYjNO/1OC9dUxvc5AMZ1','user','ak_a861474383191f58','2023-07-05 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$ybh6Uu9c/odsm54oI.QdC1.7IMFfE1dWvLujo4yfRtOl6zSqQQNHc','user','ak_2ccee8e8d58a891c','2023-09-18 10:05:00',NULL);

