-- Host: db-master-9.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=26572;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$McjFfBiNRvuAi4PvoZU1oLuXFo03Nnuz1Dr7tFbTMrbjOmXdsULGo','admin','ak_9f321b5aacfe8f2c','2023-03-22 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$cmll4Pfadx9Pw3VfDu9ba5HU64vFkneyJqeGYaWR9Ra6FWV6EJted','admin','ak_c9f1f7f3bd5957c7','2023-01-06 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$3BOup9DtfZHGoodmIfMOoE7V2XsQfmmEoqkCieXxY8wn9lRt0/0iv','user','ak_e045eefd18b862f8','2023-07-24 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$bfjBwsDUKfFwoPNEZuicxSnv4CKk7NhpLV9zpZ2IKZpd/MsI2EJGJ','user','ak_278494889c0aeee1','2023-02-01 10:18:00',NULL);

