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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$w9KRPmmVRCS1vKY3172NzMUlDp0NXKHNJUWYCDktKbm7Lsprts8kK','user','ak_25b24ca14a78cf34','2023-05-16 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$BzVkfDbOg5wcN9HHo6Jl9bvC2PzPwJ3KyYZU4xUnh8RUXMcxvxRuJ','user','ak_2d048c0473351725','2023-10-09 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$WvmVFiBGwRJYVKrskG5pOzNjae3IM89QDAGxYKOAxoZT.9d/nQK90','user','ak_7e333c0736626f9c','2023-07-07 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$4mK96eruKNfFjxcqh4M1uQj2h851Chlu2dT8GhYjfzU0pBQQmmNEH','admin','ak_12a89f606d243835','2023-04-16 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$gDA.C9CfhCz7y8xkFwWqHZVeUIZ6FBL3EFEQC/peEFj/O1vtPEefO','user','ak_466a1503765bd33f','2023-12-24 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=49129;

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


