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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$XdRzHHE1OugdVLfm.PIprVPZOQWJNbhMiQhksrLBpf2BOqzNr//Hw','user','ak_c01078a7ef87674e','2023-07-09 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$lYyn5OUn.bcSxwx54LJYQ2PXsqxs5MLHFb6r4RCIKAUZibjVJ7ZOI','user','ak_81bad86196bdd965','2023-10-13 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$cocV2Kh/PiymDsDR9dYjiTQXWKrxLTxYC9lzYRoNJSUEwQSf0LMCb','user','ak_f8191c591ea9e300','2023-12-16 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$BPsfnZ0.qj.NharVEVB7PhAg04RFV45JOsF1d0bZWPeThGixpH4tP','admin','ak_601e76f4e952e272','2023-02-20 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$zHF6RlonBhJblJjy9DeHL0yRYUBhMcrUb9mM/0oTmQfFbzWrY0qAL','admin','ak_bd80e8d0f838631f','2023-12-22 10:06: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=17776;

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

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


