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


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$Evr.eD50xntQJ5ebRYhIKA53Ln5TvBCTcl.r6jMaQSCJA5WX.w7/f','user','ak_227c405ba68902b7','2023-03-24 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$WR7K7jI06fUYnEIVEN5Wlv55zy7y5ErrNQlr9BVNS/m55GbBzNjtE','user','ak_92a2ad3e54b0cb80','2023-04-10 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$EuraZhyTAx9nfB4IEGks13NlGWgtNM1RQKXr7g6/pp1Jk.gTbumY/','user','ak_f8ea9368c62b7f3e','2023-11-20 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$d.bzmRzYyhV50PzgpbXCTtriToksKKTnkEcOmynd/pdcNb.Q0MpIM','user','ak_d2f62a8fa9eebae9','2023-12-23 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$OMbg.UPamnpfT9ZjX9PbetjRd7aLqjdc1FCRC2VhSC8PYLLo2E43X','admin','ak_5e88c352b78cf6d0','2023-10-26 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'admin@corp.net','$2b$12$bii3Zc.4CvcZ2S1hNNX3sC6katI1jJZiFXiOPCnBxqxEzqrxehuSX','user','ak_c2affaa5d8b0158b','2023-06-03 10:02:00',NULL);

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

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


