-- Host: db-master-0.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=16360;

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$z/cJ1rZHcPAqMB9vEuygA.K78PM.8M3nNZchL3VMi6iUpTQGmlFWx','user','ak_79ddb347f4f40a70','2023-11-24 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$JP1Wh2/757PRsMD.cizoptU6ippzNp.kk428vjQyGUIKVZz4YGnMP','admin','ak_f519ab1de18b89f8','2023-04-09 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$I9/7Fbw12w59zfopAjip0r4vq2diBfwLxPT2qeYTvcrzVVkgIgeZO','admin','ak_c6a59e6cc0125d17','2023-03-14 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$d.IG15/hLYk0JVhVnMfEDzxsI9VG2OolRwVhaZd0cfT8RZ1veo47s','user','ak_bd990dce99a1cb98','2023-09-25 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$HdjYb5DWiFs32QJdNHqzmPfpApZ6rVxaky5N.SIcdT9lI12MLDMo4','admin','ak_5804ff4d1b4bceef','2023-01-01 10:18: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=31853;

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

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


